emdash 0.39.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-token-DYwe4Pk0.mjs +26 -0
- package/dist/action-token-DYwe4Pk0.mjs.map +1 -0
- package/dist/activation-LOkDM5WT.mjs +382 -0
- package/dist/activation-LOkDM5WT.mjs.map +1 -0
- package/dist/adapters-B64LbYcB.d.mts +171 -0
- package/dist/adapters-B64LbYcB.d.mts.map +1 -0
- package/dist/allowed-origins-CHB8oZNM.mjs +116 -0
- package/dist/allowed-origins-CHB8oZNM.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +49 -40
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +11 -7
- package/dist/api-cFFZpyS0.mjs +4718 -0
- package/dist/api-cFFZpyS0.mjs.map +1 -0
- package/dist/api-tokens-CE1ECIg0.mjs +3 -0
- package/dist/api-tokens-s4i4aUp_.mjs +166 -0
- package/dist/api-tokens-s4i4aUp_.mjs.map +1 -0
- package/dist/apply-CoT603H3.mjs +1163 -0
- package/dist/apply-CoT603H3.mjs.map +1 -0
- package/dist/approvals-CqMfNxak.mjs +460 -0
- package/dist/approvals-CqMfNxak.mjs.map +1 -0
- package/dist/artifact-fetch-DZMOGZ3-.mjs +818 -0
- package/dist/artifact-fetch-DZMOGZ3-.mjs.map +1 -0
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.mjs +62 -12
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +14 -12
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +26 -11
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.d.mts +9 -1
- package/dist/astro/middleware/media-usage-write-fence.d.mts.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +95 -13
- package/dist/astro/middleware/media-usage-write-fence.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +8 -8
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +145 -47
- 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 +129 -122
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +14 -8
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +14 -8
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +5 -3
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +17 -11
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +17 -11
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +17 -11
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +19 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -5
- package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -12
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -5
- package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +18 -12
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +21 -15
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +23 -17
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +23 -17
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +26 -15
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +32 -19
- 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 -17
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +23 -17
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +10 -8
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +10 -8
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +72 -61
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -4
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +74 -63
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +84 -73
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +72 -61
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +4 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +83 -72
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +74 -63
- 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 +85 -74
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +8 -6
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +76 -65
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +221 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +72 -61
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +71 -60
- 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 -4
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +71 -60
- 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 +4 -2
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.d.mts +12 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +144 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +68 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +68 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +69 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +66 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +69 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +91 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +66 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +78 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +66 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +77 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +77 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +66 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +66 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +99 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +14 -8
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +16 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/index.mjs +14 -8
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -3
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/accept.mjs +3 -1
- package/dist/astro/routes/api/auth/invite/accept.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +19 -13
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +24 -12
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +18 -12
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/logout.mjs +4 -2
- package/dist/astro/routes/api/auth/logout.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/send.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/send.mjs +29 -15
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts +2 -1
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +37 -17
- package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +15 -9
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +4 -2
- package/dist/astro/routes/api/auth/mode.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +14 -8
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/index.mjs +3 -1
- package/dist/astro/routes/api/auth/passkey/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +21 -24
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +18 -12
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +19 -13
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +19 -13
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +19 -13
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/request.mjs +18 -12
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +3 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -11
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +21 -15
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -2
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +18 -13
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -3
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +18 -13
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -2
- 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 +10 -8
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +68 -16
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -13
- 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 +31 -22
- 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 +31 -22
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -3
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -2
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +18 -13
- 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 +38 -19
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -2
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +18 -13
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +18 -13
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -2
- package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/index.mjs +15 -10
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +15 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +11 -9
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- package/dist/astro/routes/api/dev/emails.mjs +4 -2
- package/dist/astro/routes/api/dev/emails.mjs.map +1 -1
- package/dist/astro/routes/api/health.mjs +5 -3
- package/dist/astro/routes/api/health.mjs.map +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +27 -21
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -3
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/execute.mjs +18 -16
- 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 +19 -13
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +18 -12
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +5 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +4 -2
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.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 +29 -15
- 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 +27 -21
- 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.mjs +38 -32
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +6 -4
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.d.mts.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +717 -67
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +19 -13
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/replace.mjs +16 -10
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.mjs +8 -6
- package/dist/astro/routes/api/media/_id_/upload.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/usage.mjs +34 -21
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +37 -26
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +5 -3
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +31 -2
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +16 -10
- package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/index.mjs +16 -10
- package/dist/astro/routes/api/media/folders/index.mjs.map +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs.map +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/media/providers/index.mjs +4 -2
- package/dist/astro/routes/api/media/providers/index.mjs.map +1 -1
- package/dist/astro/routes/api/media/upload-url.mjs +18 -12
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +36 -24
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +18 -12
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +18 -12
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +18 -12
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +18 -12
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +18 -12
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +18 -12
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.d.mts.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +9 -6
- package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -5
- package/dist/astro/routes/api/oauth/device/authorize.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/device/code.mjs +10 -8
- package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/device/token.mjs +9 -7
- package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/register.mjs +4 -2
- package/dist/astro/routes/api/oauth/register.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -5
- package/dist/astro/routes/api/oauth/token/refresh.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/token.mjs +7 -5
- package/dist/astro/routes/api/oauth/token.mjs.map +1 -1
- package/dist/astro/routes/api/openapi.json.mjs +497 -12
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +10 -8
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +21 -15
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +21 -15
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +21 -15
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +21 -15
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +31 -22
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +21 -16
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +31 -22
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -2
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +102 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.d.mts +8 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +96 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -0
- package/dist/astro/routes/api/schema/block-types/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/block-types/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/index.mjs +102 -0
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +71 -60
- 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 +71 -60
- 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 +71 -60
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +71 -60
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +71 -60
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +71 -60
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +17 -14
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +71 -60
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +71 -60
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +20 -14
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +19 -13
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +20 -14
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +10 -8
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +19 -13
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +19 -13
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +19 -13
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +8 -7
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +8 -6
- package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/export.mjs +8 -7
- package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/index.mjs +9 -8
- package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +6 -4
- package/dist/astro/routes/api/settings/email.mjs.map +1 -1
- package/dist/astro/routes/api/settings.mjs +25 -19
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +20 -14
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +19 -13
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +43 -37
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -2
- package/dist/astro/routes/api/setup/dev-reset.mjs.map +1 -1
- package/dist/astro/routes/api/setup/index.mjs +48 -38
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +5 -3
- package/dist/astro/routes/api/setup/status.mjs.map +1 -1
- package/dist/astro/routes/api/snapshot.mjs +10 -8
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +24 -18
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/bulk-tag.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +295 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +25 -19
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +7 -5
- package/dist/astro/routes/api/themes/preview.mjs.map +1 -1
- package/dist/astro/routes/api/typegen.d.mts.map +1 -1
- package/dist/astro/routes/api/typegen.mjs +12 -9
- package/dist/astro/routes/api/typegen.mjs.map +1 -1
- package/dist/astro/routes/api/visual-editing/action-token.mjs +7 -5
- package/dist/astro/routes/api/visual-editing/action-token.mjs.map +1 -1
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +22 -16
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +3 -1
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs.map +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +16 -10
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +20 -14
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +20 -14
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +10 -8
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +20 -14
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +4 -2
- package/dist/astro/routes/api/widget-components.mjs.map +1 -1
- package/dist/astro/routes/robots.txt.mjs +10 -10
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +13 -13
- package/dist/astro/routes/sitemap.xml.mjs +11 -11
- package/dist/astro/types.d.mts +21 -17
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/audit-RfCugiSB.mjs +127 -0
- package/dist/audit-RfCugiSB.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/authoritative-records-CoJvBXAD.mjs +5172 -0
- package/dist/authoritative-records-CoJvBXAD.mjs.map +1 -0
- package/dist/authorize-seCifOMJ.mjs +49 -0
- package/dist/authorize-seCifOMJ.mjs.map +1 -0
- package/dist/backup-CBu0LrXf.mjs +246 -0
- package/dist/backup-CBu0LrXf.mjs.map +1 -0
- package/dist/block-type-registry-DUI_3KxT.mjs +6709 -0
- package/dist/block-type-registry-DUI_3KxT.mjs.map +1 -0
- package/dist/block-types-BmZmLmAD.mjs +132 -0
- package/dist/block-types-BmZmLmAD.mjs.map +1 -0
- package/dist/block-values-C_VIPr5t.mjs +175 -0
- package/dist/block-values-C_VIPr5t.mjs.map +1 -0
- package/dist/byline-DYmkXqvo.mjs +909 -0
- package/dist/byline-DYmkXqvo.mjs.map +1 -0
- package/dist/byline-fields-D28AT-Fh.mjs +123 -0
- package/dist/byline-fields-D28AT-Fh.mjs.map +1 -0
- package/dist/byline-registry-gnKscbQX.mjs +406 -0
- package/dist/byline-registry-gnKscbQX.mjs.map +1 -0
- package/dist/bylines-BPwJqoYH.mjs +232 -0
- package/dist/bylines-BPwJqoYH.mjs.map +1 -0
- package/dist/bylines-ukLaYpVZ.mjs +214 -0
- package/dist/bylines-ukLaYpVZ.mjs.map +1 -0
- package/dist/cache-m7UEkRFV.mjs +108 -0
- package/dist/cache-m7UEkRFV.mjs.map +1 -0
- package/dist/canonical-YhEQezjg.mjs +174 -0
- package/dist/canonical-YhEQezjg.mjs.map +1 -0
- package/dist/capture-triggers-kJyl_yyM.mjs +362 -0
- package/dist/capture-triggers-kJyl_yyM.mjs.map +1 -0
- package/dist/challenge-store-ppU6Uv13.mjs +51 -0
- package/dist/challenge-store-ppU6Uv13.mjs.map +1 -0
- package/dist/checksum-B2IINIlN.mjs +162 -0
- package/dist/checksum-B2IINIlN.mjs.map +1 -0
- package/dist/chrome-tags-DApCQSIk.mjs +24 -0
- package/dist/chrome-tags-DApCQSIk.mjs.map +1 -0
- package/dist/chunks-Dms7Uxbt.mjs +25 -0
- package/dist/chunks-Dms7Uxbt.mjs.map +1 -0
- package/dist/cli/index.mjs +1471 -56
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1050 -4
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +193 -11
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-deletion-BIm28mo3.mjs +436 -0
- package/dist/collection-deletion-BIm28mo3.mjs.map +1 -0
- package/dist/collection-deletion-processor-Br6rxs3u.mjs +217 -0
- package/dist/collection-deletion-processor-Br6rxs3u.mjs.map +1 -0
- package/dist/collection-slugs-cache-CjGk__zp.mjs +85 -0
- package/dist/collection-slugs-cache-CjGk__zp.mjs.map +1 -0
- package/dist/comment-CrBl22OF.mjs +313 -0
- package/dist/comment-CrBl22OF.mjs.map +1 -0
- package/dist/comment-reaction-JEQ2Fpd8.mjs +85 -0
- package/dist/comment-reaction-JEQ2Fpd8.mjs.map +1 -0
- package/dist/comments-2ah9du9y.mjs +195 -0
- package/dist/comments-2ah9du9y.mjs.map +1 -0
- package/dist/comments-fHZ8ON9O.mjs +99 -0
- package/dist/comments-fHZ8ON9O.mjs.map +1 -0
- package/dist/components-CXbq7CSM.mjs +108 -0
- package/dist/components-CXbq7CSM.mjs.map +1 -0
- package/dist/config-5ii2haYu.d.mts +6528 -0
- package/dist/config-5ii2haYu.d.mts.map +1 -0
- package/dist/config-CvmjJcVw.mjs +73 -0
- package/dist/config-CvmjJcVw.mjs.map +1 -0
- package/dist/config-IhybvkIQ.mjs +242 -0
- package/dist/config-IhybvkIQ.mjs.map +1 -0
- package/dist/config-Py43JK9r.d.mts +39 -0
- package/dist/config-Py43JK9r.d.mts.map +1 -0
- package/dist/content-DFaIEDj9.mjs +2281 -0
- package/dist/content-DFaIEDj9.mjs.map +1 -0
- package/dist/content-list-query-Dra4Dalc.d.mts +26 -0
- package/dist/content-list-query-Dra4Dalc.d.mts.map +1 -0
- package/dist/content-policy-DFNw91-d.mjs +46 -0
- package/dist/content-policy-DFNw91-d.mjs.map +1 -0
- package/dist/content-repair-Q8IUrpLL.mjs +442 -0
- package/dist/content-repair-Q8IUrpLL.mjs.map +1 -0
- package/dist/context-BeGccdUX.mjs +1921 -0
- package/dist/context-BeGccdUX.mjs.map +1 -0
- package/dist/cron-7DCJwPXq.mjs +284 -0
- package/dist/cron-7DCJwPXq.mjs.map +1 -0
- package/dist/dashboard-DjrB-xxZ.mjs +151 -0
- package/dist/dashboard-DjrB-xxZ.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +3 -3
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +6 -6
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +6 -6
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +6 -6
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +2 -2
- package/dist/db/sqlite.mjs.map +1 -1
- package/dist/default-DQ6vsviu.mjs +81 -0
- package/dist/default-DQ6vsviu.mjs.map +1 -0
- package/dist/deferred-tasks-BPxXUB4x.d.mts +9 -0
- package/dist/deferred-tasks-BPxXUB4x.d.mts.map +1 -0
- package/dist/device-flow-CRd6DXmW.mjs +466 -0
- package/dist/device-flow-CRd6DXmW.mjs.map +1 -0
- package/dist/dialect-helpers-7_IqPdh9.mjs +307 -0
- package/dist/dialect-helpers-7_IqPdh9.mjs.map +1 -0
- package/dist/digest-BarSh-pN.mjs +194 -0
- package/dist/digest-BarSh-pN.mjs.map +1 -0
- package/dist/direct-executor-BmuFJJZV.mjs +104 -0
- package/dist/direct-executor-BmuFJJZV.mjs.map +1 -0
- package/dist/dist-BNwANFJR.mjs +810 -0
- package/dist/dist-BNwANFJR.mjs.map +1 -0
- package/dist/email-console-bJn3ctqA.mjs +50 -0
- package/dist/email-console-bJn3ctqA.mjs.map +1 -0
- package/dist/email-locale-CN6WAMx0.mjs +25 -0
- package/dist/email-locale-CN6WAMx0.mjs.map +1 -0
- package/dist/emdash-runtime-DAjghyEG.mjs +4186 -0
- package/dist/emdash-runtime-DAjghyEG.mjs.map +1 -0
- package/dist/enrich-Dl3kZ-lP.mjs +194 -0
- package/dist/enrich-Dl3kZ-lP.mjs.map +1 -0
- package/dist/entry-lock-BJYdBfXb.mjs +1097 -0
- package/dist/entry-lock-BJYdBfXb.mjs.map +1 -0
- package/dist/entry-lock-DHQOxN7R.mjs +163 -0
- package/dist/entry-lock-DHQOxN7R.mjs.map +1 -0
- package/dist/entry-lock-DVhCt49A.d.mts +4368 -0
- package/dist/entry-lock-DVhCt49A.d.mts.map +1 -0
- package/dist/entry-locks-D0foLdjQ.mjs +167 -0
- package/dist/entry-locks-D0foLdjQ.mjs.map +1 -0
- package/dist/error-CfvOHP0M.mjs +90 -0
- package/dist/error-CfvOHP0M.mjs.map +1 -0
- package/dist/errors-BF0_LFhW.mjs +460 -0
- package/dist/errors-BF0_LFhW.mjs.map +1 -0
- package/dist/errors-DgE1zJGG.mjs +120 -0
- package/dist/errors-DgE1zJGG.mjs.map +1 -0
- package/dist/escape-CuaZhZvL.mjs +9 -0
- package/dist/escape-CuaZhZvL.mjs.map +1 -0
- package/dist/fence-CMDXJYc_.mjs +162 -0
- package/dist/fence-CMDXJYc_.mjs.map +1 -0
- package/dist/field-defs-cache-HIgBbqZZ.mjs +77 -0
- package/dist/field-defs-cache-HIgBbqZZ.mjs.map +1 -0
- package/dist/fts-manager-S-K0laoS.mjs +443 -0
- package/dist/fts-manager-S-K0laoS.mjs.map +1 -0
- package/dist/gc-DjKY0Ay1.mjs +75 -0
- package/dist/gc-DjKY0Ay1.mjs.map +1 -0
- package/dist/hash-SDAW6zC-.mjs +37 -0
- package/dist/hash-SDAW6zC-.mjs.map +1 -0
- package/dist/hook-result-B5bXDgS2.d.mts +31 -0
- package/dist/hook-result-B5bXDgS2.d.mts.map +1 -0
- package/dist/hreflang-D5uNnsGJ.d.mts +50 -0
- package/dist/hreflang-D5uNnsGJ.d.mts.map +1 -0
- package/dist/hreflang-DMFBL2eb.mjs +105 -0
- package/dist/hreflang-DMFBL2eb.mjs.map +1 -0
- package/dist/http-route-dispatch-BitqzwMy.mjs +339 -0
- package/dist/http-route-dispatch-BitqzwMy.mjs.map +1 -0
- package/dist/identity-IyNWwXr6.mjs +35 -0
- package/dist/identity-IyNWwXr6.mjs.map +1 -0
- package/dist/import-C3JZplWq.mjs +2020 -0
- package/dist/import-C3JZplWq.mjs.map +1 -0
- package/dist/index-D-hdtLe8.d.mts +623 -0
- package/dist/index-D-hdtLe8.d.mts.map +1 -0
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +105 -93
- package/dist/install-finalization-DfM1fj5x.mjs +58 -0
- package/dist/install-finalization-DfM1fj5x.mjs.map +1 -0
- package/dist/keys-yxLm5l35.mjs +61 -0
- package/dist/keys-yxLm5l35.mjs.map +1 -0
- package/dist/kinds-CRu_T5T5.mjs +961 -0
- package/dist/kinds-CRu_T5T5.mjs.map +1 -0
- package/dist/lifecycle-BzeGPeQ-.mjs +25 -0
- package/dist/lifecycle-BzeGPeQ-.mjs.map +1 -0
- package/dist/load-XgJiE6_3.mjs +28 -0
- package/dist/load-XgJiE6_3.mjs.map +1 -0
- package/dist/loader-BzqeR1ZN.mjs +1086 -0
- package/dist/loader-BzqeR1ZN.mjs.map +1 -0
- package/dist/loops-BQSzv5Zn.mjs +203 -0
- package/dist/loops-BQSzv5Zn.mjs.map +1 -0
- package/dist/manifest-builder-B8zR-73J.mjs +189 -0
- package/dist/manifest-builder-B8zR-73J.mjs.map +1 -0
- package/dist/manifest-schema-CY3zng_M.mjs +492 -0
- package/dist/manifest-schema-CY3zng_M.mjs.map +1 -0
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +3 -3
- 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 +15 -16
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media-Pu1L6xir.mjs +408 -0
- package/dist/media-Pu1L6xir.mjs.map +1 -0
- package/dist/media-Qp5S3eH3.mjs +355 -0
- package/dist/media-Qp5S3eH3.mjs.map +1 -0
- package/dist/media-allowlist-BSoa9Vvm.mjs +44 -0
- package/dist/media-allowlist-BSoa9Vvm.mjs.map +1 -0
- package/dist/media-folders-BE0oo2eX.mjs +210 -0
- package/dist/media-folders-BE0oo2eX.mjs.map +1 -0
- package/dist/media-h7tOiDLj.mjs +221 -0
- package/dist/media-h7tOiDLj.mjs.map +1 -0
- package/dist/media-url-jArBpzIG.mjs +43 -0
- package/dist/media-url-jArBpzIG.mjs.map +1 -0
- package/dist/media-usage-My-Vi-ex.mjs +1629 -0
- package/dist/media-usage-My-Vi-ex.mjs.map +1 -0
- package/dist/media-usage-activation-HKp7zk7W.mjs +78 -0
- package/dist/media-usage-activation-HKp7zk7W.mjs.map +1 -0
- package/dist/media-usage-work-C2OZLCAd.mjs +586 -0
- package/dist/media-usage-work-C2OZLCAd.mjs.map +1 -0
- package/dist/media-usage-work-DwUNbgvS.mjs +152 -0
- package/dist/media-usage-work-DwUNbgvS.mjs.map +1 -0
- package/dist/menus-BM7BPLOb.mjs +139 -0
- package/dist/menus-BM7BPLOb.mjs.map +1 -0
- package/dist/menus-ITeAbcIF.mjs +753 -0
- package/dist/menus-ITeAbcIF.mjs.map +1 -0
- package/dist/menus-TsSGmSR4.mjs +3608 -0
- package/dist/menus-TsSGmSR4.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +5 -5
- package/dist/mime-ChLqYwDk.mjs +36 -0
- package/dist/mime-ChLqYwDk.mjs.map +1 -0
- package/dist/mode-CCuKXUci.mjs +23 -0
- package/dist/mode-CCuKXUci.mjs.map +1 -0
- package/dist/node-sqlite-compat-CONMsl-x.mjs +46 -0
- package/dist/node-sqlite-compat-CONMsl-x.mjs.map +1 -0
- package/dist/normalize-CO2P8-iE.mjs +191 -0
- package/dist/normalize-CO2P8-iE.mjs.map +1 -0
- package/dist/oauth-authorization-DlMIL5_h.mjs +274 -0
- package/dist/oauth-authorization-DlMIL5_h.mjs.map +1 -0
- package/dist/oauth-clients-Djq9r_KP.mjs +266 -0
- package/dist/oauth-clients-Djq9r_KP.mjs.map +1 -0
- package/dist/oauth-state-store-BbjnZXNC.mjs +50 -0
- package/dist/oauth-state-store-BbjnZXNC.mjs.map +1 -0
- package/dist/oauth-user-lookup-vue9a64A.mjs +26 -0
- package/dist/oauth-user-lookup-vue9a64A.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/object-cache-CqWNY5uP.mjs +582 -0
- package/dist/object-cache-CqWNY5uP.mjs.map +1 -0
- package/dist/options-DhrI7eMv.mjs +208 -0
- package/dist/options-DhrI7eMv.mjs.map +1 -0
- package/dist/options-SQCHQCPH.d.mts +81 -0
- package/dist/options-SQCHQCPH.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +9 -9
- package/dist/parse-CVgO-Qai.d.mts +168 -0
- package/dist/parse-CVgO-Qai.d.mts.map +1 -0
- package/dist/parse-DY6OD1j_.mjs +81 -0
- package/dist/parse-DY6OD1j_.mjs.map +1 -0
- package/dist/passkey-config-X_H8128a.mjs +46 -0
- package/dist/passkey-config-X_H8128a.mjs.map +1 -0
- package/dist/paths-JxokKIbr.mjs +77 -0
- package/dist/paths-JxokKIbr.mjs.map +1 -0
- package/dist/patterns-BhAvqO0S.mjs +145 -0
- package/dist/patterns-BhAvqO0S.mjs.map +1 -0
- package/dist/placeholder-MSEd8gty.d.mts +306 -0
- package/dist/placeholder-MSEd8gty.d.mts.map +1 -0
- package/dist/plan-xjcWrAah.mjs +135 -0
- package/dist/plan-xjcWrAah.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +38 -15
- package/dist/plugin-test-runtime.d.mts.map +1 -1
- package/dist/plugin-test-runtime.mjs +112 -99
- 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.mjs +3 -3
- package/dist/plugins/host.d.mts +5 -5
- package/dist/plugins/host.mjs +45 -37
- package/dist/plugins-DUXUt8B9.mjs +277 -0
- package/dist/plugins-DUXUt8B9.mjs.map +1 -0
- package/dist/policy-CUvwAARc.mjs +45 -0
- package/dist/policy-CUvwAARc.mjs.map +1 -0
- package/dist/portable-text-5O_ZGUjB.mjs +307 -0
- package/dist/portable-text-5O_ZGUjB.mjs.map +1 -0
- package/dist/preview-CIUcPYr6.mjs +107 -0
- package/dist/preview-CIUcPYr6.mjs.map +1 -0
- package/dist/protocol-B97DZaFr.d.mts +61 -0
- package/dist/protocol-B97DZaFr.d.mts.map +1 -0
- package/dist/public-submission-BFBUrqst.mjs +250 -0
- package/dist/public-submission-BFBUrqst.mjs.map +1 -0
- package/dist/public-url-Bn7U0D7-.mjs +101 -0
- package/dist/public-url-Bn7U0D7-.mjs.map +1 -0
- package/dist/query-B48peoRT.mjs +890 -0
- package/dist/query-B48peoRT.mjs.map +1 -0
- package/dist/query-C4IH0uhR.mjs +41 -0
- package/dist/query-C4IH0uhR.mjs.map +1 -0
- package/dist/rate-limit-BZ6nybgc.mjs +120 -0
- package/dist/rate-limit-BZ6nybgc.mjs.map +1 -0
- package/dist/receipt-B4wJj5Jq.mjs +43 -0
- package/dist/receipt-B4wJj5Jq.mjs.map +1 -0
- package/dist/redirect-Cd1E7VUt.mjs +17 -0
- package/dist/redirect-Cd1E7VUt.mjs.map +1 -0
- package/dist/redirect-iJf5fltD.mjs +415 -0
- package/dist/redirect-iJf5fltD.mjs.map +1 -0
- package/dist/redirects-CYu1u1aK.mjs +446 -0
- package/dist/redirects-CYu1u1aK.mjs.map +1 -0
- package/dist/redirects-Cv9apQKj.mjs +148 -0
- package/dist/redirects-Cv9apQKj.mjs.map +1 -0
- package/dist/registry/testing.mjs +3 -3
- package/dist/relation-M4NUCb0b.mjs +334 -0
- package/dist/relation-M4NUCb0b.mjs.map +1 -0
- package/dist/relations-CCif47Oq.mjs +403 -0
- package/dist/relations-CCif47Oq.mjs.map +1 -0
- package/dist/relations-CK9CYUyr.mjs +310 -0
- package/dist/relations-CK9CYUyr.mjs.map +1 -0
- package/dist/request-cache-DzLYKm_x.mjs +104 -0
- package/dist/request-cache-DzLYKm_x.mjs.map +1 -0
- package/dist/request-context.d.mts +1 -1
- package/dist/request-meta-sZXt3sRo.mjs +141 -0
- package/dist/request-meta-sZXt3sRo.mjs.map +1 -0
- package/dist/resolve-2WbQsCvT.mjs +199 -0
- package/dist/resolve-2WbQsCvT.mjs.map +1 -0
- package/dist/route-wire--1hLuACz.mjs +197 -0
- package/dist/route-wire--1hLuACz.mjs.map +1 -0
- package/dist/routes-CUsM40Cc.mjs +272 -0
- package/dist/routes-CUsM40Cc.mjs.map +1 -0
- package/dist/runner-1y4J9fJB.mjs +5742 -0
- package/dist/runner-1y4J9fJB.mjs.map +1 -0
- package/dist/runner-D5_LzKXI.d.mts +68 -0
- package/dist/runner-D5_LzKXI.d.mts.map +1 -0
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +4 -4
- package/dist/schema-BABiRdsH.mjs +13 -0
- package/dist/schema-BABiRdsH.mjs.map +1 -0
- package/dist/schema-Du3MzCG0.mjs +446 -0
- package/dist/schema-Du3MzCG0.mjs.map +1 -0
- package/dist/scopes-Dbk-ElhT.mjs +34 -0
- package/dist/scopes-Dbk-ElhT.mjs.map +1 -0
- package/dist/search-Bt1PL1jf.mjs +448 -0
- package/dist/search-Bt1PL1jf.mjs.map +1 -0
- package/dist/secrets-CIi0nFiR.mjs +341 -0
- package/dist/secrets-CIi0nFiR.mjs.map +1 -0
- package/dist/sections-Ddptx_o9.mjs +346 -0
- package/dist/sections-Ddptx_o9.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +35 -30
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +25 -21
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-CZT2oLtT.mjs +114 -0
- package/dist/seo-CZT2oLtT.mjs.map +1 -0
- package/dist/seo-D5w3-Azy.mjs +133 -0
- package/dist/seo-D5w3-Azy.mjs.map +1 -0
- package/dist/service-DuykXPyW.mjs +150 -0
- package/dist/service-DuykXPyW.mjs.map +1 -0
- package/dist/session-user-BhaVp8w0.mjs +51 -0
- package/dist/session-user-BhaVp8w0.mjs.map +1 -0
- package/dist/settings-2xNYr90o.mjs +51 -0
- package/dist/settings-2xNYr90o.mjs.map +1 -0
- package/dist/settings-CgjRWGW9.mjs +439 -0
- package/dist/settings-CgjRWGW9.mjs.map +1 -0
- package/dist/settings-DYidIB26.mjs +61 -0
- package/dist/settings-DYidIB26.mjs.map +1 -0
- package/dist/setup-complete-bOogcHWG.mjs +26 -0
- package/dist/setup-complete-bOogcHWG.mjs.map +1 -0
- package/dist/setup-nonce-0EGuKM4s.mjs +25 -0
- package/dist/setup-nonce-0EGuKM4s.mjs.map +1 -0
- package/dist/site-settings-DOgRUoFX.mjs +50 -0
- package/dist/site-settings-DOgRUoFX.mjs.map +1 -0
- package/dist/site-url-BU_bbxwj.mjs +16 -0
- package/dist/site-url-BU_bbxwj.mjs.map +1 -0
- package/dist/snapshot-CugwUqKQ.mjs +237 -0
- package/dist/snapshot-CugwUqKQ.mjs.map +1 -0
- package/dist/ssrf-CJUnJymJ.mjs +406 -0
- package/dist/ssrf-CJUnJymJ.mjs.map +1 -0
- package/dist/stage-DgrBz_du.mjs +662 -0
- package/dist/stage-DgrBz_du.mjs.map +1 -0
- package/dist/state-DDiPySSG.mjs +153 -0
- package/dist/state-DDiPySSG.mjs.map +1 -0
- package/dist/status-DZKIG4a9.mjs +30 -0
- package/dist/status-DZKIG4a9.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-Bdv7A62k.d.mts +1576 -0
- package/dist/storage-query-Bdv7A62k.d.mts.map +1 -0
- package/dist/tar-_1AgTYFu.mjs +449 -0
- package/dist/tar-_1AgTYFu.mjs.map +1 -0
- package/dist/target-_7pn2Gbg.mjs +27 -0
- package/dist/target-_7pn2Gbg.mjs.map +1 -0
- package/dist/taxonomies-C1IwNe8Q.mjs +697 -0
- package/dist/taxonomies-C1IwNe8Q.mjs.map +1 -0
- package/dist/taxonomies-C_XMoRcX.mjs +939 -0
- package/dist/taxonomies-C_XMoRcX.mjs.map +1 -0
- package/dist/taxonomy-C3Fu1YeH.mjs +525 -0
- package/dist/taxonomy-C3Fu1YeH.mjs.map +1 -0
- package/dist/tokens-u78jETkX.mjs +171 -0
- package/dist/tokens-u78jETkX.mjs.map +1 -0
- package/dist/transfer-BhUCrgDc.mjs +8675 -0
- package/dist/transfer-BhUCrgDc.mjs.map +1 -0
- package/dist/transfer-DIGvR9Af.mjs +166 -0
- package/dist/transfer-DIGvR9Af.mjs.map +1 -0
- package/dist/transfer-download-Pml7RMio.mjs +33 -0
- package/dist/transfer-download-Pml7RMio.mjs.map +1 -0
- package/dist/transformations-9gfpwY65.mjs +196 -0
- package/dist/transformations-9gfpwY65.mjs.map +1 -0
- package/dist/transport-BIfH7_hx.d.mts +42 -0
- package/dist/transport-BIfH7_hx.d.mts.map +1 -0
- package/dist/transport-DKWIq53q.mjs +136 -0
- package/dist/transport-DKWIq53q.mjs.map +1 -0
- package/dist/trusted-proxy-tKiVtyTD.mjs +51 -0
- package/dist/trusted-proxy-tKiVtyTD.mjs.map +1 -0
- package/dist/turnstile-DpsoyOfg.mjs +53 -0
- package/dist/turnstile-DpsoyOfg.mjs.map +1 -0
- package/dist/types-B4sUC2p1.d.mts +198 -0
- package/dist/types-B4sUC2p1.d.mts.map +1 -0
- package/dist/types-B7Lmsh1E.d.mts +887 -0
- package/dist/types-B7Lmsh1E.d.mts.map +1 -0
- package/dist/types-BZakh7Ym.mjs +22 -0
- package/dist/types-BZakh7Ym.mjs.map +1 -0
- package/dist/types-B_CppEmv.d.mts +264 -0
- package/dist/types-B_CppEmv.d.mts.map +1 -0
- package/dist/types-BcrBrE6-.mjs +159 -0
- package/dist/types-BcrBrE6-.mjs.map +1 -0
- package/dist/types-CAZgq9fO.d.mts +124 -0
- package/dist/types-CAZgq9fO.d.mts.map +1 -0
- package/dist/types-Cd-O03VG.d.mts +363 -0
- package/dist/types-Cd-O03VG.d.mts.map +1 -0
- package/dist/types-Cr-Kg-3D.d.mts +1641 -0
- package/dist/types-Cr-Kg-3D.d.mts.map +1 -0
- package/dist/types-D2fvWd1i.d.mts +359 -0
- package/dist/types-D2fvWd1i.d.mts.map +1 -0
- package/dist/types-D7HUsguf.mjs +77 -0
- package/dist/types-D7HUsguf.mjs.map +1 -0
- package/dist/types-DA1Te3Oy.d.mts +198 -0
- package/dist/types-DA1Te3Oy.d.mts.map +1 -0
- package/dist/types-DhV6Q5bP.mjs +18 -0
- package/dist/types-DhV6Q5bP.mjs.map +1 -0
- package/dist/types-DnnVSl6Y.d.mts +85 -0
- package/dist/types-DnnVSl6Y.d.mts.map +1 -0
- package/dist/types-VT4-BugW.mjs +16 -0
- package/dist/types-VT4-BugW.mjs.map +1 -0
- package/dist/upload-attempts-B68ZGNu9.mjs +32 -0
- package/dist/upload-attempts-B68ZGNu9.mjs.map +1 -0
- package/dist/url-pattern-CCeZMGOh.mjs +33 -0
- package/dist/url-pattern-CCeZMGOh.mjs.map +1 -0
- package/dist/user-DDSL-sGw.mjs +171 -0
- package/dist/user-DDSL-sGw.mjs.map +1 -0
- package/dist/utils-DdhmO9w9.mjs +439 -0
- package/dist/utils-DdhmO9w9.mjs.map +1 -0
- package/dist/validate-CHosPEhs.mjs +453 -0
- package/dist/validate-CHosPEhs.mjs.map +1 -0
- package/dist/validate-CM79QXYE.d.mts +432 -0
- package/dist/validate-CM79QXYE.d.mts.map +1 -0
- package/dist/validation-BFecQczG.mjs +218 -0
- package/dist/validation-BFecQczG.mjs.map +1 -0
- package/dist/version-BRZXVifl.mjs +9 -0
- package/dist/version-BRZXVifl.mjs.map +1 -0
- package/dist/version-DUQDHgrf.mjs +7 -0
- package/dist/version-DUQDHgrf.mjs.map +1 -0
- package/dist/widgets-WdV72brA.mjs +126 -0
- package/dist/widgets-WdV72brA.mjs.map +1 -0
- package/dist/wxr-taxonomies-BHTdqkmZ.d.mts +34 -0
- package/dist/wxr-taxonomies-BHTdqkmZ.d.mts.map +1 -0
- package/dist/wxr-taxonomies-DP6ESgMN.mjs +372 -0
- package/dist/wxr-taxonomies-DP6ESgMN.mjs.map +1 -0
- package/dist/zod-generator-D6uE4WiS.mjs +389 -0
- package/dist/zod-generator-D6uE4WiS.mjs.map +1 -0
- package/package.json +6 -5
- package/src/api/authorize.ts +17 -0
- package/src/api/email-locale.ts +24 -0
- package/src/api/errors.ts +16 -0
- package/src/api/handlers/api-tokens.ts +18 -3
- package/src/api/handlers/block-types.ts +129 -0
- package/src/api/handlers/bulk-tag.ts +309 -0
- package/src/api/handlers/comments.ts +0 -28
- package/src/api/handlers/index.ts +10 -0
- package/src/api/handlers/manifest.ts +8 -1
- package/src/api/handlers/marketplace.ts +22 -16
- package/src/api/handlers/media-usage.ts +31 -12
- package/src/api/handlers/media.ts +19 -14
- package/src/api/handlers/schema.ts +33 -8
- package/src/api/handlers/settings.ts +2 -2
- package/src/api/handlers/snapshot.ts +4 -0
- package/src/api/handlers/taxonomies.ts +132 -83
- package/src/api/handlers/transfer.ts +1347 -0
- package/src/api/handlers/validate-media-fields.ts +124 -12
- package/src/api/media-usage-write-fence.ts +5 -26
- package/src/api/openapi/document.ts +614 -5
- package/src/api/schemas/auth.ts +7 -1
- package/src/api/schemas/common.ts +5 -0
- package/src/api/schemas/content.ts +20 -1
- package/src/api/schemas/media-usage.ts +11 -0
- package/src/api/schemas/menus.ts +1 -1
- package/src/api/schemas/schema.ts +117 -0
- package/src/api/schemas/settings.ts +3 -3
- package/src/api/schemas/taxonomies.ts +18 -0
- package/src/api/schemas/transfer.ts +249 -0
- package/src/api/transfer-download.ts +36 -0
- package/src/api/types.ts +3 -0
- package/src/astro/integration/routes.ts +31 -0
- package/src/astro/integration/vite-config.ts +26 -0
- package/src/astro/middleware/auth.ts +30 -7
- package/src/astro/middleware/media-usage-write-fence.ts +106 -11
- package/src/astro/middleware/request-context.ts +16 -2
- package/src/astro/middleware.ts +38 -18
- package/src/astro/routes/admin.astro +3 -1
- package/src/astro/routes/api/admin/hooks/exclusive/index.ts +1 -5
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +4 -3
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +4 -3
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +4 -3
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +4 -3
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +4 -3
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +4 -3
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +3 -3
- package/src/astro/routes/api/admin/plugins/registry/install.ts +3 -3
- package/src/astro/routes/api/admin/plugins/registry/publisher-handle.ts +59 -0
- package/src/astro/routes/api/admin/transfer/[...path].ts +143 -0
- package/src/astro/routes/api/admin/transfer/approvals/[id]/approve.ts +35 -0
- package/src/astro/routes/api/admin/transfer/approvals/[id]/deny.ts +35 -0
- package/src/astro/routes/api/admin/transfer/approvals/index.ts +33 -0
- package/src/astro/routes/api/admin/transfer/capabilities.ts +36 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/advance.ts +34 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/archive.ts +35 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/files/[...path].ts +40 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/index.ts +25 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/manifest.ts +38 -0
- package/src/astro/routes/api/admin/transfer/exports/index.ts +64 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/abandon.ts +28 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/advance.ts +37 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/analyze.ts +51 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/cancel.ts +27 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/execute.ts +48 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/files/[...path].ts +54 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/index.ts +25 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/missing.ts +34 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/plan.ts +29 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/receipt.ts +25 -0
- package/src/astro/routes/api/admin/transfer/imports/index.ts +85 -0
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +9 -1
- package/src/astro/routes/api/auth/invite/index.ts +15 -1
- package/src/astro/routes/api/auth/magic-link/send.ts +9 -1
- package/src/astro/routes/api/auth/magic-link/verify.ts +37 -39
- package/src/astro/routes/api/auth/passkey/options.ts +2 -21
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +64 -13
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +16 -1
- package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +11 -4
- package/src/astro/routes/api/mcp.ts +1 -0
- package/src/astro/routes/api/media/[id].ts +5 -15
- package/src/astro/routes/api/media/file/[...key].ts +30 -5
- package/src/astro/routes/api/oauth/authorize.ts +4 -0
- package/src/astro/routes/api/schema/block-types/[slug]/index.ts +29 -0
- package/src/astro/routes/api/schema/block-types/[slug]/versions/[version]/activate.ts +31 -0
- package/src/astro/routes/api/schema/block-types/index.ts +29 -0
- package/src/astro/routes/api/taxonomies/bulk-tag.ts +29 -0
- package/src/astro/routes/api/typegen.ts +8 -4
- package/src/astro/types.ts +4 -0
- package/src/auth/api-tokens.ts +1 -0
- package/src/auth/rate-limit.ts +2 -1
- package/src/auth/scopes.ts +11 -0
- package/src/cleanup.ts +14 -0
- package/src/cli/client-factory.ts +6 -1
- package/src/cli/commands/export-seed.ts +41 -15
- package/src/cli/commands/seed.ts +6 -2
- package/src/cli/commands/site.ts +556 -0
- package/src/cli/index.ts +2 -0
- package/src/cli/site/archive.ts +273 -0
- package/src/cli/site/export.ts +311 -0
- package/src/cli/site/import.ts +815 -0
- package/src/cli/site/shared.ts +241 -0
- package/src/client/index.ts +414 -11
- package/src/client/portable-text.ts +41 -0
- package/src/comments/public-submission.ts +19 -11
- package/src/components/Blocks.astro +46 -0
- package/src/components/Gallery.astro +2 -1
- package/src/components/Image.astro +51 -6
- package/src/components/InlinePortableTextEditor.tsx +28 -18
- package/src/components/blocks.ts +44 -0
- package/src/components/index.ts +14 -4
- package/src/content/converters/gallery.ts +54 -16
- package/src/content/converters/image-link.ts +27 -0
- package/src/content/converters/index.ts +1 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +10 -7
- package/src/content/converters/prosemirror-to-portable-text.ts +14 -0
- package/src/content/converters/types.ts +17 -0
- package/src/database/content-datetime.ts +19 -2
- package/src/database/migrations/035_bounded_404_log.ts +28 -39
- package/src/database/migrations/081_redirect_write_guards.ts +7 -4
- package/src/database/migrations/083_block_types.ts +58 -0
- package/src/database/migrations/084_site_transfer.ts +264 -0
- package/src/database/migrations/085_taxonomy_def_groups.ts +155 -0
- package/src/database/migrations/runner.ts +6 -0
- package/src/database/repositories/audit.ts +10 -1
- package/src/database/repositories/byline.ts +4 -1
- package/src/database/repositories/content.ts +83 -11
- package/src/database/repositories/media-usage.ts +43 -13
- package/src/database/repositories/media.ts +32 -1
- package/src/database/repositories/options.ts +12 -0
- package/src/database/repositories/revision.ts +6 -3
- package/src/database/repositories/taxonomy-def.ts +126 -0
- package/src/database/repositories/taxonomy.ts +65 -26
- package/src/database/types.ts +133 -1
- package/src/db/sqlite.ts +1 -1
- package/src/emdash-runtime.ts +287 -51
- package/src/import/utils.ts +8 -1
- package/src/import/wxr-taxonomies.ts +11 -67
- package/src/index.ts +26 -1
- package/src/loader.ts +9 -5
- package/src/mcp/server.ts +521 -29
- package/src/mcp/transfer.ts +569 -0
- package/src/media/local-runtime.ts +5 -18
- package/src/media/upload-attempts.ts +5 -0
- package/src/media/url.ts +15 -0
- package/src/media/usage/content-fields.ts +69 -5
- package/src/media/usage/content-refresh.ts +13 -66
- package/src/media/usage/content-repair.ts +10 -2
- package/src/media/usage/extractor.ts +74 -3
- package/src/media/usage/projection-fingerprint.ts +14 -0
- package/src/media/usage/schema-invalidation.ts +72 -0
- package/src/media/usage/site-settings.ts +52 -0
- package/src/media/usage/types.ts +2 -0
- package/src/object-cache/index.ts +69 -4
- package/src/plugin-test-runtime.ts +1 -0
- package/src/plugins/context.ts +104 -56
- package/src/plugins/cron.ts +6 -4
- package/src/plugins/define-plugin.ts +11 -1
- package/src/plugins/email-console.ts +2 -0
- package/src/plugins/email.ts +16 -0
- package/src/plugins/hooks.ts +33 -9
- package/src/plugins/manifest-schema.ts +1 -0
- package/src/plugins/route-error.ts +57 -0
- package/src/plugins/routes.ts +5 -60
- package/src/plugins/sandbox/types.ts +22 -2
- package/src/plugins/types.ts +4 -0
- package/src/registry/artifact-fetch.ts +17 -4
- package/src/registry/publisher-handle.ts +273 -0
- package/src/schema/block-type-contract.ts +478 -0
- package/src/schema/block-type-registry.ts +689 -0
- package/src/schema/block-types.ts +110 -0
- package/src/schema/block-values.ts +293 -0
- package/src/schema/byline-registry.ts +1 -1
- package/src/schema/index.ts +28 -0
- package/src/schema/registry.ts +462 -12
- package/src/schema/types.ts +12 -1
- package/src/schema/zod-generator.ts +92 -9
- package/src/search/fts-manager.ts +40 -0
- package/src/seed/apply.ts +173 -49
- package/src/seed/types.ts +23 -3
- package/src/seed/validate.ts +131 -7
- package/src/settings/index.ts +32 -9
- package/src/settings/types.ts +15 -0
- package/src/taxonomies/index.ts +72 -83
- package/src/transfer/analyze/index.ts +45 -0
- package/src/transfer/analyze/issues.ts +55 -0
- package/src/transfer/analyze/plan.ts +327 -0
- package/src/transfer/analyze/read.ts +134 -0
- package/src/transfer/analyze/step.ts +551 -0
- package/src/transfer/analyze/target.ts +269 -0
- package/src/transfer/analyze/unique-keys.ts +228 -0
- package/src/transfer/analyze/validate.ts +1412 -0
- package/src/transfer/analyze/values.ts +227 -0
- package/src/transfer/analyze/write-rules.ts +196 -0
- package/src/transfer/audit.ts +38 -0
- package/src/transfer/auth.ts +25 -0
- package/src/transfer/container/tar.ts +242 -0
- package/src/transfer/domain.ts +248 -0
- package/src/transfer/errors.ts +134 -0
- package/src/transfer/export/exporter.ts +1067 -0
- package/src/transfer/export/fence.ts +84 -0
- package/src/transfer/export/media.ts +165 -0
- package/src/transfer/export/readers.ts +1164 -0
- package/src/transfer/export/verify.ts +677 -0
- package/src/transfer/fence.ts +193 -0
- package/src/transfer/format/canonical.ts +151 -0
- package/src/transfer/format/column-codec.ts +275 -0
- package/src/transfer/format/columns.ts +707 -0
- package/src/transfer/format/digest.ts +287 -0
- package/src/transfer/format/features.ts +91 -0
- package/src/transfer/format/issues.ts +39 -0
- package/src/transfer/format/kinds.ts +936 -0
- package/src/transfer/format/limits.ts +87 -0
- package/src/transfer/format/manifest.ts +297 -0
- package/src/transfer/format/media-refs.ts +716 -0
- package/src/transfer/format/paths.ts +73 -0
- package/src/transfer/format/plan.ts +162 -0
- package/src/transfer/format/receipt.ts +43 -0
- package/src/transfer/format/records.ts +127 -0
- package/src/transfer/format/settings.ts +94 -0
- package/src/transfer/format/transformations.ts +260 -0
- package/src/transfer/format/version.ts +9 -0
- package/src/transfer/gc.ts +103 -0
- package/src/transfer/import/advance.ts +522 -0
- package/src/transfer/import/context.ts +281 -0
- package/src/transfer/import/entries.ts +186 -0
- package/src/transfer/import/ids.ts +40 -0
- package/src/transfer/import/index.ts +15 -0
- package/src/transfer/import/media.ts +141 -0
- package/src/transfer/import/rebuild.ts +300 -0
- package/src/transfer/import/rows.ts +114 -0
- package/src/transfer/import/scaffold.ts +221 -0
- package/src/transfer/import/sql.ts +134 -0
- package/src/transfer/import/stages.ts +329 -0
- package/src/transfer/import/writers.ts +370 -0
- package/src/transfer/index.ts +472 -0
- package/src/transfer/ops/approvals.ts +359 -0
- package/src/transfer/ops/budget.ts +82 -0
- package/src/transfer/ops/collation.ts +21 -0
- package/src/transfer/ops/identity-map.ts +142 -0
- package/src/transfer/ops/media-blobs.ts +135 -0
- package/src/transfer/ops/operations.ts +842 -0
- package/src/transfer/ops/package-index.ts +159 -0
- package/src/transfer/ops/staged-files.ts +231 -0
- package/src/transfer/ops/states.ts +265 -0
- package/src/transfer/ops/time.ts +54 -0
- package/src/transfer/schema-importer.ts +34 -0
- package/src/transfer/site-id.ts +30 -0
- package/src/transfer/staging/assembler.ts +217 -0
- package/src/transfer/staging/keys.ts +94 -0
- package/src/transfer/staging/package.ts +229 -0
- package/src/transfer/staging/stage.ts +231 -0
- package/src/ui.ts +19 -0
- package/src/visual-editing/toolbar.ts +125 -37
- package/dist/action-token-On1sot_c.mjs +0 -26
- package/dist/action-token-On1sot_c.mjs.map +0 -1
- package/dist/activation-CaMfdBt1.mjs +0 -382
- package/dist/activation-CaMfdBt1.mjs.map +0 -1
- package/dist/adapters-Cq10K4_c.d.mts +0 -171
- package/dist/adapters-Cq10K4_c.d.mts.map +0 -1
- package/dist/allowed-origins-1Sa-2wZK.mjs +0 -116
- package/dist/allowed-origins-1Sa-2wZK.mjs.map +0 -1
- package/dist/api-DmjKxPCY.mjs +0 -4831
- package/dist/api-DmjKxPCY.mjs.map +0 -1
- package/dist/api-tokens-BIXItFKV.mjs +0 -163
- package/dist/api-tokens-BIXItFKV.mjs.map +0 -1
- package/dist/api-tokens-DS1VzN7_.mjs +0 -3
- package/dist/apply-drpfmqrR.mjs +0 -1005
- package/dist/apply-drpfmqrR.mjs.map +0 -1
- package/dist/artifact-fetch-COiMhVgk.mjs +0 -813
- package/dist/artifact-fetch-COiMhVgk.mjs.map +0 -1
- package/dist/authoritative-records-DbqshfKD.mjs +0 -5172
- package/dist/authoritative-records-DbqshfKD.mjs.map +0 -1
- package/dist/authorize-BXpfMpp0.mjs +0 -40
- package/dist/authorize-BXpfMpp0.mjs.map +0 -1
- package/dist/backup-BsPQdwnS.mjs +0 -246
- package/dist/backup-BsPQdwnS.mjs.map +0 -1
- package/dist/byline-Doh-wt99.mjs +0 -906
- package/dist/byline-Doh-wt99.mjs.map +0 -1
- package/dist/byline-fields-CsrdvaLV.mjs +0 -123
- package/dist/byline-fields-CsrdvaLV.mjs.map +0 -1
- package/dist/byline-registry-D6lWzXk6.mjs +0 -406
- package/dist/byline-registry-D6lWzXk6.mjs.map +0 -1
- package/dist/bylines-Cop0hkoy.mjs +0 -214
- package/dist/bylines-Cop0hkoy.mjs.map +0 -1
- package/dist/bylines-kpBzHPr8.mjs +0 -232
- package/dist/bylines-kpBzHPr8.mjs.map +0 -1
- package/dist/cache-B0pOlXdM.mjs +0 -108
- package/dist/cache-B0pOlXdM.mjs.map +0 -1
- package/dist/capture-triggers-gxQxnxrJ.mjs +0 -362
- package/dist/capture-triggers-gxQxnxrJ.mjs.map +0 -1
- package/dist/challenge-store-CkRdSdd8.mjs +0 -51
- package/dist/challenge-store-CkRdSdd8.mjs.map +0 -1
- package/dist/checksum-Bsi2D9M1.mjs +0 -162
- package/dist/checksum-Bsi2D9M1.mjs.map +0 -1
- package/dist/chrome-tags-D7LGB91U.mjs +0 -24
- package/dist/chrome-tags-D7LGB91U.mjs.map +0 -1
- package/dist/chunks-BmWyou79.mjs +0 -25
- package/dist/chunks-BmWyou79.mjs.map +0 -1
- package/dist/collection-deletion-C3Xixmkx.mjs +0 -436
- package/dist/collection-deletion-C3Xixmkx.mjs.map +0 -1
- package/dist/collection-slugs-cache-D9auiKmI.mjs +0 -85
- package/dist/collection-slugs-cache-D9auiKmI.mjs.map +0 -1
- package/dist/comment-DcT8qdPK.mjs +0 -313
- package/dist/comment-DcT8qdPK.mjs.map +0 -1
- package/dist/comment-reaction-DY5-y8Y5.mjs +0 -85
- package/dist/comment-reaction-DY5-y8Y5.mjs.map +0 -1
- package/dist/comments-B67VRNGw.mjs +0 -204
- package/dist/comments-B67VRNGw.mjs.map +0 -1
- package/dist/comments-BVzzt6x5.mjs +0 -99
- package/dist/comments-BVzzt6x5.mjs.map +0 -1
- package/dist/components-DIl9Qzh6.mjs +0 -108
- package/dist/components-DIl9Qzh6.mjs.map +0 -1
- package/dist/config-B2acLeC5.mjs +0 -242
- package/dist/config-B2acLeC5.mjs.map +0 -1
- package/dist/config-CGVeT8Hc.mjs +0 -73
- package/dist/config-CGVeT8Hc.mjs.map +0 -1
- package/dist/config-D3HhLON3.d.mts +0 -39
- package/dist/config-D3HhLON3.d.mts.map +0 -1
- package/dist/config-DS7e4EZ9.d.mts +0 -6387
- package/dist/config-DS7e4EZ9.d.mts.map +0 -1
- package/dist/content-DZ3B5qtA.mjs +0 -2216
- package/dist/content-DZ3B5qtA.mjs.map +0 -1
- package/dist/content-list-query-CbPdzsna.d.mts +0 -26
- package/dist/content-list-query-CbPdzsna.d.mts.map +0 -1
- package/dist/content-policy-CM4skrNi.mjs +0 -46
- package/dist/content-policy-CM4skrNi.mjs.map +0 -1
- package/dist/content-refresh-BHLHJgyt.mjs +0 -3599
- package/dist/content-refresh-BHLHJgyt.mjs.map +0 -1
- package/dist/content-repair-BVll5WNl.mjs +0 -440
- package/dist/content-repair-BVll5WNl.mjs.map +0 -1
- package/dist/context-B195kjqZ.mjs +0 -1835
- package/dist/context-B195kjqZ.mjs.map +0 -1
- package/dist/cron-BcR3RN4K.mjs +0 -282
- package/dist/cron-BcR3RN4K.mjs.map +0 -1
- package/dist/dashboard-CZD4G7k_.mjs +0 -151
- package/dist/dashboard-CZD4G7k_.mjs.map +0 -1
- package/dist/default-BtlxWgh9.mjs +0 -81
- package/dist/default-BtlxWgh9.mjs.map +0 -1
- package/dist/deferred-tasks-Ba9fphlE.d.mts +0 -9
- package/dist/deferred-tasks-Ba9fphlE.d.mts.map +0 -1
- package/dist/device-flow-3E5l0fpH.mjs +0 -466
- package/dist/device-flow-3E5l0fpH.mjs.map +0 -1
- package/dist/dialect-helpers-CtYdsX4W.mjs +0 -307
- package/dist/dialect-helpers-CtYdsX4W.mjs.map +0 -1
- package/dist/direct-executor-ZI8E01Yt.mjs +0 -104
- package/dist/direct-executor-ZI8E01Yt.mjs.map +0 -1
- package/dist/dist-2hDLsLeq.mjs +0 -810
- package/dist/dist-2hDLsLeq.mjs.map +0 -1
- package/dist/email-console-gc-E3Eqj.mjs +0 -50
- package/dist/email-console-gc-E3Eqj.mjs.map +0 -1
- package/dist/emdash-runtime-DZGinqTL.mjs +0 -4041
- package/dist/emdash-runtime-DZGinqTL.mjs.map +0 -1
- package/dist/enrich-C2Mk0lwE.mjs +0 -194
- package/dist/enrich-C2Mk0lwE.mjs.map +0 -1
- package/dist/entry-lock-D3C99MXS.mjs +0 -1520
- package/dist/entry-lock-D3C99MXS.mjs.map +0 -1
- package/dist/entry-lock-D9rnj2Lu.mjs +0 -163
- package/dist/entry-lock-D9rnj2Lu.mjs.map +0 -1
- package/dist/entry-lock-DX7QkqEg.d.mts +0 -3503
- package/dist/entry-lock-DX7QkqEg.d.mts.map +0 -1
- package/dist/entry-locks-CO_KaoU5.mjs +0 -167
- package/dist/entry-locks-CO_KaoU5.mjs.map +0 -1
- package/dist/error-CCTCskie.mjs +0 -90
- package/dist/error-CCTCskie.mjs.map +0 -1
- package/dist/errors-W3PA8HqB.mjs +0 -447
- package/dist/errors-W3PA8HqB.mjs.map +0 -1
- package/dist/escape-DN4Qmjsl.mjs +0 -9
- package/dist/escape-DN4Qmjsl.mjs.map +0 -1
- package/dist/field-defs-cache-B337z8UJ.mjs +0 -77
- package/dist/field-defs-cache-B337z8UJ.mjs.map +0 -1
- package/dist/fts-manager-DMb0sbIQ.mjs +0 -413
- package/dist/fts-manager-DMb0sbIQ.mjs.map +0 -1
- package/dist/hash-CLVFzWvx.mjs +0 -37
- package/dist/hash-CLVFzWvx.mjs.map +0 -1
- package/dist/hook-result-KY1jq21o.d.mts +0 -31
- package/dist/hook-result-KY1jq21o.d.mts.map +0 -1
- package/dist/hreflang-BgS2FqhH.d.mts +0 -50
- package/dist/hreflang-BgS2FqhH.d.mts.map +0 -1
- package/dist/hreflang-CrJwqoeb.mjs +0 -105
- package/dist/hreflang-CrJwqoeb.mjs.map +0 -1
- package/dist/http-route-dispatch-DAKlanXb.mjs +0 -339
- package/dist/http-route-dispatch-DAKlanXb.mjs.map +0 -1
- package/dist/identity-DRGSHEEr.mjs +0 -35
- package/dist/identity-DRGSHEEr.mjs.map +0 -1
- package/dist/import-DFr5B_hC.mjs +0 -2020
- package/dist/import-DFr5B_hC.mjs.map +0 -1
- package/dist/index-CDwKDkTq.d.mts +0 -623
- package/dist/index-CDwKDkTq.d.mts.map +0 -1
- package/dist/install-finalization-5Os-QZ-2.mjs +0 -58
- package/dist/install-finalization-5Os-QZ-2.mjs.map +0 -1
- package/dist/lifecycle-7e-Lt_kX.mjs +0 -25
- package/dist/lifecycle-7e-Lt_kX.mjs.map +0 -1
- package/dist/load-Cu5bvCZh.mjs +0 -28
- package/dist/load-Cu5bvCZh.mjs.map +0 -1
- package/dist/loader-t4TxaFiQ.mjs +0 -1004
- package/dist/loader-t4TxaFiQ.mjs.map +0 -1
- package/dist/manifest-builder-D31UoJCu.mjs +0 -189
- package/dist/manifest-builder-D31UoJCu.mjs.map +0 -1
- package/dist/manifest-schema-Bkh8SeHd.mjs +0 -491
- package/dist/manifest-schema-Bkh8SeHd.mjs.map +0 -1
- package/dist/media-TBlKCwo7.mjs +0 -334
- package/dist/media-TBlKCwo7.mjs.map +0 -1
- package/dist/media-allowlist-s60eAIf6.mjs +0 -44
- package/dist/media-allowlist-s60eAIf6.mjs.map +0 -1
- package/dist/media-folders-ClIRLUQv.mjs +0 -210
- package/dist/media-folders-ClIRLUQv.mjs.map +0 -1
- package/dist/media-url-DY_ijO3B.mjs +0 -43
- package/dist/media-url-DY_ijO3B.mjs.map +0 -1
- package/dist/media-usage-C4NolTpQ.mjs +0 -1833
- package/dist/media-usage-C4NolTpQ.mjs.map +0 -1
- package/dist/media-usage-activation-CAhmb14O.mjs +0 -78
- package/dist/media-usage-activation-CAhmb14O.mjs.map +0 -1
- package/dist/media-usage-work-Cu5DqewW.mjs +0 -586
- package/dist/media-usage-work-Cu5DqewW.mjs.map +0 -1
- package/dist/media-usage-work-DJr3rOEN.mjs +0 -152
- package/dist/media-usage-work-DJr3rOEN.mjs.map +0 -1
- package/dist/media-usage-write-fence-DW5oHT7q.mjs +0 -42
- package/dist/media-usage-write-fence-DW5oHT7q.mjs.map +0 -1
- package/dist/menus-DbgU9z5Q.mjs +0 -3732
- package/dist/menus-DbgU9z5Q.mjs.map +0 -1
- package/dist/menus-Wy8m5NcH.mjs +0 -753
- package/dist/menus-Wy8m5NcH.mjs.map +0 -1
- package/dist/mime-CCYRC4r1.mjs +0 -36
- package/dist/mime-CCYRC4r1.mjs.map +0 -1
- package/dist/mode-CkmOhFqj.mjs +0 -23
- package/dist/mode-CkmOhFqj.mjs.map +0 -1
- package/dist/node-sqlite-compat-vpVaILnb.mjs +0 -46
- package/dist/node-sqlite-compat-vpVaILnb.mjs.map +0 -1
- package/dist/normalize-dChXQjwS.mjs +0 -191
- package/dist/normalize-dChXQjwS.mjs.map +0 -1
- package/dist/oauth-authorization-DZ-R-hmx.mjs +0 -274
- package/dist/oauth-authorization-DZ-R-hmx.mjs.map +0 -1
- package/dist/oauth-clients-BMPA8vjl.mjs +0 -266
- package/dist/oauth-clients-BMPA8vjl.mjs.map +0 -1
- package/dist/oauth-state-store-0gIdb48-.mjs +0 -50
- package/dist/oauth-state-store-0gIdb48-.mjs.map +0 -1
- package/dist/oauth-user-lookup-ChVW4UWu.mjs +0 -26
- package/dist/oauth-user-lookup-ChVW4UWu.mjs.map +0 -1
- package/dist/object-cache-DlSVbn5Y.mjs +0 -534
- package/dist/object-cache-DlSVbn5Y.mjs.map +0 -1
- package/dist/options-D5WcorD5.mjs +0 -200
- package/dist/options-D5WcorD5.mjs.map +0 -1
- package/dist/options-DAknChnw.d.mts +0 -77
- package/dist/options-DAknChnw.d.mts.map +0 -1
- package/dist/parse-Cr379Av9.mjs +0 -81
- package/dist/parse-Cr379Av9.mjs.map +0 -1
- package/dist/parse-tj9XLNO_.d.mts +0 -165
- package/dist/parse-tj9XLNO_.d.mts.map +0 -1
- package/dist/passkey-config-BD-wMaCf.mjs +0 -46
- package/dist/passkey-config-BD-wMaCf.mjs.map +0 -1
- package/dist/patterns-Do3iqi7N.mjs +0 -145
- package/dist/patterns-Do3iqi7N.mjs.map +0 -1
- package/dist/placeholder-CubPFn_L.d.mts +0 -306
- package/dist/placeholder-CubPFn_L.d.mts.map +0 -1
- package/dist/plugins-DHurtdXQ.mjs +0 -277
- package/dist/plugins-DHurtdXQ.mjs.map +0 -1
- package/dist/policy-lyZnjpwz.mjs +0 -45
- package/dist/policy-lyZnjpwz.mjs.map +0 -1
- package/dist/portable-text-oAwodbPS.mjs +0 -286
- package/dist/portable-text-oAwodbPS.mjs.map +0 -1
- package/dist/preview-Cup2bj8c.mjs +0 -107
- package/dist/preview-Cup2bj8c.mjs.map +0 -1
- package/dist/protocol-C1CNiKX4.d.mts +0 -61
- package/dist/protocol-C1CNiKX4.d.mts.map +0 -1
- package/dist/public-submission-Cs-pFMQK.mjs +0 -245
- package/dist/public-submission-Cs-pFMQK.mjs.map +0 -1
- package/dist/public-url-BWVHsfQv.mjs +0 -101
- package/dist/public-url-BWVHsfQv.mjs.map +0 -1
- package/dist/query-D-lxiOgn.mjs +0 -890
- package/dist/query-D-lxiOgn.mjs.map +0 -1
- package/dist/query-D7kHKOws.mjs +0 -41
- package/dist/query-D7kHKOws.mjs.map +0 -1
- package/dist/rate-limit-CqJn-w4h.mjs +0 -120
- package/dist/rate-limit-CqJn-w4h.mjs.map +0 -1
- package/dist/redirect-BrChFPIu.mjs +0 -17
- package/dist/redirect-BrChFPIu.mjs.map +0 -1
- package/dist/redirect-D2Yo-b6S.mjs +0 -415
- package/dist/redirect-D2Yo-b6S.mjs.map +0 -1
- package/dist/redirects-BCiTaIQ-.mjs +0 -146
- package/dist/redirects-BCiTaIQ-.mjs.map +0 -1
- package/dist/redirects-ByItliuu.mjs +0 -644
- package/dist/redirects-ByItliuu.mjs.map +0 -1
- package/dist/registry-CkuPoZs7.mjs +0 -1222
- package/dist/registry-CkuPoZs7.mjs.map +0 -1
- package/dist/relation-XTAtOpJO.mjs +0 -334
- package/dist/relation-XTAtOpJO.mjs.map +0 -1
- package/dist/relations-B4w-G5U9.mjs +0 -309
- package/dist/relations-B4w-G5U9.mjs.map +0 -1
- package/dist/relations-O63JWBRj.mjs +0 -403
- package/dist/relations-O63JWBRj.mjs.map +0 -1
- package/dist/request-cache-DaMhSQdx.mjs +0 -104
- package/dist/request-cache-DaMhSQdx.mjs.map +0 -1
- package/dist/request-meta-C8yl_sIs.mjs +0 -141
- package/dist/request-meta-C8yl_sIs.mjs.map +0 -1
- package/dist/resolve-BJIS8wKr.mjs +0 -199
- package/dist/resolve-BJIS8wKr.mjs.map +0 -1
- package/dist/route-wire-D66L2oaZ.mjs +0 -197
- package/dist/route-wire-D66L2oaZ.mjs.map +0 -1
- package/dist/routes-DYsTe-oR.mjs +0 -321
- package/dist/routes-DYsTe-oR.mjs.map +0 -1
- package/dist/runner-3gfxRsJG.d.mts +0 -68
- package/dist/runner-3gfxRsJG.d.mts.map +0 -1
- package/dist/runner-ClrleR8A.mjs +0 -5502
- package/dist/runner-ClrleR8A.mjs.map +0 -1
- package/dist/schema-CPhPM9Do.mjs +0 -420
- package/dist/schema-CPhPM9Do.mjs.map +0 -1
- package/dist/schema-DEERRrKS.mjs +0 -9
- package/dist/schema-DEERRrKS.mjs.map +0 -1
- package/dist/scopes-Bn8_rCSt.mjs +0 -27
- package/dist/scopes-Bn8_rCSt.mjs.map +0 -1
- package/dist/search-lami_Ota.mjs +0 -448
- package/dist/search-lami_Ota.mjs.map +0 -1
- package/dist/secrets-DNgVgz_e.mjs +0 -341
- package/dist/secrets-DNgVgz_e.mjs.map +0 -1
- package/dist/sections-BIpd4Cxf.mjs +0 -346
- package/dist/sections-BIpd4Cxf.mjs.map +0 -1
- package/dist/seo-BtU70b7l.mjs +0 -114
- package/dist/seo-BtU70b7l.mjs.map +0 -1
- package/dist/seo-_4qmazxz.mjs +0 -133
- package/dist/seo-_4qmazxz.mjs.map +0 -1
- package/dist/service-Bpy5iTX0.mjs +0 -150
- package/dist/service-Bpy5iTX0.mjs.map +0 -1
- package/dist/session-user-BQeS2Mrb.mjs +0 -51
- package/dist/session-user-BQeS2Mrb.mjs.map +0 -1
- package/dist/settings-DmroR53o.mjs +0 -420
- package/dist/settings-DmroR53o.mjs.map +0 -1
- package/dist/settings-g2F2a3Ub.mjs +0 -51
- package/dist/settings-g2F2a3Ub.mjs.map +0 -1
- package/dist/setup-complete-BrZaXpVV.mjs +0 -26
- package/dist/setup-complete-BrZaXpVV.mjs.map +0 -1
- package/dist/setup-nonce-Cb9-884O.mjs +0 -25
- package/dist/setup-nonce-Cb9-884O.mjs.map +0 -1
- package/dist/site-url-DjhYCaep.mjs +0 -16
- package/dist/site-url-DjhYCaep.mjs.map +0 -1
- package/dist/snapshot-C32Xuv3o.mjs +0 -233
- package/dist/snapshot-C32Xuv3o.mjs.map +0 -1
- package/dist/ssrf-Co1GGFZz.mjs +0 -406
- package/dist/ssrf-Co1GGFZz.mjs.map +0 -1
- package/dist/state-C7gCoiHr.mjs +0 -153
- package/dist/state-C7gCoiHr.mjs.map +0 -1
- package/dist/status-DLoBmcDz.mjs +0 -30
- package/dist/status-DLoBmcDz.mjs.map +0 -1
- package/dist/storage-query-CPctdMKX.d.mts +0 -1519
- package/dist/storage-query-CPctdMKX.d.mts.map +0 -1
- package/dist/target-CUKlGrXb.mjs +0 -27
- package/dist/target-CUKlGrXb.mjs.map +0 -1
- package/dist/taxonomies-BpqpXJUE.mjs +0 -707
- package/dist/taxonomies-BpqpXJUE.mjs.map +0 -1
- package/dist/taxonomies-ClCo4IGO.mjs +0 -899
- package/dist/taxonomies-ClCo4IGO.mjs.map +0 -1
- package/dist/taxonomy-Dj1vpw5E.mjs +0 -508
- package/dist/taxonomy-Dj1vpw5E.mjs.map +0 -1
- package/dist/tokens-Ns02GAma.mjs +0 -171
- package/dist/tokens-Ns02GAma.mjs.map +0 -1
- package/dist/transport-B8P1xsqk.mjs +0 -136
- package/dist/transport-B8P1xsqk.mjs.map +0 -1
- package/dist/transport-BLHZZcD_.d.mts +0 -42
- package/dist/transport-BLHZZcD_.d.mts.map +0 -1
- package/dist/trusted-proxy-Cg7SuD15.mjs +0 -51
- package/dist/trusted-proxy-Cg7SuD15.mjs.map +0 -1
- package/dist/turnstile-DWCSh_Qc.mjs +0 -53
- package/dist/turnstile-DWCSh_Qc.mjs.map +0 -1
- package/dist/types-B3RkqvDW.mjs +0 -156
- package/dist/types-B3RkqvDW.mjs.map +0 -1
- package/dist/types-BtuppOTV.mjs +0 -16
- package/dist/types-BtuppOTV.mjs.map +0 -1
- package/dist/types-CCR3ivXE.d.mts +0 -363
- package/dist/types-CCR3ivXE.d.mts.map +0 -1
- package/dist/types-CSHgU_-_.mjs +0 -18
- package/dist/types-CSHgU_-_.mjs.map +0 -1
- package/dist/types-CbwqGOXm.d.mts +0 -766
- package/dist/types-CbwqGOXm.d.mts.map +0 -1
- package/dist/types-D4RGIc2I.d.mts +0 -198
- package/dist/types-D4RGIc2I.d.mts.map +0 -1
- package/dist/types-DEHidMEk.d.mts +0 -1637
- package/dist/types-DEHidMEk.d.mts.map +0 -1
- package/dist/types-DQeU2SR7.d.mts +0 -279
- package/dist/types-DQeU2SR7.d.mts.map +0 -1
- package/dist/types-DxQWoQLA.d.mts +0 -264
- package/dist/types-DxQWoQLA.d.mts.map +0 -1
- package/dist/types-FBBnGZ2Y.d.mts +0 -198
- package/dist/types-FBBnGZ2Y.d.mts.map +0 -1
- package/dist/types-ZCnlropY.mjs +0 -69
- package/dist/types-ZCnlropY.mjs.map +0 -1
- package/dist/types-_Qtyawiy.d.mts +0 -124
- package/dist/types-_Qtyawiy.d.mts.map +0 -1
- package/dist/types-gC6FAoa_.d.mts +0 -75
- package/dist/types-gC6FAoa_.d.mts.map +0 -1
- package/dist/types-k--LneIF.mjs +0 -22
- package/dist/types-k--LneIF.mjs.map +0 -1
- package/dist/upload-attempts-2xdnoKGe.mjs +0 -27
- package/dist/upload-attempts-2xdnoKGe.mjs.map +0 -1
- package/dist/url-pattern-3m3reMzr.mjs +0 -33
- package/dist/url-pattern-3m3reMzr.mjs.map +0 -1
- package/dist/user-DroRntkx.mjs +0 -171
- package/dist/user-DroRntkx.mjs.map +0 -1
- package/dist/utils-CC2oNGV8.mjs +0 -435
- package/dist/utils-CC2oNGV8.mjs.map +0 -1
- package/dist/validate-BCP9HNDn.mjs +0 -384
- package/dist/validate-BCP9HNDn.mjs.map +0 -1
- package/dist/validate-CyQ7I3xF.d.mts +0 -410
- package/dist/validate-CyQ7I3xF.d.mts.map +0 -1
- package/dist/validation-DBy6WF94.mjs +0 -216
- package/dist/validation-DBy6WF94.mjs.map +0 -1
- package/dist/version-B57E4Uo7.mjs +0 -7
- package/dist/version-B57E4Uo7.mjs.map +0 -1
- package/dist/widgets-wQ7Xcgq8.mjs +0 -126
- package/dist/widgets-wQ7Xcgq8.mjs.map +0 -1
- package/dist/wxr-taxonomies-DIHfvEDt.mjs +0 -406
- package/dist/wxr-taxonomies-DIHfvEDt.mjs.map +0 -1
- package/dist/wxr-taxonomies-DU2ZSiGc.d.mts +0 -34
- package/dist/wxr-taxonomies-DU2ZSiGc.d.mts.map +0 -1
- package/dist/zod-generator-D_yHIWfs.mjs +0 -329
- package/dist/zod-generator-D_yHIWfs.mjs.map +0 -1
- /package/dist/{ssrf-BRpTDMV6.mjs → ssrf-DpBH7aOt.mjs} +0 -0
package/dist/loader-t4TxaFiQ.mjs
DELETED
|
@@ -1,1004 +0,0 @@
|
|
|
1
|
-
import { u as __exportAll } from "./runner-ClrleR8A.mjs";
|
|
2
|
-
import { n as isMissingTableError, t as isMissingColumnError } from "./db-errors-CBD5yMro.mjs";
|
|
3
|
-
import { t as validateIdentifier } from "./validate-DANX1-Qi.mjs";
|
|
4
|
-
import { l as isPostgres, n as buildStatusCondition } from "./dialect-helpers-CtYdsX4W.mjs";
|
|
5
|
-
import { r as getI18nConfig } from "./config-CGVeT8Hc.mjs";
|
|
6
|
-
import { getRequestContext } from "./request-context.mjs";
|
|
7
|
-
import { o as decodeCursor, s as encodeCursor } from "./types-BkUg2yHx.mjs";
|
|
8
|
-
import { i as setRequestCacheEntry } from "./request-cache-DaMhSQdx.mjs";
|
|
9
|
-
import { kyselyLogOption } from "./database/instrumentation.mjs";
|
|
10
|
-
import { Kysely, sql } from "kysely";
|
|
11
|
-
|
|
12
|
-
//#region src/page/seo-panel.ts
|
|
13
|
-
function seoPanelCacheKey(collection, id) {
|
|
14
|
-
return `seo-panel:${collection}:${id}`;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Prime the request-scoped SEO panel cache for a content entry.
|
|
18
|
-
*
|
|
19
|
-
* Called wherever an entry's folded SEO data materializes: the loader's
|
|
20
|
-
* single-entry path (fresh query) and the object-cache revive path in
|
|
21
|
-
* `getEmDashEntry` (warm hit, where the loader never runs). No-ops outside
|
|
22
|
-
* a request context; never overwrites an already-primed value.
|
|
23
|
-
*/
|
|
24
|
-
function primeSeoPanel(collection, id, seo) {
|
|
25
|
-
setRequestCacheEntry(seoPanelCacheKey(collection, id), seo);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/loader.ts
|
|
30
|
-
var loader_exports = /* @__PURE__ */ __exportAll({
|
|
31
|
-
CURSOR_RAW_VALUES: () => CURSOR_RAW_VALUES,
|
|
32
|
-
FOLDED_BYLINES: () => FOLDED_BYLINES,
|
|
33
|
-
FOLDED_BYLINES_EXIST: () => FOLDED_BYLINES_EXIST,
|
|
34
|
-
FOLDED_TERMS: () => FOLDED_TERMS,
|
|
35
|
-
buildTaxonomyPivotQuery: () => buildTaxonomyPivotQuery,
|
|
36
|
-
creditsFromFoldedBylines: () => creditsFromFoldedBylines,
|
|
37
|
-
emdashLoader: () => emdashLoader,
|
|
38
|
-
getDb: () => getDb,
|
|
39
|
-
resetTaxonomyNamesCache: () => resetTaxonomyNamesCache
|
|
40
|
-
});
|
|
41
|
-
const FIELD_NAME_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
42
|
-
/**
|
|
43
|
-
* SEO columns folded into the single-entry query as a single JSON column
|
|
44
|
-
* (`_emdash_seo` in the result set), then expanded onto the row under these
|
|
45
|
-
* aliases for `extractSeo()`. Surfacing SEO as one aggregated column keeps the
|
|
46
|
-
* result-set width bounded regardless of how many fields the collection has,
|
|
47
|
-
* which matters for D1: a flat `LEFT JOIN _emdash_seo` adds 5 alias columns to
|
|
48
|
-
* every row and pushes wide collections (common after WordPress / ACF imports)
|
|
49
|
-
* past D1's per-result-set column limit, surfacing as a silent null entry.
|
|
50
|
-
* One JSON column is one column, so the join stays safe at any schema width.
|
|
51
|
-
*
|
|
52
|
-
* The aliases mirror the strategy used by `foldedHydrationSelects` for byline
|
|
53
|
-
* and taxonomy hydration: aggregate in SQL, expand in JS. SEO is 1:1 with
|
|
54
|
-
* content, so the subquery uses `json_object` (not the array aggregator).
|
|
55
|
-
*
|
|
56
|
-
* The `_emdash_` prefix on the aliases guarantees they can never collide with
|
|
57
|
-
* a content field. Field slugs must match `/^[a-z][a-z0-9_]*$/`, so a user can
|
|
58
|
-
* legitimately define a `seo_title` field; surfacing the SEO column under its
|
|
59
|
-
* bare name would shadow that field in the result set and drop the user's
|
|
60
|
-
* value. The prefix (illegal as a leading slug char) sidesteps this entirely.
|
|
61
|
-
*/
|
|
62
|
-
const SEO_COLUMN_ALIASES = {
|
|
63
|
-
seo_title: "_emdash_seo_title",
|
|
64
|
-
seo_description: "_emdash_seo_description",
|
|
65
|
-
seo_image: "_emdash_seo_image",
|
|
66
|
-
seo_canonical: "_emdash_seo_canonical",
|
|
67
|
-
seo_no_index: "_emdash_seo_no_index"
|
|
68
|
-
};
|
|
69
|
-
/** Aliased SEO result keys — excluded from generic field mapping. */
|
|
70
|
-
const SEO_ALIAS_COLUMNS = Object.values(SEO_COLUMN_ALIASES);
|
|
71
|
-
/** Folded SEO JSON column name in the result set (expanded onto aliases in JS). */
|
|
72
|
-
const SEO_FOLDED_COLUMN = "_emdash_seo";
|
|
73
|
-
/** Folded boolean field slugs used to restore SQLite integer values. */
|
|
74
|
-
const BOOLEAN_FIELDS_FOLDED_COLUMN = "_emdash_boolean_fields";
|
|
75
|
-
/**
|
|
76
|
-
* System columns excluded from entry.data
|
|
77
|
-
* Note: slug is intentionally NOT excluded - it's useful as data.slug in templates
|
|
78
|
-
*/
|
|
79
|
-
const SYSTEM_COLUMNS = new Set([
|
|
80
|
-
"id",
|
|
81
|
-
"status",
|
|
82
|
-
"author_id",
|
|
83
|
-
"primary_byline_id",
|
|
84
|
-
"created_at",
|
|
85
|
-
"updated_at",
|
|
86
|
-
"published_at",
|
|
87
|
-
"scheduled_at",
|
|
88
|
-
"deleted_at",
|
|
89
|
-
"version",
|
|
90
|
-
"live_revision_id",
|
|
91
|
-
"draft_revision_id",
|
|
92
|
-
"locale",
|
|
93
|
-
"translation_group",
|
|
94
|
-
...SEO_ALIAS_COLUMNS,
|
|
95
|
-
"_emdash_terms",
|
|
96
|
-
"_emdash_bylines",
|
|
97
|
-
"_emdash_bylines_exist",
|
|
98
|
-
SEO_FOLDED_COLUMN,
|
|
99
|
-
BOOLEAN_FIELDS_FOLDED_COLUMN
|
|
100
|
-
]);
|
|
101
|
-
/** Markers for byline/taxonomy hydration folded into the content query. */
|
|
102
|
-
const FOLDED_TERMS = Symbol.for("emdash:foldedTerms");
|
|
103
|
-
const FOLDED_BYLINES = Symbol.for("emdash:foldedBylines");
|
|
104
|
-
/**
|
|
105
|
-
* Marker for whether `_emdash_bylines` has any rows at all (`false` = table
|
|
106
|
-
* empty). Lets byline hydration trust an empty fold instead of re-checking
|
|
107
|
-
* via the byline query path on sites that never use bylines.
|
|
108
|
-
*/
|
|
109
|
-
const FOLDED_BYLINES_EXIST = Symbol.for("emdash:foldedBylinesExist");
|
|
110
|
-
/**
|
|
111
|
-
* Correlated JSON-array subqueries that fold taxonomy-term and byline hydration
|
|
112
|
-
* into the content query, removing the two separate hydration round trips per
|
|
113
|
-
* fetch. `outer` is the content table's alias/name; each subquery correlates on
|
|
114
|
-
* `<outer>.id`, so the base query stays one row per entry (no join fan-out, no
|
|
115
|
-
* duplicated content payload). Order is NOT applied in the aggregate (it differs
|
|
116
|
-
* across dialects) — the consumer sorts terms by label and credits by sortOrder.
|
|
117
|
-
*
|
|
118
|
-
* Dialect-specific aggregation: SQLite `json_group_array`/`json_object` returns
|
|
119
|
-
* a JSON *string*; Postgres `json_agg`/`json_build_object` (coalesced to `[]`)
|
|
120
|
-
* returns parsed JSON. {@link stashFolded} handles both.
|
|
121
|
-
*/
|
|
122
|
-
function foldedHydrationSelects(db, type, outer) {
|
|
123
|
-
const o = sql.ref(outer);
|
|
124
|
-
const pg = isPostgres(db);
|
|
125
|
-
const obj = (pairs) => pg ? sql.raw(`json_build_object(${pairs})`) : sql.raw(`json_object(${pairs})`);
|
|
126
|
-
const agg = (inner) => pg ? sql`coalesce(json_agg(${inner}), '[]'::json)` : sql`json_group_array(${inner})`;
|
|
127
|
-
const foldJoin = pg ? sql`JOIN` : sql`CROSS JOIN`;
|
|
128
|
-
const termObj = obj("'id', coalesce(exact_term.id, default_term.id), 'name', coalesce(exact_term.name, default_term.name), 'slug', coalesce(exact_term.slug, default_term.slug), 'label', coalesce(exact_term.label, default_term.label), 'parent_id', coalesce(exact_term.parent_id, default_term.parent_id), 'locale', coalesce(exact_term.locale, default_term.locale), 'translation_group', coalesce(exact_term.translation_group, default_term.translation_group)");
|
|
129
|
-
const defaultLocale = getI18nConfig()?.defaultLocale ?? "en";
|
|
130
|
-
const selectedTermId = sql`coalesce(exact_term.id, default_term.id)`;
|
|
131
|
-
const terms = sql`(SELECT ${pg ? sql`coalesce(json_agg(${termObj}) FILTER (WHERE ${selectedTermId} IS NOT NULL), '[]'::json)` : sql`json_group_array(${termObj}) FILTER (WHERE ${selectedTermId} IS NOT NULL)`} FROM ${sql.ref("content_taxonomies")} AS ct LEFT JOIN ${sql.ref("taxonomies")} AS exact_term ON exact_term.translation_group = ct.taxonomy_id AND exact_term.locale = ${o}.locale LEFT JOIN ${sql.ref("taxonomies")} AS default_term ON default_term.translation_group = ct.taxonomy_id AND default_term.locale = ${defaultLocale} WHERE ct.collection = ${type} AND ct.entry_id = ${o}.translation_group) AS ${sql.ref("_emdash_terms")}`;
|
|
132
|
-
const bylineInner = obj("'id', b.id, 'slug', b.slug, 'displayName', b.display_name, 'bio', b.bio, 'avatarMediaId', b.avatar_media_id, 'avatarStorageKey', m.storage_key, 'avatarAlt', m.alt, 'avatarBlurhash', m.blurhash, 'avatarDominantColor', m.dominant_color, 'websiteUrl', b.website_url, 'userId', b.user_id, 'isGuest', b.is_guest, 'createdAt', b.created_at, 'updatedAt', b.updated_at, 'locale', b.locale, 'translationGroup', b.translation_group");
|
|
133
|
-
return {
|
|
134
|
-
terms,
|
|
135
|
-
bylines: sql`(SELECT ${agg(sql`${pg ? sql.raw("json_build_object('roleLabel', cb.role_label, 'sortOrder', cb.sort_order, 'byline', ") : sql.raw("json_object('roleLabel', cb.role_label, 'sortOrder', cb.sort_order, 'byline', ")}${bylineInner})`)} FROM ${sql.ref("_emdash_content_bylines")} AS cb ${foldJoin} ${sql.ref("_emdash_bylines")} AS b ON b.translation_group = cb.byline_id LEFT JOIN ${sql.ref("media")} AS m ON m.id = b.avatar_media_id WHERE cb.collection_slug = ${type} AND cb.content_id = ${o}.id AND b.locale = ${o}.locale) AS ${sql.ref("_emdash_bylines")}`,
|
|
136
|
-
bylinesExist: sql`(SELECT 1 FROM ${sql.ref("_emdash_bylines")} LIMIT 1) AS ${sql.ref("_emdash_bylines_exist")}`
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Correlated JSON-object subquery that folds per-entry SEO into the content
|
|
141
|
-
* query without widening the result set: 1 row of `_emdash_seo` becomes 1 JSON
|
|
142
|
-
* column rather than 5 flat columns. The JSON column is expanded onto the row
|
|
143
|
-
* via {@link expandFoldedSeo} after the query runs, preserving the alias keys
|
|
144
|
-
* that {@link extractSeo} reads. Missing SEO row (no entry in `_emdash_seo`)
|
|
145
|
-
* yields NULL, which {@link expandFoldedSeo} treats as "no SEO" - identical to
|
|
146
|
-
* the prior LEFT JOIN miss behavior.
|
|
147
|
-
*
|
|
148
|
-
* Dialect-specific aggregation mirrors {@link foldedHydrationSelects}: SQLite
|
|
149
|
-
* `json_object` returns a JSON *string*, Postgres `json_build_object` returns
|
|
150
|
-
* parsed JSON; both branches are handled in expansion.
|
|
151
|
-
*/
|
|
152
|
-
function foldedSeoSelect(db, type, outer) {
|
|
153
|
-
const o = sql.ref(outer);
|
|
154
|
-
const pg = isPostgres(db);
|
|
155
|
-
const pairs = "'seo_title', s.seo_title, 'seo_description', s.seo_description, 'seo_image', s.seo_image, 'seo_canonical', s.seo_canonical, 'seo_no_index', s.seo_no_index";
|
|
156
|
-
return sql`(SELECT ${pg ? sql.raw(`json_build_object(${pairs})`) : sql.raw(`json_object(${pairs})`)} FROM ${sql.ref("_emdash_seo")} AS s WHERE s.collection = ${type} AND s.content_id = ${o}.id LIMIT 1) AS ${sql.ref(SEO_FOLDED_COLUMN)}`;
|
|
157
|
-
}
|
|
158
|
-
function foldedBooleanFieldsSelect(db, type) {
|
|
159
|
-
return sql`(
|
|
160
|
-
SELECT ${isPostgres(db) ? sql`coalesce(json_agg(f.slug), '[]'::json)` : sql`json_group_array(f.slug)`}
|
|
161
|
-
FROM ${sql.ref("_emdash_fields")} AS f
|
|
162
|
-
INNER JOIN ${sql.ref("_emdash_collections")} AS c ON c.id = f.collection_id
|
|
163
|
-
WHERE c.slug = ${type} AND f.type = ${"boolean"}
|
|
164
|
-
) AS ${sql.ref(BOOLEAN_FIELDS_FOLDED_COLUMN)}`;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Expand the folded `_emdash_seo` JSON column onto the row using SEO_COLUMN_ALIASES,
|
|
168
|
-
* so {@link extractSeo} reads it transparently. SQLite returns a JSON string
|
|
169
|
-
* (parse it); Postgres returns already-parsed JSON. Missing/malformed/null is
|
|
170
|
-
* a no-op: {@link extractSeo} returns null when the aliases are absent.
|
|
171
|
-
*/
|
|
172
|
-
function isPlainObject(value) {
|
|
173
|
-
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
174
|
-
}
|
|
175
|
-
function expandFoldedSeo(row) {
|
|
176
|
-
const raw = row[SEO_FOLDED_COLUMN];
|
|
177
|
-
delete row[SEO_FOLDED_COLUMN];
|
|
178
|
-
let parsed = null;
|
|
179
|
-
if (typeof raw === "string") try {
|
|
180
|
-
const candidate = JSON.parse(raw);
|
|
181
|
-
if (isPlainObject(candidate)) parsed = candidate;
|
|
182
|
-
} catch {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
else if (isPlainObject(raw)) parsed = raw;
|
|
186
|
-
if (!parsed) return;
|
|
187
|
-
for (const [col, alias] of Object.entries(SEO_COLUMN_ALIASES)) row[alias] = parsed[col] ?? null;
|
|
188
|
-
}
|
|
189
|
-
function creditsFromFoldedBylines(folded) {
|
|
190
|
-
return folded.map((raw) => {
|
|
191
|
-
const credit = isPlainObject(raw) ? raw : {};
|
|
192
|
-
const byline = isPlainObject(credit.byline) ? credit.byline : {};
|
|
193
|
-
return {
|
|
194
|
-
roleLabel: typeof credit.roleLabel === "string" ? credit.roleLabel : null,
|
|
195
|
-
sortOrder: Number(credit.sortOrder ?? 0),
|
|
196
|
-
source: "explicit",
|
|
197
|
-
byline: {
|
|
198
|
-
...byline,
|
|
199
|
-
isGuest: Boolean(byline.isGuest),
|
|
200
|
-
customFields: {}
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
}).toSorted((a, b) => a.sortOrder - b.sortOrder);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Stash folded hydration JSON (non-enumerable) for the query.ts fast paths.
|
|
207
|
-
* SQLite returns a JSON string (parse it); Postgres returns already-parsed JSON.
|
|
208
|
-
*/
|
|
209
|
-
function stashFolded(data, row) {
|
|
210
|
-
for (const [col, sym] of [["_emdash_terms", FOLDED_TERMS], ["_emdash_bylines", FOLDED_BYLINES]]) {
|
|
211
|
-
const raw = row[col];
|
|
212
|
-
let value;
|
|
213
|
-
if (typeof raw === "string") try {
|
|
214
|
-
value = JSON.parse(raw);
|
|
215
|
-
} catch {
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
else if (Array.isArray(raw)) value = raw;
|
|
219
|
-
else continue;
|
|
220
|
-
Object.defineProperty(data, sym, {
|
|
221
|
-
value,
|
|
222
|
-
enumerable: false,
|
|
223
|
-
configurable: true
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
if ("_emdash_bylines_exist" in row) Object.defineProperty(data, FOLDED_BYLINES_EXIST, {
|
|
227
|
-
value: row["_emdash_bylines_exist"] != null,
|
|
228
|
-
enumerable: false,
|
|
229
|
-
configurable: true
|
|
230
|
-
});
|
|
231
|
-
const foldedBylines = Reflect.get(data, FOLDED_BYLINES);
|
|
232
|
-
if (!Array.isArray(foldedBylines)) return;
|
|
233
|
-
const credits = creditsFromFoldedBylines(foldedBylines);
|
|
234
|
-
data.bylines = credits;
|
|
235
|
-
data.byline = credits[0]?.byline ?? null;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Build a `data.seo` object from the joined `_emdash_seo` columns on a row.
|
|
239
|
-
*
|
|
240
|
-
* Returns `null` when no SEO row exists (LEFT JOIN miss → `seo_no_index` is
|
|
241
|
-
* NULL, since the column is `NOT NULL DEFAULT 0` whenever a row is present).
|
|
242
|
-
* Returning null keeps the `seo` key off entries that have none, so
|
|
243
|
-
* `getSeoMeta()` falls back to its defaults exactly as before.
|
|
244
|
-
*/
|
|
245
|
-
function extractSeo(row) {
|
|
246
|
-
const noIndex = row[SEO_COLUMN_ALIASES.seo_no_index];
|
|
247
|
-
if (noIndex === null || noIndex === void 0) return null;
|
|
248
|
-
const title = row[SEO_COLUMN_ALIASES.seo_title];
|
|
249
|
-
const description = row[SEO_COLUMN_ALIASES.seo_description];
|
|
250
|
-
const image = row[SEO_COLUMN_ALIASES.seo_image];
|
|
251
|
-
const canonical = row[SEO_COLUMN_ALIASES.seo_canonical];
|
|
252
|
-
return {
|
|
253
|
-
title: typeof title === "string" ? title : null,
|
|
254
|
-
description: typeof description === "string" ? description : null,
|
|
255
|
-
image: typeof image === "string" ? image : null,
|
|
256
|
-
canonical: typeof canonical === "string" ? canonical : null,
|
|
257
|
-
noIndex: noIndex === 1
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Get the table name for a collection type
|
|
262
|
-
*/
|
|
263
|
-
function getTableName(type) {
|
|
264
|
-
validateIdentifier(type, "collection type");
|
|
265
|
-
return `ec_${type}`;
|
|
266
|
-
}
|
|
267
|
-
const TAXONOMY_NAMES_CACHE_KEY = Symbol.for("emdash:taxonomy-names");
|
|
268
|
-
const taxonomyNamesStore = globalThis;
|
|
269
|
-
const taxonomyNamesHolder = taxonomyNamesStore[TAXONOMY_NAMES_CACHE_KEY] ?? (() => {
|
|
270
|
-
const holder = { cache: null };
|
|
271
|
-
taxonomyNamesStore[TAXONOMY_NAMES_CACHE_KEY] = holder;
|
|
272
|
-
return holder;
|
|
273
|
-
})();
|
|
274
|
-
function setTaxonomyNamesCache(cache) {
|
|
275
|
-
taxonomyNamesHolder.cache = cache;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Get taxonomy names attached to a collection (cached for the primary DB,
|
|
279
|
-
* bypassed only when the per-request DB is an isolated instance — playground /
|
|
280
|
-
* DO preview). Plain D1 Sessions routing shares schema with the singleton, so
|
|
281
|
-
* the isolate-wide cache stays valid.
|
|
282
|
-
*/
|
|
283
|
-
async function getTaxonomyNames(db, collection) {
|
|
284
|
-
const hasIsolatedDb = getRequestContext()?.dbIsIsolated === true;
|
|
285
|
-
if (!hasIsolatedDb && taxonomyNamesHolder.cache) return taxonomyNamesHolder.cache.get(collection) ?? /* @__PURE__ */ new Set();
|
|
286
|
-
try {
|
|
287
|
-
const defs = await db.selectFrom("_emdash_taxonomy_defs").select(["name", "collections"]).execute();
|
|
288
|
-
const namesByCollection = /* @__PURE__ */ new Map();
|
|
289
|
-
for (const def of defs) {
|
|
290
|
-
let collections;
|
|
291
|
-
try {
|
|
292
|
-
collections = JSON.parse(def.collections ?? "[]");
|
|
293
|
-
} catch {
|
|
294
|
-
continue;
|
|
295
|
-
}
|
|
296
|
-
if (!Array.isArray(collections)) continue;
|
|
297
|
-
for (const attachedCollection of collections) {
|
|
298
|
-
if (typeof attachedCollection !== "string") continue;
|
|
299
|
-
const names = namesByCollection.get(attachedCollection) ?? /* @__PURE__ */ new Set();
|
|
300
|
-
names.add(def.name);
|
|
301
|
-
namesByCollection.set(attachedCollection, names);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
if (!hasIsolatedDb) setTaxonomyNamesCache(namesByCollection);
|
|
305
|
-
return namesByCollection.get(collection) ?? /* @__PURE__ */ new Set();
|
|
306
|
-
} catch (error) {
|
|
307
|
-
if (!isMissingTableError(error) && !isMissingColumnError(error)) throw error;
|
|
308
|
-
const empty = /* @__PURE__ */ new Set();
|
|
309
|
-
if (!hasIsolatedDb) setTaxonomyNamesCache(/* @__PURE__ */ new Map());
|
|
310
|
-
return empty;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Reset the isolate-wide taxonomy-names cache.
|
|
315
|
-
*
|
|
316
|
-
* Called from `invalidateTaxonomyDefsCache()` so that creating or seeding a
|
|
317
|
-
* taxonomy definition is reflected within the current isolate instead of
|
|
318
|
-
* waiting for the isolate to recycle. Keeps this cache consistent with the
|
|
319
|
-
* isolate-wide taxonomy-defs cache in `taxonomies/index.ts`.
|
|
320
|
-
*/
|
|
321
|
-
function resetTaxonomyNamesCache() {
|
|
322
|
-
setTaxonomyNamesCache(null);
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* System columns to include in data (mapped to camelCase where needed)
|
|
326
|
-
*/
|
|
327
|
-
const INCLUDE_IN_DATA = {
|
|
328
|
-
id: "id",
|
|
329
|
-
status: "status",
|
|
330
|
-
author_id: "authorId",
|
|
331
|
-
primary_byline_id: "primaryBylineId",
|
|
332
|
-
created_at: "createdAt",
|
|
333
|
-
updated_at: "updatedAt",
|
|
334
|
-
published_at: "publishedAt",
|
|
335
|
-
scheduled_at: "scheduledAt",
|
|
336
|
-
draft_revision_id: "draftRevisionId",
|
|
337
|
-
live_revision_id: "liveRevisionId",
|
|
338
|
-
locale: "locale",
|
|
339
|
-
translation_group: "translationGroup"
|
|
340
|
-
};
|
|
341
|
-
/** System date columns that should be converted to Date objects */
|
|
342
|
-
const DATE_COLUMNS = new Set([
|
|
343
|
-
"created_at",
|
|
344
|
-
"updated_at",
|
|
345
|
-
"published_at",
|
|
346
|
-
"scheduled_at"
|
|
347
|
-
]);
|
|
348
|
-
/**
|
|
349
|
-
* Hidden, symbol-keyed property on each mapped data record carrying the raw
|
|
350
|
-
* DB string for every date column. Lets cursor encoders downstream reproduce
|
|
351
|
-
* the loader's exact `nextCursor` format without round-tripping through
|
|
352
|
-
* `new Date()`, which loses precision for stored values that aren't already
|
|
353
|
-
* ISO-with-milliseconds (e.g. `2026-01-01T00:00:00Z` becomes
|
|
354
|
-
* `2026-01-01T00:00:00.000Z`).
|
|
355
|
-
*/
|
|
356
|
-
const CURSOR_RAW_VALUES = Symbol("emdash:cursorRawValues");
|
|
357
|
-
const LOCAL_MEDIA_FILE_PREFIX = "/_emdash/api/media/file/";
|
|
358
|
-
const URL_SCHEME_PATTERN = /^[a-zA-Z][a-zA-Z\d+\-.]*:/;
|
|
359
|
-
/** Safely extract a string value from a record, returning fallback if not a string */
|
|
360
|
-
function rowStr(row, key, fallback = "") {
|
|
361
|
-
const val = row[key];
|
|
362
|
-
return typeof val === "string" ? val : fallback;
|
|
363
|
-
}
|
|
364
|
-
function isRecord(value) {
|
|
365
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
366
|
-
}
|
|
367
|
-
function isBareMediaKey(src) {
|
|
368
|
-
return !src.startsWith("/") && !URL_SCHEME_PATTERN.test(src);
|
|
369
|
-
}
|
|
370
|
-
function normalizeLocalMediaValue(value) {
|
|
371
|
-
if (Array.isArray(value)) return value.map(normalizeLocalMediaValue);
|
|
372
|
-
if (!isRecord(value)) return value;
|
|
373
|
-
const normalized = {};
|
|
374
|
-
for (const [key, child] of Object.entries(value)) normalized[key] = normalizeLocalMediaValue(child);
|
|
375
|
-
if (normalized.provider === "local" && typeof normalized.src === "string" && normalized.src.length > 0) {
|
|
376
|
-
const src = normalized.src;
|
|
377
|
-
if (src.startsWith(LOCAL_MEDIA_FILE_PREFIX)) {
|
|
378
|
-
const id = src.slice(24);
|
|
379
|
-
if (!normalized.id && id) normalized.id = id;
|
|
380
|
-
} else if (isBareMediaKey(src)) {
|
|
381
|
-
if (!normalized.id) normalized.id = src;
|
|
382
|
-
normalized.src = `${LOCAL_MEDIA_FILE_PREFIX}${src}`;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return normalized;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Map a database row to entry data
|
|
389
|
-
* Extracts content fields (non-system columns) and parses JSON where needed.
|
|
390
|
-
* System columns needed for templates (id, status, dates) are included with camelCase names.
|
|
391
|
-
*/
|
|
392
|
-
function mapRowToData(row, booleanFields) {
|
|
393
|
-
const data = {};
|
|
394
|
-
const rawDateValues = {};
|
|
395
|
-
for (const [key, value] of Object.entries(row)) {
|
|
396
|
-
if (key in INCLUDE_IN_DATA) {
|
|
397
|
-
if (DATE_COLUMNS.has(key)) if (typeof value === "string") {
|
|
398
|
-
rawDateValues[key] = value;
|
|
399
|
-
data[INCLUDE_IN_DATA[key]] = new Date(value);
|
|
400
|
-
} else data[INCLUDE_IN_DATA[key]] = null;
|
|
401
|
-
else data[INCLUDE_IN_DATA[key]] = value;
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
if (SYSTEM_COLUMNS.has(key)) continue;
|
|
405
|
-
if (booleanFields.has(key) && (typeof value === "boolean" || value === 0 || value === 1)) {
|
|
406
|
-
data[key] = Boolean(value);
|
|
407
|
-
continue;
|
|
408
|
-
}
|
|
409
|
-
if (typeof value === "string") try {
|
|
410
|
-
if (value.startsWith("{") || value.startsWith("[")) data[key] = normalizeLocalMediaValue(JSON.parse(value));
|
|
411
|
-
else data[key] = value;
|
|
412
|
-
} catch {
|
|
413
|
-
data[key] = value;
|
|
414
|
-
}
|
|
415
|
-
else data[key] = value;
|
|
416
|
-
}
|
|
417
|
-
Object.defineProperty(data, CURSOR_RAW_VALUES, {
|
|
418
|
-
value: rawDateValues,
|
|
419
|
-
enumerable: false,
|
|
420
|
-
configurable: false,
|
|
421
|
-
writable: false
|
|
422
|
-
});
|
|
423
|
-
return data;
|
|
424
|
-
}
|
|
425
|
-
function parseFoldedBooleanFields(row) {
|
|
426
|
-
const raw = row?.[BOOLEAN_FIELDS_FOLDED_COLUMN];
|
|
427
|
-
let values;
|
|
428
|
-
if (typeof raw === "string") try {
|
|
429
|
-
values = JSON.parse(raw);
|
|
430
|
-
} catch {
|
|
431
|
-
return /* @__PURE__ */ new Set();
|
|
432
|
-
}
|
|
433
|
-
else values = raw;
|
|
434
|
-
if (!Array.isArray(values)) return /* @__PURE__ */ new Set();
|
|
435
|
-
return new Set(values.filter((value) => typeof value === "string"));
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Map revision data (already-parsed JSON object) to entry data.
|
|
439
|
-
* Strips _-prefixed metadata keys (e.g. _slug) used internally by revisions.
|
|
440
|
-
*/
|
|
441
|
-
function mapRevisionData(data, booleanFields) {
|
|
442
|
-
const result = {};
|
|
443
|
-
for (const [key, value] of Object.entries(data)) {
|
|
444
|
-
if (key.startsWith("_")) continue;
|
|
445
|
-
if (booleanFields.has(key) && (typeof value === "boolean" || value === 0 || value === 1)) {
|
|
446
|
-
result[key] = Boolean(value);
|
|
447
|
-
continue;
|
|
448
|
-
}
|
|
449
|
-
result[key] = normalizeLocalMediaValue(value);
|
|
450
|
-
}
|
|
451
|
-
return result;
|
|
452
|
-
}
|
|
453
|
-
let virtualConfig;
|
|
454
|
-
let virtualCreateDialect;
|
|
455
|
-
async function loadVirtualModules() {
|
|
456
|
-
if (virtualConfig === void 0) virtualConfig = (await import("virtual:emdash/config")).default;
|
|
457
|
-
if (virtualCreateDialect === void 0) virtualCreateDialect = (await import("virtual:emdash/dialect")).createDialect;
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Get the primary sort field from an orderBy spec (first valid field, or default).
|
|
461
|
-
*/
|
|
462
|
-
function getPrimarySort(orderBy, tablePrefix) {
|
|
463
|
-
if (orderBy) {
|
|
464
|
-
for (const [field, direction] of Object.entries(orderBy)) if (FIELD_NAME_PATTERN.test(field)) return {
|
|
465
|
-
field: tablePrefix ? `${tablePrefix}.${field}` : field,
|
|
466
|
-
direction
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
return {
|
|
470
|
-
field: tablePrefix ? `${tablePrefix}.created_at` : "created_at",
|
|
471
|
-
direction: "desc"
|
|
472
|
-
};
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* Build ORDER BY clause from orderBy spec
|
|
476
|
-
* Validates field names to prevent SQL injection (alphanumeric + underscore only)
|
|
477
|
-
* Supports multiple sort fields in object key order
|
|
478
|
-
*/
|
|
479
|
-
function buildOrderByClause(orderBy, tablePrefix) {
|
|
480
|
-
if (!orderBy || Object.keys(orderBy).length === 0) {
|
|
481
|
-
const field = tablePrefix ? `${tablePrefix}.created_at` : "created_at";
|
|
482
|
-
return sql`ORDER BY ${sql.ref(field)} DESC, ${sql.ref(tablePrefix ? `${tablePrefix}.id` : "id")} DESC`;
|
|
483
|
-
}
|
|
484
|
-
const sortParts = [];
|
|
485
|
-
for (const [field, direction] of Object.entries(orderBy)) {
|
|
486
|
-
if (!FIELD_NAME_PATTERN.test(field)) continue;
|
|
487
|
-
const fullField = tablePrefix ? `${tablePrefix}.${field}` : field;
|
|
488
|
-
const dir = direction === "asc" ? sql`ASC` : sql`DESC`;
|
|
489
|
-
sortParts.push(sql`${sql.ref(fullField)} ${dir}`);
|
|
490
|
-
}
|
|
491
|
-
if (sortParts.length === 0) {
|
|
492
|
-
const defaultField = tablePrefix ? `${tablePrefix}.created_at` : "created_at";
|
|
493
|
-
return sql`ORDER BY ${sql.ref(defaultField)} DESC, ${sql.ref(tablePrefix ? `${tablePrefix}.id` : "id")} DESC`;
|
|
494
|
-
}
|
|
495
|
-
const primary = getPrimarySort(orderBy, tablePrefix);
|
|
496
|
-
const idField = tablePrefix ? `${tablePrefix}.id` : "id";
|
|
497
|
-
const idDir = primary.direction === "asc" ? sql`ASC` : sql`DESC`;
|
|
498
|
-
sortParts.push(sql`${sql.ref(idField)} ${idDir}`);
|
|
499
|
-
return sql`ORDER BY ${sql.join(sortParts, sql`, `)}`;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Build a cursor WHERE condition for keyset pagination.
|
|
503
|
-
* Uses the primary sort field + id as tiebreaker for stable ordering.
|
|
504
|
-
*
|
|
505
|
-
* Throws `InvalidCursorError` if the cursor is malformed; callers should
|
|
506
|
-
* let this propagate so users see a real error rather than silently
|
|
507
|
-
* falling back to the first page.
|
|
508
|
-
*/
|
|
509
|
-
function buildCursorCondition(cursor, orderBy, tablePrefix) {
|
|
510
|
-
const { orderValue, id: cursorId } = decodeCursor(cursor);
|
|
511
|
-
const primary = getPrimarySort(orderBy, tablePrefix);
|
|
512
|
-
const idField = tablePrefix ? `${tablePrefix}.id` : "id";
|
|
513
|
-
if (primary.direction === "desc") return sql`(${sql.ref(primary.field)} < ${orderValue} OR (${sql.ref(primary.field)} = ${orderValue} AND ${sql.ref(idField)} < ${cursorId}))`;
|
|
514
|
-
return sql`(${sql.ref(primary.field)} > ${orderValue} OR (${sql.ref(primary.field)} = ${orderValue} AND ${sql.ref(idField)} > ${cursorId}))`;
|
|
515
|
-
}
|
|
516
|
-
/** Type guard: is the where value a range object (not a string or array)? */
|
|
517
|
-
function isWhereRange(value) {
|
|
518
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Build AND conditions for non-taxonomy field filters.
|
|
522
|
-
* Returns an array of sql fragments; empty if no field filters apply.
|
|
523
|
-
* Field names are validated against FIELD_NAME_PATTERN to prevent injection.
|
|
524
|
-
*/
|
|
525
|
-
function buildFieldConditions(fields, tablePrefix) {
|
|
526
|
-
const conditions = [];
|
|
527
|
-
for (const [key, value] of Object.entries(fields)) {
|
|
528
|
-
if (!FIELD_NAME_PATTERN.test(key)) {
|
|
529
|
-
console.warn(`[emdash] where filter: invalid field name "${key}" ignored`);
|
|
530
|
-
continue;
|
|
531
|
-
}
|
|
532
|
-
if (value == null) continue;
|
|
533
|
-
const ref = tablePrefix ? sql.ref(`${tablePrefix}.${key}`) : sql.ref(key);
|
|
534
|
-
if (isWhereRange(value)) {
|
|
535
|
-
if (value.gt !== void 0) conditions.push(sql`${ref} > ${value.gt}`);
|
|
536
|
-
if (value.gte !== void 0) conditions.push(sql`${ref} >= ${value.gte}`);
|
|
537
|
-
if (value.lt !== void 0) conditions.push(sql`${ref} < ${value.lt}`);
|
|
538
|
-
if (value.lte !== void 0) conditions.push(sql`${ref} <= ${value.lte}`);
|
|
539
|
-
} else if (Array.isArray(value)) {
|
|
540
|
-
if (value.length > 0) conditions.push(sql`${ref} IN (${sql.join(value.map((v) => sql`${v}`))})`);
|
|
541
|
-
} else conditions.push(sql`${ref} = ${value}`);
|
|
542
|
-
}
|
|
543
|
-
return conditions;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Resolve a taxonomy filter (`name` + one or more `slug`s, optionally scoped to
|
|
547
|
-
* `locale`) to the set of `translation_group`s the pivot stores in
|
|
548
|
-
* `content_taxonomies.taxonomy_id`. Exact terms only — no subtree expansion.
|
|
549
|
-
*
|
|
550
|
-
* Mirrors the meaning of the old EXISTS join (`t.name = ? AND t.slug IN (?)
|
|
551
|
-
* [AND t.locale = ?]`): a pivot row matches when its group has a term with that
|
|
552
|
-
* name/slug in the active locale. Resolving to explicit values (rather than an
|
|
553
|
-
* `IN (subquery)`) keeps the single-term case a plain equality on the pivot
|
|
554
|
-
* index, which is what gives the clean early-`LIMIT` seek.
|
|
555
|
-
*/
|
|
556
|
-
async function resolveTermGroups(db, name, slugs, locale) {
|
|
557
|
-
let query = db.selectFrom("taxonomies").select("translation_group").distinct().where("name", "=", name).where("slug", "in", slugs);
|
|
558
|
-
if (locale) query = query.where("locale", "=", locale);
|
|
559
|
-
const rows = await query.execute();
|
|
560
|
-
const groups = /* @__PURE__ */ new Set();
|
|
561
|
-
for (const row of rows) if (row.translation_group) groups.add(row.translation_group);
|
|
562
|
-
return [...groups];
|
|
563
|
-
}
|
|
564
|
-
/** Equality (single) or `IN` (multiple) condition on a pivot group column. */
|
|
565
|
-
function pivotGroupCondition(ref, groups) {
|
|
566
|
-
if (groups.length === 1) return sql`${sql.ref(ref)} = ${groups[0]}`;
|
|
567
|
-
return sql`${sql.ref(ref)} IN (${sql.join(groups.map((g) => sql`${g}`))})`;
|
|
568
|
-
}
|
|
569
|
-
/** LIMIT/OFFSET fragment matching the loader's single-table variant. */
|
|
570
|
-
function buildPivotLimitOffset(db, fetchLimit, offset) {
|
|
571
|
-
if (fetchLimit != null && offset != null) return sql`LIMIT ${fetchLimit} OFFSET ${offset}`;
|
|
572
|
-
if (fetchLimit != null) return sql`LIMIT ${fetchLimit}`;
|
|
573
|
-
if (offset != null) return isPostgres(db) ? sql`OFFSET ${offset}` : sql`LIMIT -1 OFFSET ${offset}`;
|
|
574
|
-
return sql``;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* Build the pivot-driven taxonomy listing query (#1834).
|
|
578
|
-
*
|
|
579
|
-
* Drives from the term pivot and joins content translations through their
|
|
580
|
-
* shared translation_group. Content columns remain authoritative for locale,
|
|
581
|
-
* visibility, sorting, and cursor predicates.
|
|
582
|
-
*
|
|
583
|
-
* Two shapes:
|
|
584
|
-
* - **Indexed sort** (`published_at`/`created_at`, single sort field): the
|
|
585
|
-
* `LIMIT` lives in `picked`.
|
|
586
|
-
* - **Temp-sort** (`updated_at` or any other field, or multi-field sort): no
|
|
587
|
-
* pivot sort index applies, so `picked` collects the tagged candidate set and
|
|
588
|
-
* the outer query sorts the joined rows. Bounded to tagged rows — no
|
|
589
|
-
* `ec_*` full scan — but no early-`LIMIT`.
|
|
590
|
-
*/
|
|
591
|
-
function buildTaxonomyPivotQuery(opts) {
|
|
592
|
-
const { db, collection, tableName, groupSets, orderBy, cursor, locale, status, deletedIsNull, bylineGroups, fetchLimit, offset } = opts;
|
|
593
|
-
const primary = getPrimarySort(orderBy);
|
|
594
|
-
const isIndexedSort = (orderBy ? Object.keys(orderBy).filter((k) => FIELD_NAME_PATTERN.test(k)) : []).length <= 1 && (primary.field === "published_at" || primary.field === "created_at");
|
|
595
|
-
const dir = primary.direction === "asc" ? sql`ASC` : sql`DESC`;
|
|
596
|
-
const cmp = primary.direction === "asc" ? sql.raw(">") : sql.raw("<");
|
|
597
|
-
const firstGroups = groupSets[0] ?? [];
|
|
598
|
-
const restGroups = groupSets.slice(1);
|
|
599
|
-
const multiGroup = firstGroups.length > 1;
|
|
600
|
-
const residual = restGroups.length > 0 ? sql`${sql.join(restGroups.map((g) => sql`AND EXISTS (
|
|
601
|
-
SELECT 1 FROM content_taxonomies ct2
|
|
602
|
-
WHERE ct2.collection = ${collection}
|
|
603
|
-
AND ct2.entry_id = ct.entry_id
|
|
604
|
-
AND ${pivotGroupCondition("ct2.taxonomy_id", g)}
|
|
605
|
-
)`), sql` `)}` : sql``;
|
|
606
|
-
const bylineCt = bylineGroups ? sql`AND EXISTS (
|
|
607
|
-
SELECT 1 FROM _emdash_content_bylines cb
|
|
608
|
-
WHERE cb.collection_slug = ${collection}
|
|
609
|
-
AND cb.content_id = r.id
|
|
610
|
-
AND cb.byline_id IN (${sql.join(bylineGroups.map((g) => sql`${g}`))})
|
|
611
|
-
)` : sql``;
|
|
612
|
-
const firstGroupCond = pivotGroupCondition("ct.taxonomy_id", firstGroups);
|
|
613
|
-
const pivotContentJoin = isPostgres(db) ? sql`JOIN` : sql`CROSS JOIN`;
|
|
614
|
-
const { terms: termsSelect, bylines: bylinesSelect, bylinesExist: bylinesExistSelect } = foldedHydrationSelects(db, collection, "r");
|
|
615
|
-
const booleanFieldsSelect = foldedBooleanFieldsSelect(db, collection);
|
|
616
|
-
const deletedR = deletedIsNull ? sql`r.deleted_at IS NULL` : sql`r.deleted_at IS NOT NULL`;
|
|
617
|
-
const statusR = status !== void 0 ? sql`AND ${buildStatusCondition(db, status, "r")}` : sql``;
|
|
618
|
-
const localeR = locale ? sql`AND r.locale = ${locale}` : sql``;
|
|
619
|
-
if (isIndexedSort) {
|
|
620
|
-
const sortRef = sql.ref(`r.${primary.field}`);
|
|
621
|
-
const sortval = multiGroup ? sql`MAX(${sortRef})` : sortRef;
|
|
622
|
-
const groupByClause = multiGroup ? sql`GROUP BY r.id` : sql``;
|
|
623
|
-
let cursorClause = sql``;
|
|
624
|
-
let havingClause = sql``;
|
|
625
|
-
if (cursor) {
|
|
626
|
-
const { orderValue, id } = decodeCursor(cursor);
|
|
627
|
-
const cond = sql`(${sortval} ${cmp} ${orderValue} OR (${sortval} = ${orderValue} AND r.id ${cmp} ${id}))`;
|
|
628
|
-
if (multiGroup) havingClause = sql`HAVING ${cond}`;
|
|
629
|
-
else cursorClause = sql`AND ${cond}`;
|
|
630
|
-
}
|
|
631
|
-
const limitClause = buildPivotLimitOffset(db, fetchLimit, offset);
|
|
632
|
-
return sql`
|
|
633
|
-
WITH picked AS (
|
|
634
|
-
SELECT r.id AS entry_id, ${sortval} AS sortval
|
|
635
|
-
FROM content_taxonomies ct
|
|
636
|
-
${pivotContentJoin} ${sql.ref(tableName)} AS r ON r.translation_group = ct.entry_id
|
|
637
|
-
WHERE ct.collection = ${collection}
|
|
638
|
-
AND ${firstGroupCond}
|
|
639
|
-
AND ${deletedR}
|
|
640
|
-
${statusR}
|
|
641
|
-
${localeR}
|
|
642
|
-
${residual}
|
|
643
|
-
${bylineCt}
|
|
644
|
-
${cursorClause}
|
|
645
|
-
${groupByClause}
|
|
646
|
-
${havingClause}
|
|
647
|
-
ORDER BY sortval ${dir}, r.id ${dir}
|
|
648
|
-
${limitClause}
|
|
649
|
-
)
|
|
650
|
-
SELECT r.*, ${termsSelect}, ${bylinesSelect}, ${bylinesExistSelect}, ${booleanFieldsSelect}
|
|
651
|
-
FROM picked JOIN ${sql.ref(tableName)} AS r ON r.id = picked.entry_id
|
|
652
|
-
WHERE ${deletedR} ${statusR} ${localeR}
|
|
653
|
-
ORDER BY picked.sortval ${dir}, picked.entry_id ${dir}
|
|
654
|
-
`;
|
|
655
|
-
}
|
|
656
|
-
const orderByClause = buildOrderByClause(orderBy, "r");
|
|
657
|
-
const cursorCond = cursor ? sql`AND ${buildCursorCondition(cursor, orderBy, "r")}` : sql``;
|
|
658
|
-
const limitClause = buildPivotLimitOffset(db, fetchLimit, offset);
|
|
659
|
-
return sql`
|
|
660
|
-
WITH picked AS (
|
|
661
|
-
SELECT DISTINCT r.id AS entry_id
|
|
662
|
-
FROM content_taxonomies ct
|
|
663
|
-
${pivotContentJoin} ${sql.ref(tableName)} AS r ON r.translation_group = ct.entry_id
|
|
664
|
-
WHERE ct.collection = ${collection}
|
|
665
|
-
AND ${firstGroupCond}
|
|
666
|
-
AND ${deletedR}
|
|
667
|
-
${statusR}
|
|
668
|
-
${localeR}
|
|
669
|
-
${residual}
|
|
670
|
-
${bylineCt}
|
|
671
|
-
)
|
|
672
|
-
SELECT r.*, ${termsSelect}, ${bylinesSelect}, ${bylinesExistSelect}, ${booleanFieldsSelect}
|
|
673
|
-
FROM picked JOIN ${sql.ref(tableName)} AS r ON r.id = picked.entry_id
|
|
674
|
-
WHERE ${deletedR} ${statusR} ${localeR}
|
|
675
|
-
${cursorCond}
|
|
676
|
-
${orderByClause}
|
|
677
|
-
${limitClause}
|
|
678
|
-
`;
|
|
679
|
-
}
|
|
680
|
-
let dbInstance = null;
|
|
681
|
-
/**
|
|
682
|
-
* Get the database instance. Used by query wrapper functions and middleware.
|
|
683
|
-
*
|
|
684
|
-
* Checks the ALS request context first — if a per-request DB override is set
|
|
685
|
-
* (e.g. by DO preview middleware), it takes precedence over the module-level
|
|
686
|
-
* cached instance. This allows preview mode to route queries to an isolated
|
|
687
|
-
* Durable Object database without modifying any calling code.
|
|
688
|
-
*
|
|
689
|
-
* Initializes the default database on first call using config from virtual module.
|
|
690
|
-
*/
|
|
691
|
-
async function getDb() {
|
|
692
|
-
const ctx = getRequestContext();
|
|
693
|
-
if (ctx?.db) return ctx.db;
|
|
694
|
-
if (!dbInstance) {
|
|
695
|
-
await loadVirtualModules();
|
|
696
|
-
if (!virtualConfig?.database || typeof virtualCreateDialect !== "function") throw new Error("EmDash database not configured. Add database config to emdash() in astro.config.mjs");
|
|
697
|
-
dbInstance = new Kysely({
|
|
698
|
-
dialect: virtualCreateDialect(virtualConfig.database.config),
|
|
699
|
-
log: kyselyLogOption()
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
return dbInstance;
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
* Create an EmDash Live Collections loader
|
|
706
|
-
*
|
|
707
|
-
* This loader handles ALL content types in a single Astro collection.
|
|
708
|
-
* Use `getEmDashCollection()` and `getEmDashEntry()` to query
|
|
709
|
-
* specific content types.
|
|
710
|
-
*
|
|
711
|
-
* Database is configured in astro.config.mjs via the emdash() integration.
|
|
712
|
-
*
|
|
713
|
-
* @example
|
|
714
|
-
* ```ts
|
|
715
|
-
* // src/live.config.ts
|
|
716
|
-
* import { defineLiveCollection } from "astro:content";
|
|
717
|
-
* import { emdashLoader } from "emdash";
|
|
718
|
-
*
|
|
719
|
-
* export const collections = {
|
|
720
|
-
* emdash: defineLiveCollection({
|
|
721
|
-
* loader: emdashLoader(),
|
|
722
|
-
* }),
|
|
723
|
-
* };
|
|
724
|
-
* ```
|
|
725
|
-
*/
|
|
726
|
-
function emdashLoader() {
|
|
727
|
-
return {
|
|
728
|
-
name: "emdash",
|
|
729
|
-
async loadCollection({ filter }) {
|
|
730
|
-
try {
|
|
731
|
-
const db = await getDb();
|
|
732
|
-
const type = filter?.type;
|
|
733
|
-
if (!type) return { error: /* @__PURE__ */ new Error("type filter is required. Use getEmDashCollection() instead of getLiveCollection() directly.") };
|
|
734
|
-
const tableName = getTableName(type);
|
|
735
|
-
const status = filter?.status || "published";
|
|
736
|
-
const limit = filter?.limit;
|
|
737
|
-
const cursor = filter?.cursor;
|
|
738
|
-
const where = filter?.where;
|
|
739
|
-
const orderBy = filter?.orderBy;
|
|
740
|
-
const locale = filter?.locale;
|
|
741
|
-
const fetchLimit = limit ? limit + 1 : void 0;
|
|
742
|
-
const rawOffset = cursor ? void 0 : filter?.offset;
|
|
743
|
-
const offset = typeof rawOffset === "number" && Number.isInteger(rawOffset) && rawOffset > 0 ? rawOffset : void 0;
|
|
744
|
-
const cursorCondition = cursor ? buildCursorCondition(cursor, orderBy) : null;
|
|
745
|
-
let result;
|
|
746
|
-
const taxonomyFilters = [];
|
|
747
|
-
let bylineFilter = null;
|
|
748
|
-
const fieldFilters = {};
|
|
749
|
-
if (where && Object.keys(where).length > 0) {
|
|
750
|
-
const taxNames = await getTaxonomyNames(db, type);
|
|
751
|
-
for (const [key, value] of Object.entries(where)) {
|
|
752
|
-
if (value == null) continue;
|
|
753
|
-
if (key === "byline") {
|
|
754
|
-
if (isWhereRange(value)) {
|
|
755
|
-
console.warn(`[emdash] where filter: range operators are not supported on "byline", ignored`);
|
|
756
|
-
continue;
|
|
757
|
-
}
|
|
758
|
-
bylineFilter = { groups: Array.isArray(value) ? value : [value] };
|
|
759
|
-
} else if (taxNames.has(key)) {
|
|
760
|
-
if (isWhereRange(value)) {
|
|
761
|
-
console.warn(`[emdash] where filter: range operators are not supported on taxonomy "${key}", ignored`);
|
|
762
|
-
continue;
|
|
763
|
-
}
|
|
764
|
-
const slugs = Array.isArray(value) ? value : [value];
|
|
765
|
-
taxonomyFilters.push({
|
|
766
|
-
name: key,
|
|
767
|
-
slugs
|
|
768
|
-
});
|
|
769
|
-
} else fieldFilters[key] = value;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
if (bylineFilter && bylineFilter.groups.length === 0 || taxonomyFilters.some((f) => f.slugs.length === 0)) return {
|
|
773
|
-
entries: [],
|
|
774
|
-
cacheHint: { tags: [type] }
|
|
775
|
-
};
|
|
776
|
-
if (taxonomyFilters.length > 0 && Object.keys(fieldFilters).length === 0) {
|
|
777
|
-
const groupSets = [];
|
|
778
|
-
for (const taxFilter of taxonomyFilters) {
|
|
779
|
-
const groups = await resolveTermGroups(db, taxFilter.name, taxFilter.slugs, locale);
|
|
780
|
-
if (groups.length === 0) return {
|
|
781
|
-
entries: [],
|
|
782
|
-
cacheHint: { tags: [type] }
|
|
783
|
-
};
|
|
784
|
-
groupSets.push(groups);
|
|
785
|
-
}
|
|
786
|
-
result = await buildTaxonomyPivotQuery({
|
|
787
|
-
db,
|
|
788
|
-
collection: type,
|
|
789
|
-
tableName,
|
|
790
|
-
groupSets,
|
|
791
|
-
orderBy,
|
|
792
|
-
cursor,
|
|
793
|
-
locale,
|
|
794
|
-
status,
|
|
795
|
-
deletedIsNull: true,
|
|
796
|
-
bylineGroups: bylineFilter ? bylineFilter.groups : null,
|
|
797
|
-
fetchLimit,
|
|
798
|
-
offset
|
|
799
|
-
}).execute(db);
|
|
800
|
-
} else {
|
|
801
|
-
const orderByClause = buildOrderByClause(orderBy);
|
|
802
|
-
const statusCondition = buildStatusCondition(db, status);
|
|
803
|
-
const localeFilter = locale ? sql`AND locale = ${locale}` : sql``;
|
|
804
|
-
const cursorCond = cursorCondition ? sql`AND ${cursorCondition}` : sql``;
|
|
805
|
-
const fieldConds = buildFieldConditions(fieldFilters);
|
|
806
|
-
const fieldCondsSQL = fieldConds.length > 0 ? sql`${sql.join(fieldConds, sql` AND `)}` : null;
|
|
807
|
-
const taxonomyCond = taxonomyFilters.length > 0 ? sql`${sql.join(taxonomyFilters.map((f) => sql`AND EXISTS (
|
|
808
|
-
SELECT 1 FROM content_taxonomies ct
|
|
809
|
-
INNER JOIN taxonomies t ON t.translation_group = ct.taxonomy_id
|
|
810
|
-
WHERE ct.collection = ${type}
|
|
811
|
-
AND ct.entry_id = ${sql.ref(tableName)}.translation_group
|
|
812
|
-
AND t.name = ${f.name}
|
|
813
|
-
AND t.slug IN (${sql.join(f.slugs.map((s) => sql`${s}`))})
|
|
814
|
-
${locale ? sql`AND t.locale = ${locale}` : sql``}
|
|
815
|
-
)`), sql` `)}` : sql``;
|
|
816
|
-
const bylineCond = bylineFilter ? sql`AND EXISTS (
|
|
817
|
-
SELECT 1 FROM _emdash_content_bylines cb
|
|
818
|
-
WHERE cb.collection_slug = ${type}
|
|
819
|
-
AND cb.content_id = ${sql.ref(tableName)}.id
|
|
820
|
-
AND cb.byline_id IN (${sql.join(bylineFilter.groups.map((g) => sql`${g}`))})
|
|
821
|
-
)` : sql``;
|
|
822
|
-
const { terms: termsSelect, bylines: bylinesSelect, bylinesExist: bylinesExistSelect } = foldedHydrationSelects(db, type, tableName);
|
|
823
|
-
const booleanFieldsSelect = foldedBooleanFieldsSelect(db, type);
|
|
824
|
-
let limitOffsetClause = sql``;
|
|
825
|
-
if (fetchLimit != null && offset != null) limitOffsetClause = sql`LIMIT ${fetchLimit} OFFSET ${offset}`;
|
|
826
|
-
else if (fetchLimit != null) limitOffsetClause = sql`LIMIT ${fetchLimit}`;
|
|
827
|
-
else if (offset != null) limitOffsetClause = isPostgres(db) ? sql`OFFSET ${offset}` : sql`LIMIT -1 OFFSET ${offset}`;
|
|
828
|
-
result = await sql`
|
|
829
|
-
SELECT *, ${termsSelect}, ${bylinesSelect}, ${bylinesExistSelect}, ${booleanFieldsSelect} FROM ${sql.ref(tableName)}
|
|
830
|
-
WHERE deleted_at IS NULL
|
|
831
|
-
AND ${statusCondition}
|
|
832
|
-
${localeFilter}
|
|
833
|
-
${cursorCond}
|
|
834
|
-
${taxonomyCond}
|
|
835
|
-
${bylineCond}
|
|
836
|
-
${fieldCondsSQL ? sql`AND ${fieldCondsSQL}` : sql``}
|
|
837
|
-
${orderByClause}
|
|
838
|
-
${limitOffsetClause}
|
|
839
|
-
`.execute(db);
|
|
840
|
-
}
|
|
841
|
-
const hasMore = limit ? result.rows.length > limit : false;
|
|
842
|
-
const rows = hasMore ? result.rows.slice(0, limit) : result.rows;
|
|
843
|
-
const i18nConfig = virtualConfig?.i18n;
|
|
844
|
-
const i18nEnabled = i18nConfig && i18nConfig.locales.length > 1;
|
|
845
|
-
const booleanFields = parseFoldedBooleanFields(rows[0]);
|
|
846
|
-
const entries = rows.map((row) => {
|
|
847
|
-
const slug = rowStr(row, "slug") || rowStr(row, "id");
|
|
848
|
-
const rowLocale = rowStr(row, "locale");
|
|
849
|
-
const id = i18nEnabled && rowLocale !== "" && (rowLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale) ? `${rowLocale}/${slug}` : slug;
|
|
850
|
-
const data = mapRowToData(row, booleanFields);
|
|
851
|
-
stashFolded(data, row);
|
|
852
|
-
return {
|
|
853
|
-
id,
|
|
854
|
-
slug: rowStr(row, "slug"),
|
|
855
|
-
status: rowStr(row, "status", "draft"),
|
|
856
|
-
data,
|
|
857
|
-
cacheHint: {
|
|
858
|
-
tags: [rowStr(row, "id")],
|
|
859
|
-
lastModified: row.updated_at ? new Date(rowStr(row, "updated_at")) : void 0
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
});
|
|
863
|
-
let nextCursor;
|
|
864
|
-
if (hasMore && rows.length > 0) {
|
|
865
|
-
const lastRow = rows.at(-1);
|
|
866
|
-
const primary = getPrimarySort(orderBy);
|
|
867
|
-
const lastOrderValue = lastRow[primary.field.includes(".") ? primary.field.split(".").pop() : primary.field];
|
|
868
|
-
nextCursor = encodeCursor(typeof lastOrderValue === "string" || typeof lastOrderValue === "number" ? String(lastOrderValue) : "", String(lastRow.id));
|
|
869
|
-
}
|
|
870
|
-
let collectionLastModified;
|
|
871
|
-
for (const row of rows) if (row.updated_at) {
|
|
872
|
-
const d = new Date(rowStr(row, "updated_at"));
|
|
873
|
-
if (!collectionLastModified || d > collectionLastModified) collectionLastModified = d;
|
|
874
|
-
}
|
|
875
|
-
return {
|
|
876
|
-
entries,
|
|
877
|
-
nextCursor,
|
|
878
|
-
cacheHint: {
|
|
879
|
-
tags: [type],
|
|
880
|
-
lastModified: collectionLastModified
|
|
881
|
-
}
|
|
882
|
-
};
|
|
883
|
-
} catch (error) {
|
|
884
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
885
|
-
if (isMissingTableError(error) || isMissingColumnError(error)) {
|
|
886
|
-
if (isMissingColumnError(error)) console.warn(`[emdash] where filter: ${message}`);
|
|
887
|
-
return { entries: [] };
|
|
888
|
-
}
|
|
889
|
-
return { error: /* @__PURE__ */ new Error(`Failed to load collection: ${message}`) };
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
async loadEntry({ filter }) {
|
|
893
|
-
try {
|
|
894
|
-
const db = await getDb();
|
|
895
|
-
const type = filter?.type;
|
|
896
|
-
const id = filter?.id;
|
|
897
|
-
if (!type || !id) return { error: /* @__PURE__ */ new Error("type and id filters are required. Use getEmDashEntry() instead of getLiveEntry() directly.") };
|
|
898
|
-
const tableName = getTableName(type);
|
|
899
|
-
const locale = filter?.locale;
|
|
900
|
-
const { terms: termsSelect, bylines: bylinesSelect, bylinesExist: bylinesExistSelect } = foldedHydrationSelects(db, type, "c");
|
|
901
|
-
const seoSelect = foldedSeoSelect(db, type, "c");
|
|
902
|
-
const booleanFieldsSelect = foldedBooleanFieldsSelect(db, type);
|
|
903
|
-
const metadataSelect = sql`(
|
|
904
|
-
SELECT ${isPostgres(db) ? sql`json_build_object` : sql`json_object`}(
|
|
905
|
-
'bylinesExist', _emdash_bylines_exist,
|
|
906
|
-
'booleanFields', _emdash_boolean_fields
|
|
907
|
-
)
|
|
908
|
-
FROM (SELECT ${bylinesExistSelect}, ${booleanFieldsSelect}) AS metadata
|
|
909
|
-
) AS _emdash_entry_metadata`;
|
|
910
|
-
const row = (locale ? await sql`
|
|
911
|
-
SELECT c.*, ${seoSelect}, ${termsSelect}, ${bylinesSelect}, ${metadataSelect}
|
|
912
|
-
FROM ${sql.ref(tableName)} AS c
|
|
913
|
-
WHERE c.deleted_at IS NULL
|
|
914
|
-
AND ((c.slug = ${id} AND c.locale = ${locale}) OR c.id = ${id})
|
|
915
|
-
LIMIT 1
|
|
916
|
-
`.execute(db) : await sql`
|
|
917
|
-
SELECT c.*, ${seoSelect}, ${termsSelect}, ${bylinesSelect}, ${metadataSelect}
|
|
918
|
-
FROM ${sql.ref(tableName)} AS c
|
|
919
|
-
WHERE c.deleted_at IS NULL
|
|
920
|
-
AND (c.slug = ${id} OR c.id = ${id})
|
|
921
|
-
LIMIT 1
|
|
922
|
-
`.execute(db)).rows[0];
|
|
923
|
-
if (!row) return;
|
|
924
|
-
const rawMetadata = row._emdash_entry_metadata;
|
|
925
|
-
const metadata = typeof rawMetadata === "string" ? JSON.parse(rawMetadata) : rawMetadata;
|
|
926
|
-
delete row._emdash_entry_metadata;
|
|
927
|
-
if (isPlainObject(metadata)) {
|
|
928
|
-
row._emdash_bylines_exist = metadata.bylinesExist;
|
|
929
|
-
row[BOOLEAN_FIELDS_FOLDED_COLUMN] = metadata.booleanFields;
|
|
930
|
-
}
|
|
931
|
-
expandFoldedSeo(row);
|
|
932
|
-
const i18nConfig = virtualConfig?.i18n;
|
|
933
|
-
const i18nEnabled = i18nConfig && i18nConfig.locales.length > 1;
|
|
934
|
-
const entrySlug = rowStr(row, "slug") || rowStr(row, "id");
|
|
935
|
-
const entryLocale = rowStr(row, "locale");
|
|
936
|
-
const entryId = i18nEnabled && entryLocale !== "" && (entryLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale) ? `${entryLocale}/${entrySlug}` : entrySlug;
|
|
937
|
-
const revisionId = filter?.revisionId;
|
|
938
|
-
if (revisionId) {
|
|
939
|
-
const revData = (await sql`
|
|
940
|
-
SELECT data FROM revisions
|
|
941
|
-
WHERE id = ${revisionId}
|
|
942
|
-
LIMIT 1
|
|
943
|
-
`.execute(db)).rows[0];
|
|
944
|
-
if (revData) {
|
|
945
|
-
const parsed = JSON.parse(revData.data);
|
|
946
|
-
const systemData = {};
|
|
947
|
-
for (const [key, mappedKey] of Object.entries(INCLUDE_IN_DATA)) if (key in row) if (DATE_COLUMNS.has(key)) systemData[mappedKey] = typeof row[key] === "string" ? new Date(row[key]) : null;
|
|
948
|
-
else systemData[mappedKey] = row[key];
|
|
949
|
-
const slug = typeof parsed._slug === "string" ? parsed._slug : rowStr(row, "slug");
|
|
950
|
-
const revSlug = slug || rowStr(row, "id");
|
|
951
|
-
const revLocale = rowStr(row, "locale");
|
|
952
|
-
const revId = i18nEnabled && revLocale !== "" && (revLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale) ? `${revLocale}/${revSlug}` : revSlug;
|
|
953
|
-
const revEntryData = {
|
|
954
|
-
...systemData,
|
|
955
|
-
slug,
|
|
956
|
-
...mapRevisionData(parsed, parseFoldedBooleanFields(row))
|
|
957
|
-
};
|
|
958
|
-
const revSeo = extractSeo(row);
|
|
959
|
-
if (revSeo) {
|
|
960
|
-
revEntryData.seo = revSeo;
|
|
961
|
-
primeSeoPanel(type, rowStr(row, "id"), revSeo);
|
|
962
|
-
}
|
|
963
|
-
stashFolded(revEntryData, row);
|
|
964
|
-
return {
|
|
965
|
-
id: revId,
|
|
966
|
-
slug,
|
|
967
|
-
status: rowStr(row, "status", "draft"),
|
|
968
|
-
data: revEntryData,
|
|
969
|
-
cacheHint: {
|
|
970
|
-
tags: [rowStr(row, "id")],
|
|
971
|
-
lastModified: row.updated_at ? new Date(rowStr(row, "updated_at")) : void 0
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
const entryData = mapRowToData(row, parseFoldedBooleanFields(row));
|
|
977
|
-
const entrySeo = extractSeo(row);
|
|
978
|
-
if (entrySeo) {
|
|
979
|
-
entryData.seo = entrySeo;
|
|
980
|
-
primeSeoPanel(type, rowStr(row, "id"), entrySeo);
|
|
981
|
-
}
|
|
982
|
-
stashFolded(entryData, row);
|
|
983
|
-
return {
|
|
984
|
-
id: entryId,
|
|
985
|
-
slug: rowStr(row, "slug"),
|
|
986
|
-
status: rowStr(row, "status", "draft"),
|
|
987
|
-
data: entryData,
|
|
988
|
-
cacheHint: {
|
|
989
|
-
tags: [rowStr(row, "id")],
|
|
990
|
-
lastModified: row.updated_at ? new Date(rowStr(row, "updated_at")) : void 0
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
} catch (error) {
|
|
994
|
-
if (isMissingTableError(error)) return;
|
|
995
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
996
|
-
return { error: /* @__PURE__ */ new Error(`Failed to load entry: ${message}`) };
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
//#endregion
|
|
1003
|
-
export { creditsFromFoldedBylines as a, loader_exports as c, FOLDED_TERMS as i, resetTaxonomyNamesCache as l, FOLDED_BYLINES as n, emdashLoader as o, FOLDED_BYLINES_EXIST as r, getDb as s, CURSOR_RAW_VALUES as t, primeSeoPanel as u };
|
|
1004
|
-
//# sourceMappingURL=loader-t4TxaFiQ.mjs.map
|