emdash 1.0.1-rc.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-token-DBki7IT4.mjs → action-token-D2KE1Rqf.mjs} +2 -2
- package/dist/{action-token-DBki7IT4.mjs.map → action-token-D2KE1Rqf.mjs.map} +1 -1
- package/dist/{adapters-DcqT_GzQ.d.mts → adapters-Ds-1Pmkm.d.mts} +1 -1
- package/dist/{adapters-DcqT_GzQ.d.mts.map → adapters-Ds-1Pmkm.d.mts.map} +1 -1
- package/dist/{allowed-origins-CFtudhyw.mjs → allowed-origins-D78QvbTO.mjs} +2 -2
- package/dist/{allowed-origins-CFtudhyw.mjs.map → allowed-origins-D78QvbTO.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +21 -21
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +9 -9
- package/dist/{api-BJFwdTiG.mjs → api-BBZlif0y.mjs} +16 -16
- package/dist/{api-BJFwdTiG.mjs.map → api-BBZlif0y.mjs.map} +1 -1
- package/dist/{api-tokens-P3mAaQgr.mjs → api-tokens-BGbfWZVO.mjs} +2 -2
- package/dist/{api-tokens-P3mAaQgr.mjs.map → api-tokens-BGbfWZVO.mjs.map} +1 -1
- package/dist/{apply-BNvvsD51.mjs → apply-CDNV4JJ-.mjs} +14 -14
- package/dist/{apply-BNvvsD51.mjs.map → apply-CDNV4JJ-.mjs.map} +1 -1
- package/dist/{approvals-quy61IC4.mjs → approvals-CVvJSEBF.mjs} +2 -2
- package/dist/{approvals-quy61IC4.mjs.map → approvals-CVvJSEBF.mjs.map} +1 -1
- package/dist/{artifact-fetch-CWxyELVI.mjs → artifact-fetch-CGK0DQLj.mjs} +3 -3
- package/dist/{artifact-fetch-CWxyELVI.mjs.map → artifact-fetch-CGK0DQLj.mjs.map} +1 -1
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.mjs +6 -6
- package/dist/astro/middleware/auth.d.mts +12 -12
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/media-usage-write-fence.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +2 -2
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -12
- package/dist/astro/middleware.mjs +75 -77
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +11 -11
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +11 -11
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +13 -13
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +13 -13
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +13 -13
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +14 -14
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +13 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +13 -13
- package/dist/astro/routes/api/admin/core-update.mjs +3 -3
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +3 -3
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +15 -15
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +16 -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 +16 -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 +10 -12
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +16 -18
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +16 -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 +16 -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 +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +40 -42
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +39 -41
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +40 -42
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +49 -51
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +40 -42
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +39 -41
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +48 -50
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +39 -41
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +40 -42
- 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 +50 -52
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +42 -44
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +40 -42
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +39 -41
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +39 -41
- 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 -4
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +39 -41
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +22 -23
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +22 -23
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +25 -26
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +25 -26
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +25 -26
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +26 -27
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +26 -27
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +26 -27
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +26 -27
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +24 -25
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +26 -27
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -11
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +11 -11
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +16 -16
- package/dist/astro/routes/api/auth/invite/index.mjs +13 -13
- package/dist/astro/routes/api/auth/invite/register-options.mjs +14 -14
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +15 -15
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/me.mjs +11 -11
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +5 -5
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +16 -16
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +14 -14
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +15 -15
- package/dist/astro/routes/api/auth/passkey/verify.mjs +16 -16
- package/dist/astro/routes/api/auth/signup/complete.mjs +16 -16
- package/dist/astro/routes/api/auth/signup/request.mjs +14 -14
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +8 -8
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +19 -19
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +19 -19
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/trash.mjs +12 -12
- package/dist/astro/routes/api/dashboard.mjs +2 -2
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/health.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/execute.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs +14 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +13 -13
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +10 -2
- 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 +22 -5
- 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 +15 -15
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +21 -21
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +62 -63
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +12 -12
- package/dist/astro/routes/api/media/_id_/replace.mjs +11 -11
- package/dist/astro/routes/api/media/_id_/upload.mjs +2 -2
- package/dist/astro/routes/api/media/_id_/usage.mjs +18 -20
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +16 -18
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +2 -2
- package/dist/astro/routes/api/media/file/_...key_.mjs +5 -5
- package/dist/astro/routes/api/media/folders/_id_.mjs +12 -12
- package/dist/astro/routes/api/media/folders/index.mjs +12 -12
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +13 -13
- package/dist/astro/routes/api/media.mjs +17 -19
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +12 -12
- package/dist/astro/routes/api/menus/_name_/items.mjs +12 -12
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +12 -12
- package/dist/astro/routes/api/menus/_name_/translations.mjs +12 -12
- package/dist/astro/routes/api/menus/_name_.mjs +12 -12
- package/dist/astro/routes/api/menus/index.mjs +12 -12
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/code.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/token.mjs +7 -7
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +5 -5
- package/dist/astro/routes/api/openapi.json.mjs +15 -15
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +6 -6
- package/dist/astro/routes/api/redirects/404s/index.mjs +13 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs +13 -13
- package/dist/astro/routes/api/redirects/_id_.mjs +13 -13
- package/dist/astro/routes/api/redirects/index.mjs +13 -13
- package/dist/astro/routes/api/relations/_id_/index.mjs +19 -19
- package/dist/astro/routes/api/relations/index.mjs +19 -19
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +13 -13
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +39 -41
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +39 -41
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/index.mjs +39 -41
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +39 -41
- 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 +39 -41
- 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 +39 -41
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +39 -41
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +39 -41
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +39 -41
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +4 -4
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +39 -41
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +39 -41
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +14 -14
- package/dist/astro/routes/api/search/index.mjs +13 -13
- package/dist/astro/routes/api/search/rebuild.mjs +14 -14
- package/dist/astro/routes/api/search/stats.mjs +4 -4
- package/dist/astro/routes/api/search/suggest.mjs +13 -13
- package/dist/astro/routes/api/sections/_slug_.mjs +14 -14
- package/dist/astro/routes/api/sections/index.mjs +14 -14
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/export.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/index.mjs +5 -5
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +15 -15
- package/dist/astro/routes/api/setup/admin-verify.mjs +17 -17
- package/dist/astro/routes/api/setup/admin.mjs +15 -15
- package/dist/astro/routes/api/setup/dev-bypass.mjs +21 -22
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +27 -27
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +17 -17
- package/dist/astro/routes/api/taxonomies/index.mjs +15 -15
- package/dist/astro/routes/api/themes/preview.mjs +3 -3
- package/dist/astro/routes/api/typegen.mjs +3 -3
- package/dist/astro/routes/api/visual-editing/action-token.mjs +3 -3
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +15 -15
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +12 -12
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +14 -14
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +14 -14
- package/dist/astro/routes/api/widget-areas/_name_.mjs +4 -4
- package/dist/astro/routes/api/widget-areas/index.mjs +14 -14
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +3 -3
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +5 -5
- package/dist/astro/routes/sitemap.xml.mjs +4 -4
- package/dist/astro/types.d.mts +17 -17
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authoritative-records-dSvXCfzb.mjs → authoritative-records-ChM8dTeV.mjs} +2 -2
- package/dist/{authoritative-records-dSvXCfzb.mjs.map → authoritative-records-ChM8dTeV.mjs.map} +1 -1
- package/dist/{authorize-CJtizVbp.mjs → authorize-CTGywswM.mjs} +2 -2
- package/dist/{authorize-CJtizVbp.mjs.map → authorize-CTGywswM.mjs.map} +1 -1
- package/dist/{backup-Cpl8TqRz.mjs → backup-CDrPP8fI.mjs} +3 -3
- package/dist/{backup-Cpl8TqRz.mjs.map → backup-CDrPP8fI.mjs.map} +1 -1
- package/dist/{block-types-DIG_KZwi.mjs → block-types-nNEaPkvx.mjs} +2 -2
- package/dist/{block-types-DIG_KZwi.mjs.map → block-types-nNEaPkvx.mjs.map} +1 -1
- package/dist/{block-values-BrTrtA-v.mjs → block-values-Bho1nsZF.mjs} +2 -2
- package/dist/{block-values-BrTrtA-v.mjs.map → block-values-Bho1nsZF.mjs.map} +1 -1
- package/dist/{byline-fields-DHJs0Mja.mjs → byline-fields-BYbTptTU.mjs} +2 -2
- package/dist/{byline-fields-DHJs0Mja.mjs.map → byline-fields-BYbTptTU.mjs.map} +1 -1
- package/dist/{byline-fields-xdxE9kxZ.mjs → byline-fields-BjQH-1z9.mjs} +1 -1
- package/dist/{byline-fields-xdxE9kxZ.mjs.map → byline-fields-BjQH-1z9.mjs.map} +1 -1
- package/dist/{bylines-DATJ0B8u.mjs → bylines-VytjeHBI.mjs} +1 -1
- package/dist/{bylines-DATJ0B8u.mjs.map → bylines-VytjeHBI.mjs.map} +1 -1
- package/dist/{bylines-CTGTsEAs.mjs → bylines-gyWBWUUc.mjs} +4 -4
- package/dist/{bylines-CTGTsEAs.mjs.map → bylines-gyWBWUUc.mjs.map} +1 -1
- package/dist/{challenge-store-CxZxPqaw.mjs → challenge-store-VePApay4.mjs} +1 -1
- package/dist/{challenge-store-CxZxPqaw.mjs.map → challenge-store-VePApay4.mjs.map} +1 -1
- package/dist/{checksum-DtH6m5uk.mjs → checksum-BSIhEAYW.mjs} +1 -1
- package/dist/{checksum-DtH6m5uk.mjs.map → checksum-BSIhEAYW.mjs.map} +1 -1
- package/dist/cli/index.mjs +25 -25
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +75 -75
- package/dist/client/index.mjs +2 -2
- package/dist/{comment-reaction-DPeGAfjd.mjs → comment-reaction-B5sZzSoA.mjs} +1 -1
- package/dist/{comment-reaction-DPeGAfjd.mjs.map → comment-reaction-B5sZzSoA.mjs.map} +1 -1
- package/dist/{comments-Bi2j9IoX.mjs → comments-B3F-ETyh.mjs} +1 -1
- package/dist/{comments-Bi2j9IoX.mjs.map → comments-B3F-ETyh.mjs.map} +1 -1
- package/dist/{comments-BRtp992B.mjs → comments-zrTgWBSg.mjs} +1 -1
- package/dist/{comments-BRtp992B.mjs.map → comments-zrTgWBSg.mjs.map} +1 -1
- package/dist/{components-CQY-Sgm-.mjs → components-Dbf4Eq16.mjs} +1 -1
- package/dist/{components-CQY-Sgm-.mjs.map → components-Dbf4Eq16.mjs.map} +1 -1
- package/dist/{config-BVX7iYr4.d.mts → config-BCM5sQP7.d.mts} +28 -19
- package/dist/config-BCM5sQP7.d.mts.map +1 -0
- package/dist/{config-B-uePMLj.d.mts → config-CZkZBuBK.d.mts} +1 -1
- package/dist/{config-B-uePMLj.d.mts.map → config-CZkZBuBK.d.mts.map} +1 -1
- package/dist/{connection-B9pIasFd.mjs → connection-C5GIciX9.mjs} +2 -2
- package/dist/{connection-B9pIasFd.mjs.map → connection-C5GIciX9.mjs.map} +1 -1
- package/dist/{content-list-query-DiNwyKtd.d.mts → content-list-query-B6P37Ug_.d.mts} +1 -1
- package/dist/{content-list-query-DiNwyKtd.d.mts.map → content-list-query-B6P37Ug_.d.mts.map} +1 -1
- package/dist/{content-repair-B-k5JrVN.mjs → content-repair-BDVsYXWK.mjs} +3 -3
- package/dist/{content-repair-B-k5JrVN.mjs.map → content-repair-BDVsYXWK.mjs.map} +1 -1
- package/dist/{context-CTkYVMZV.mjs → context-BpTIzY5h.mjs} +12 -12
- package/dist/{context-CTkYVMZV.mjs.map → context-BpTIzY5h.mjs.map} +1 -1
- package/dist/{credits-CAFPFhuk.mjs → credits-JOE92Gr7.mjs} +1 -1
- package/dist/{credits-CAFPFhuk.mjs.map → credits-JOE92Gr7.mjs.map} +1 -1
- package/dist/{cron-xe5XKqA-.mjs → cron-ktyapbdB.mjs} +1 -1
- package/dist/{cron-xe5XKqA-.mjs.map → cron-ktyapbdB.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +3 -3
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +3 -3
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +3 -3
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/{default-DaoYyFRS.mjs → default-B7KnYwtQ.mjs} +1 -1
- package/dist/{default-DaoYyFRS.mjs.map → default-B7KnYwtQ.mjs.map} +1 -1
- package/dist/{deferred-tasks-BYcDx2o_.d.mts → deferred-tasks-eaUIqXj8.d.mts} +1 -1
- package/dist/{deferred-tasks-BYcDx2o_.d.mts.map → deferred-tasks-eaUIqXj8.d.mts.map} +1 -1
- package/dist/{device-flow-Ma5P5d2e.mjs → device-flow-BlV_z24g.mjs} +4 -4
- package/dist/{device-flow-Ma5P5d2e.mjs.map → device-flow-BlV_z24g.mjs.map} +1 -1
- package/dist/{direct-executor-FCIRepAU.mjs → direct-executor-Db8xA3zg.mjs} +2 -2
- package/dist/{direct-executor-FCIRepAU.mjs.map → direct-executor-Db8xA3zg.mjs.map} +1 -1
- package/dist/{email-console-DmqVF5J_.mjs → email-console-Dm78wSmg.mjs} +1 -1
- package/dist/{email-console-DmqVF5J_.mjs.map → email-console-Dm78wSmg.mjs.map} +1 -1
- package/dist/{email-locale-Cc5YSXfJ.mjs → email-locale-B4X9LXe9.mjs} +1 -1
- package/dist/{email-locale-Cc5YSXfJ.mjs.map → email-locale-B4X9LXe9.mjs.map} +1 -1
- package/dist/{emdash-runtime-YPrVnr6x.mjs → emdash-runtime-BakQ6io7.mjs} +54 -41
- package/dist/{emdash-runtime-YPrVnr6x.mjs.map → emdash-runtime-BakQ6io7.mjs.map} +1 -1
- package/dist/{entry-lock-BtDo1zFm.d.mts → entry-lock-DY8B-xcr.d.mts} +120 -120
- package/dist/{entry-lock-BtDo1zFm.d.mts.map → entry-lock-DY8B-xcr.d.mts.map} +1 -1
- package/dist/{entry-lock-WyppUeRW.mjs → entry-lock-DrUAdTzf.mjs} +1 -1
- package/dist/{entry-lock-WyppUeRW.mjs.map → entry-lock-DrUAdTzf.mjs.map} +1 -1
- package/dist/{entry-lock-PP1JCXBB.mjs → entry-lock-yIkBduqJ.mjs} +2 -2
- package/dist/{entry-lock-PP1JCXBB.mjs.map → entry-lock-yIkBduqJ.mjs.map} +1 -1
- package/dist/{env-types-BaTCgn-y.mjs → env-types-DkHYR2pl.mjs} +3 -3
- package/dist/{env-types-BaTCgn-y.mjs.map → env-types-DkHYR2pl.mjs.map} +1 -1
- package/dist/{error-CEdm_AWU.mjs → error-DIYXAVk4.mjs} +1 -1
- package/dist/{error-CEdm_AWU.mjs.map → error-DIYXAVk4.mjs.map} +1 -1
- package/dist/{escape-nJW7dR0s.mjs → escape-B1GM0yJU.mjs} +1 -1
- package/dist/{escape-nJW7dR0s.mjs.map → escape-B1GM0yJU.mjs.map} +1 -1
- package/dist/{fence-BrnQffdY.mjs → fence-8MaKKWhp.mjs} +2 -2
- package/dist/{fence-BrnQffdY.mjs.map → fence-8MaKKWhp.mjs.map} +1 -1
- package/dist/{field-map-BfYMstlG.mjs → field-map-D7ioN0r0.mjs} +2 -2
- package/dist/{field-map-BfYMstlG.mjs.map → field-map-D7ioN0r0.mjs.map} +1 -1
- package/dist/{gc-BO9NqlAe.mjs → gc-DMiE7ezk.mjs} +11 -11
- package/dist/{gc-BO9NqlAe.mjs.map → gc-DMiE7ezk.mjs.map} +1 -1
- package/dist/{hook-result-DSRRxu_-.d.mts → hook-result-Cb67D3P3.d.mts} +1 -1
- package/dist/{hook-result-DSRRxu_-.d.mts.map → hook-result-Cb67D3P3.d.mts.map} +1 -1
- package/dist/{hreflang-CNbZjm4g.mjs → hreflang-Bterc3b7.mjs} +4 -4
- package/dist/{hreflang-CNbZjm4g.mjs.map → hreflang-Bterc3b7.mjs.map} +1 -1
- package/dist/{hreflang--av8HanY.d.mts → hreflang-uIBOE5yg.d.mts} +2 -2
- package/dist/{hreflang--av8HanY.d.mts.map → hreflang-uIBOE5yg.d.mts.map} +1 -1
- package/dist/{http-route-dispatch-16nzAM5m.mjs → http-route-dispatch-DubjTibD.mjs} +5 -5
- package/dist/{http-route-dispatch-16nzAM5m.mjs.map → http-route-dispatch-DubjTibD.mjs.map} +1 -1
- package/dist/{identity-DNaOsiip.mjs → identity-DJ-5AcdG.mjs} +2 -2
- package/dist/{identity-DNaOsiip.mjs.map → identity-DJ-5AcdG.mjs.map} +1 -1
- package/dist/{import-DUV3Gl6-.mjs → import-DEfuIgRz.mjs} +4 -4
- package/dist/{import-DUV3Gl6-.mjs.map → import-DEfuIgRz.mjs.map} +1 -1
- package/dist/{index-m-lYQRqs.d.mts → index-xCy3j0f6.d.mts} +4 -4
- package/dist/{index-m-lYQRqs.d.mts.map → index-xCy3j0f6.d.mts.map} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.mjs +63 -65
- package/dist/{install-finalization-CPM7Gged.mjs → install-finalization-DeGRbaVa.mjs} +1 -1
- package/dist/{install-finalization-CPM7Gged.mjs.map → install-finalization-DeGRbaVa.mjs.map} +1 -1
- package/dist/{keys-B8g41vwJ.mjs → keys-DWwMxdZh.mjs} +2 -2
- package/dist/{keys-B8g41vwJ.mjs.map → keys-DWwMxdZh.mjs.map} +1 -1
- package/dist/{kinds-BKu9nb7q.mjs → kinds-D1A-00-F.mjs} +2 -2
- package/dist/{kinds-BKu9nb7q.mjs.map → kinds-D1A-00-F.mjs.map} +1 -1
- package/dist/{lifecycle-CpebZNAA.mjs → lifecycle-BWtBGNEn.mjs} +3 -3
- package/dist/{lifecycle-CpebZNAA.mjs.map → lifecycle-BWtBGNEn.mjs.map} +1 -1
- package/dist/{load-dHcR5yh9.mjs → load-BR1NEa_3.mjs} +1 -1
- package/dist/{load-dHcR5yh9.mjs.map → load-BR1NEa_3.mjs.map} +1 -1
- package/dist/{loader-CWb-ja1p.mjs → loader-D4edocWH.mjs} +2 -2
- package/dist/{loader-CWb-ja1p.mjs.map → loader-D4edocWH.mjs.map} +1 -1
- package/dist/{loops-Dn1i16FP.mjs → loops-DLaHFrvI.mjs} +1 -1
- package/dist/{loops-Dn1i16FP.mjs.map → loops-DLaHFrvI.mjs.map} +1 -1
- package/dist/{manifest-builder-0ZHXBxOL.mjs → manifest-builder-8jsSLR7s.mjs} +2 -2
- package/dist/{manifest-builder-0ZHXBxOL.mjs.map → manifest-builder-8jsSLR7s.mjs.map} +1 -1
- package/dist/{manifest-schema-gy37bD_D.mjs → manifest-schema-DcZjRNEv.mjs} +1 -1
- package/dist/{manifest-schema-gy37bD_D.mjs.map → manifest-schema-DcZjRNEv.mjs.map} +1 -1
- package/dist/{marketplace-tHWSsCUo.mjs → marketplace-CNxjq10S.mjs} +2 -2
- package/dist/{marketplace-tHWSsCUo.mjs.map → marketplace-CNxjq10S.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +14 -14
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-D1z_jisb.mjs → media-Bs6qmlVl.mjs} +3 -3
- package/dist/{media-D1z_jisb.mjs.map → media-Bs6qmlVl.mjs.map} +1 -1
- package/dist/{media-allowlist-D5a4d-RA.mjs → media-allowlist-isqF1gAh.mjs} +1 -1
- package/dist/{media-allowlist-D5a4d-RA.mjs.map → media-allowlist-isqF1gAh.mjs.map} +1 -1
- package/dist/{media-url-DloW2xrP.mjs → media-url-DbkMY3y6.mjs} +1 -1
- package/dist/{media-url-DloW2xrP.mjs.map → media-url-DbkMY3y6.mjs.map} +1 -1
- package/dist/{media-usage-activation-CQWOOTJi.mjs → media-usage-activation-BaT4AlNI.mjs} +1 -1
- package/dist/{media-usage-activation-CQWOOTJi.mjs.map → media-usage-activation-BaT4AlNI.mjs.map} +1 -1
- package/dist/media-usage-v43L0kR_.mjs +282 -0
- package/dist/media-usage-v43L0kR_.mjs.map +1 -0
- package/dist/{media-usage-work-BC0qpkMD.mjs → media-usage-work-CY8gIeU-.mjs} +2 -3
- package/dist/{media-usage-work-BC0qpkMD.mjs.map → media-usage-work-CY8gIeU-.mjs.map} +1 -1
- package/dist/{media-usage-work-BlMjwPg8.mjs → media-usage-work-VO108Q9E.mjs} +431 -2
- package/dist/media-usage-work-VO108Q9E.mjs.map +1 -0
- package/dist/{menus-XQdKk-87.mjs → menus-BYyeRemR.mjs} +8 -8
- package/dist/{menus-XQdKk-87.mjs.map → menus-BYyeRemR.mjs.map} +1 -1
- package/dist/{menus-BQKqf0Up.mjs → menus-mC_XTxD7.mjs} +2 -2
- package/dist/{menus-BQKqf0Up.mjs.map → menus-mC_XTxD7.mjs.map} +1 -1
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +2 -2
- package/dist/{mode-nh0ppSX5.mjs → mode-B9-gMXL9.mjs} +1 -1
- package/dist/{mode-nh0ppSX5.mjs.map → mode-B9-gMXL9.mjs.map} +1 -1
- package/dist/{node-sqlite-compat-CDOEcc97.mjs → node-sqlite-compat-DztcWs4y.mjs} +1 -1
- package/dist/{node-sqlite-compat-CDOEcc97.mjs.map → node-sqlite-compat-DztcWs4y.mjs.map} +1 -1
- package/dist/{oauth-authorization-BtYQ80uU.mjs → oauth-authorization-BIHy9SGU.mjs} +4 -4
- package/dist/{oauth-authorization-BtYQ80uU.mjs.map → oauth-authorization-BIHy9SGU.mjs.map} +1 -1
- package/dist/{oauth-clients-C1S4NQHh.mjs → oauth-clients-BZWZvKXa.mjs} +1 -1
- package/dist/{oauth-clients-C1S4NQHh.mjs.map → oauth-clients-BZWZvKXa.mjs.map} +1 -1
- package/dist/{oauth-state-store-CpGi2FZH.mjs → oauth-state-store-CxXTjXdI.mjs} +1 -1
- package/dist/{oauth-state-store-CpGi2FZH.mjs.map → oauth-state-store-CxXTjXdI.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-BNp1aFAr.mjs → oauth-user-lookup-GWojfxRl.mjs} +1 -1
- package/dist/{oauth-user-lookup-BNp1aFAr.mjs.map → oauth-user-lookup-GWojfxRl.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{options-Dl_W57-_.d.mts → options-DRF6dlXY.d.mts} +3 -3
- package/dist/{options-Dl_W57-_.d.mts.map → options-DRF6dlXY.d.mts.map} +1 -1
- package/dist/{ownership-DoeAIuTg.mjs → ownership-Bd77AmJz.mjs} +1 -1
- package/dist/{ownership-DoeAIuTg.mjs.map → ownership-Bd77AmJz.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +2 -2
- package/dist/{parse-Gt2l4Sld.mjs → parse-5Y0W39xR.mjs} +2 -2
- package/dist/{parse-Gt2l4Sld.mjs.map → parse-5Y0W39xR.mjs.map} +1 -1
- package/dist/{parse-QVS0t5oR.d.mts → parse-BPblgoa-.d.mts} +3 -3
- package/dist/{parse-QVS0t5oR.d.mts.map → parse-BPblgoa-.d.mts.map} +1 -1
- package/dist/{passkey-config-C-MxsV22.mjs → passkey-config-PiQ5cBnt.mjs} +1 -1
- package/dist/{passkey-config-C-MxsV22.mjs.map → passkey-config-PiQ5cBnt.mjs.map} +1 -1
- package/dist/{paths-CqFwkjY8.mjs → paths-DkS74lBM.mjs} +2 -2
- package/dist/{paths-CqFwkjY8.mjs.map → paths-DkS74lBM.mjs.map} +1 -1
- package/dist/{placeholder-Dn7MMdWr.d.mts → placeholder-Bez2282x.d.mts} +1 -1
- package/dist/{placeholder-Dn7MMdWr.d.mts.map → placeholder-Bez2282x.d.mts.map} +1 -1
- package/dist/{plan-D8s1n84S.mjs → plan-Lw7iGnGD.mjs} +4 -4
- package/dist/{plan-D8s1n84S.mjs.map → plan-Lw7iGnGD.mjs.map} +1 -1
- package/dist/plugin-test-runtime.d.mts +14 -14
- package/dist/plugin-test-runtime.mjs +76 -78
- 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 +18 -18
- package/dist/{plugins-BpLkXA1S.mjs → plugins-D7xSh1Lu.mjs} +2 -2
- package/dist/{plugins-BpLkXA1S.mjs.map → plugins-D7xSh1Lu.mjs.map} +1 -1
- package/dist/{policy-C1qpNxrr.mjs → policy-DMRiMdLn.mjs} +1 -1
- package/dist/{policy-C1qpNxrr.mjs.map → policy-DMRiMdLn.mjs.map} +1 -1
- package/dist/{portable-text-BnRuiR1-.mjs → portable-text-kcyN3F-a.mjs} +1 -1
- package/dist/{portable-text-BnRuiR1-.mjs.map → portable-text-kcyN3F-a.mjs.map} +1 -1
- package/dist/{preview-DU5rwz_m.mjs → preview--2VDLaND.mjs} +2 -2
- package/dist/{preview-DU5rwz_m.mjs.map → preview--2VDLaND.mjs.map} +1 -1
- package/dist/{protocol-cEfbPvM6.d.mts → protocol-FvwLA8P-.d.mts} +2 -2
- package/dist/{protocol-cEfbPvM6.d.mts.map → protocol-FvwLA8P-.d.mts.map} +1 -1
- package/dist/{public-submission-x1eaT6Tx.mjs → public-submission-BRyK76U8.mjs} +11 -11
- package/dist/{public-submission-x1eaT6Tx.mjs.map → public-submission-BRyK76U8.mjs.map} +1 -1
- package/dist/{public-url-B5a0QAh6.mjs → public-url-7j0cpCFc.mjs} +1 -1
- package/dist/{public-url-B5a0QAh6.mjs.map → public-url-7j0cpCFc.mjs.map} +1 -1
- package/dist/{query-DSEkrw_m.mjs → query-BRNTde3V.mjs} +3 -3
- package/dist/{query-DSEkrw_m.mjs.map → query-BRNTde3V.mjs.map} +1 -1
- package/dist/{query-dHwqNf85.mjs → query-DyYYWOKk.mjs} +13 -13
- package/dist/{query-dHwqNf85.mjs.map → query-DyYYWOKk.mjs.map} +1 -1
- package/dist/{rate-limit-BXx3Ecp9.mjs → rate-limit-D0BcE76H.mjs} +2 -2
- package/dist/{rate-limit-BXx3Ecp9.mjs.map → rate-limit-D0BcE76H.mjs.map} +1 -1
- package/dist/{receipt-RG5_pwsj.mjs → receipt-C4icyHlC.mjs} +3 -3
- package/dist/{receipt-RG5_pwsj.mjs.map → receipt-C4icyHlC.mjs.map} +1 -1
- package/dist/{redirect-BRoLiWQE.mjs → redirect-9DbtxSNG.mjs} +1 -1
- package/dist/{redirect-BRoLiWQE.mjs.map → redirect-9DbtxSNG.mjs.map} +1 -1
- package/dist/{redirects-D4EWeXAo.mjs → redirects-1nhdEaTq.mjs} +2 -2
- package/dist/{redirects-D4EWeXAo.mjs.map → redirects-1nhdEaTq.mjs.map} +1 -1
- package/dist/{redirects-CWQMKYOS.mjs → redirects-D1yMnSR9.mjs} +3 -3
- package/dist/{redirects-CWQMKYOS.mjs.map → redirects-D1yMnSR9.mjs.map} +1 -1
- package/dist/registry/testing.mjs +3 -3
- package/dist/{registry-CtHRqVe-.mjs → registry-CzPJNu3H.mjs} +1603 -8
- package/dist/registry-CzPJNu3H.mjs.map +1 -0
- package/dist/{relations-CVI2nbrn.mjs → relations-C8JpSkU6.mjs} +2 -2
- package/dist/{relations-CVI2nbrn.mjs.map → relations-C8JpSkU6.mjs.map} +1 -1
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-B6blULFY.mjs → request-meta-Bs60XW1m.mjs} +2 -2
- package/dist/{request-meta-B6blULFY.mjs.map → request-meta-Bs60XW1m.mjs.map} +1 -1
- package/dist/{resolve-Cw4rWFJl.mjs → resolve-BHWgMU_X.mjs} +3 -3
- package/dist/{resolve-Cw4rWFJl.mjs.map → resolve-BHWgMU_X.mjs.map} +1 -1
- package/dist/{route-wire-DK600v4u.mjs → route-wire-ClUVQduA.mjs} +1 -1
- package/dist/{route-wire-DK600v4u.mjs.map → route-wire-ClUVQduA.mjs.map} +1 -1
- package/dist/{routes-D0u5zK2P.mjs → routes-D2GFl3B7.mjs} +5 -5
- package/dist/{routes-D0u5zK2P.mjs.map → routes-D2GFl3B7.mjs.map} +1 -1
- package/dist/{runner-CC8LZx97.d.mts → runner-CWl76CH3.d.mts} +2 -2
- package/dist/{runner-CC8LZx97.d.mts.map → runner-CWl76CH3.d.mts.map} +1 -1
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +1 -1
- package/dist/schema/project-env-types.mjs +16 -16
- package/dist/{schema-BZPj3kwZ.mjs → schema-27XefSYG.mjs} +3 -3
- package/dist/{schema-BZPj3kwZ.mjs.map → schema-27XefSYG.mjs.map} +1 -1
- package/dist/{schema-Berj5VQx.mjs → schema-Btvj3BMh.mjs} +4 -4
- package/dist/{schema-Berj5VQx.mjs.map → schema-Btvj3BMh.mjs.map} +1 -1
- package/dist/{scopes-CxvclshI.mjs → scopes-DGCj6K4p.mjs} +3 -3
- package/dist/{scopes-CxvclshI.mjs.map → scopes-DGCj6K4p.mjs.map} +1 -1
- package/dist/{search-CD5MiMdh.mjs → search-pZRRmWjh.mjs} +2 -2
- package/dist/{search-CD5MiMdh.mjs.map → search-pZRRmWjh.mjs.map} +1 -1
- package/dist/{sections-Do5KdTSQ.mjs → sections-CIhqs3Ao.mjs} +2 -2
- package/dist/{sections-Do5KdTSQ.mjs.map → sections-CIhqs3Ao.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +15 -15
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +7 -7
- package/dist/{seo-C61bnPuV.mjs → seo-DifeiGdl.mjs} +1 -1
- package/dist/{seo-C61bnPuV.mjs.map → seo-DifeiGdl.mjs.map} +1 -1
- package/dist/{service-BFUImckH.mjs → service-COVdVpSK.mjs} +1 -1
- package/dist/{service-BFUImckH.mjs.map → service-COVdVpSK.mjs.map} +1 -1
- package/dist/{session-user-DVcHsFD5.mjs → session-user-C6IEjuty.mjs} +2 -2
- package/dist/{session-user-DVcHsFD5.mjs.map → session-user-C6IEjuty.mjs.map} +1 -1
- package/dist/{settings-B0zQj_Tj.mjs → settings-CwcrX-Ay.mjs} +1 -1
- package/dist/{settings-B0zQj_Tj.mjs.map → settings-CwcrX-Ay.mjs.map} +1 -1
- package/dist/{settings-CnWoEDb0.mjs → settings-D_cJtT48.mjs} +2 -2
- package/dist/{settings-CnWoEDb0.mjs.map → settings-D_cJtT48.mjs.map} +1 -1
- package/dist/{settings-Ckzmx-A1.mjs → settings-tnPQN3Z2.mjs} +2 -2
- package/dist/{settings-Ckzmx-A1.mjs.map → settings-tnPQN3Z2.mjs.map} +1 -1
- package/dist/{setup-complete-B2_dhZZz.mjs → setup-complete-BOrI10UY.mjs} +1 -1
- package/dist/{setup-complete-B2_dhZZz.mjs.map → setup-complete-BOrI10UY.mjs.map} +1 -1
- package/dist/{setup-nonce-CJV9ftSK.mjs → setup-nonce-0XTBLTsX.mjs} +1 -1
- package/dist/{setup-nonce-CJV9ftSK.mjs.map → setup-nonce-0XTBLTsX.mjs.map} +1 -1
- package/dist/{site-settings-AYFvhwQn.mjs → site-settings-B7vGFRDT.mjs} +2 -2
- package/dist/{site-settings-AYFvhwQn.mjs.map → site-settings-B7vGFRDT.mjs.map} +1 -1
- package/dist/{site-url-Ceq_AUK0.mjs → site-url-wEYRMHBv.mjs} +2 -2
- package/dist/{site-url-Ceq_AUK0.mjs.map → site-url-wEYRMHBv.mjs.map} +1 -1
- package/dist/{snapshot-Dzsn3NZa.mjs → snapshot-W36KbLmc.mjs} +1 -1
- package/dist/{snapshot-Dzsn3NZa.mjs.map → snapshot-W36KbLmc.mjs.map} +1 -1
- package/dist/{ssrf-DsmvZB80.mjs → ssrf-CRJ-xom5.mjs} +1 -1
- package/dist/{ssrf-DsmvZB80.mjs.map → ssrf-CRJ-xom5.mjs.map} +1 -1
- package/dist/{stage-BcuakqfP.mjs → stage-DA0NrTRZ.mjs} +5 -5
- package/dist/{stage-BcuakqfP.mjs.map → stage-DA0NrTRZ.mjs.map} +1 -1
- package/dist/{state-kGdOMQRY.mjs → state-BTlprvUF.mjs} +1 -1
- package/dist/{state-kGdOMQRY.mjs.map → state-BTlprvUF.mjs.map} +1 -1
- package/dist/{status-D39Fpy8R.mjs → status-C6IrSLMT.mjs} +1 -1
- package/dist/{status-D39Fpy8R.mjs.map → status-C6IrSLMT.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{storage-query-CKNIJhjo.d.mts → storage-query-CdVF2bng.d.mts} +6 -6
- package/dist/{storage-query-CKNIJhjo.d.mts.map → storage-query-CdVF2bng.d.mts.map} +1 -1
- package/dist/{tar-n2OXqKpZ.mjs → tar-BGOZARjy.mjs} +5 -5
- package/dist/{tar-n2OXqKpZ.mjs.map → tar-BGOZARjy.mjs.map} +1 -1
- package/dist/{target-DOFs5oUC.mjs → target-YhYH_0uc.mjs} +1 -1
- package/dist/{target-DOFs5oUC.mjs.map → target-YhYH_0uc.mjs.map} +1 -1
- package/dist/{taxonomies-CvBe3xhM.mjs → taxonomies-DK_XBrmT.mjs} +3 -3
- package/dist/{taxonomies-CvBe3xhM.mjs.map → taxonomies-DK_XBrmT.mjs.map} +1 -1
- package/dist/{taxonomies-CMCnItWf.mjs → taxonomies-S1M3rUC0.mjs} +3 -3
- package/dist/{taxonomies-CMCnItWf.mjs.map → taxonomies-S1M3rUC0.mjs.map} +1 -1
- package/dist/{tokens-BIGxi8sP.mjs → tokens-B_ffPF1q.mjs} +1 -1
- package/dist/{tokens-BIGxi8sP.mjs.map → tokens-B_ffPF1q.mjs.map} +1 -1
- package/dist/{transfer-CzdXsFRx.mjs → transfer-9fVSxyrV.mjs} +3 -3
- package/dist/{transfer-CzdXsFRx.mjs.map → transfer-9fVSxyrV.mjs.map} +1 -1
- package/dist/{transfer-5Ce0QuNS.mjs → transfer-B7LUTaYD.mjs} +23 -24
- package/dist/{transfer-5Ce0QuNS.mjs.map → transfer-B7LUTaYD.mjs.map} +1 -1
- package/dist/{transfer-download-Dc-ltjZY.mjs → transfer-download-BdNq4VWN.mjs} +1 -1
- package/dist/{transfer-download-Dc-ltjZY.mjs.map → transfer-download-BdNq4VWN.mjs.map} +1 -1
- package/dist/{transformations-BLzqMnpY.mjs → transformations-BtQdvyly.mjs} +2 -2
- package/dist/{transformations-BLzqMnpY.mjs.map → transformations-BtQdvyly.mjs.map} +1 -1
- package/dist/{transport-umzEbgYO.mjs → transport-CriYXY1c.mjs} +1 -1
- package/dist/{transport-umzEbgYO.mjs.map → transport-CriYXY1c.mjs.map} +1 -1
- package/dist/{transport-k1fykDBh.d.mts → transport-SnhS6xku.d.mts} +1 -1
- package/dist/{transport-k1fykDBh.d.mts.map → transport-SnhS6xku.d.mts.map} +1 -1
- package/dist/{trusted-proxy-BqfQFs6a.mjs → trusted-proxy-C0eHXPd-.mjs} +1 -1
- package/dist/{trusted-proxy-BqfQFs6a.mjs.map → trusted-proxy-C0eHXPd-.mjs.map} +1 -1
- package/dist/{turnstile-CvvKLtqE.mjs → turnstile-BNPrWd1e.mjs} +1 -1
- package/dist/{turnstile-CvvKLtqE.mjs.map → turnstile-BNPrWd1e.mjs.map} +1 -1
- package/dist/{types-LtS0SM4F.d.mts → types-B8sF_kE5.d.mts} +3 -3
- package/dist/{types-LtS0SM4F.d.mts.map → types-B8sF_kE5.d.mts.map} +1 -1
- package/dist/{types-Dsco9Y38.d.mts → types-BYVIYOlD.d.mts} +3 -3
- package/dist/{types-Dsco9Y38.d.mts.map → types-BYVIYOlD.d.mts.map} +1 -1
- package/dist/{types-CLTQ9b_r.d.mts → types-Bs4bi95j.d.mts} +1 -1
- package/dist/{types-CLTQ9b_r.d.mts.map → types-Bs4bi95j.d.mts.map} +1 -1
- package/dist/{types-BYaPWs_F.d.mts → types-CGuODCZi.d.mts} +1 -1
- package/dist/{types-BYaPWs_F.d.mts.map → types-CGuODCZi.d.mts.map} +1 -1
- package/dist/{types-CxwtnuSS.mjs → types-ClFEExxn.mjs} +1 -1
- package/dist/{types-CxwtnuSS.mjs.map → types-ClFEExxn.mjs.map} +1 -1
- package/dist/{types-CPkQw2T2.d.mts → types-D994zUWB.d.mts} +1 -1
- package/dist/{types-CPkQw2T2.d.mts.map → types-D994zUWB.d.mts.map} +1 -1
- package/dist/{types-DOfVMPoo.d.mts → types-DAj1ByJQ.d.mts} +1 -1
- package/dist/{types-DOfVMPoo.d.mts.map → types-DAj1ByJQ.d.mts.map} +1 -1
- package/dist/{types-CdEMurNh.mjs → types-Dlv6esp4.mjs} +1 -1
- package/dist/{types-CdEMurNh.mjs.map → types-Dlv6esp4.mjs.map} +1 -1
- package/dist/{types-CV5xszpF.d.mts → types-Dr1LVwL7.d.mts} +1 -1
- package/dist/{types-CV5xszpF.d.mts.map → types-Dr1LVwL7.d.mts.map} +1 -1
- package/dist/{types-CQLvuXoZ.d.mts → types-MN9bOQ1g.d.mts} +1 -1
- package/dist/{types-CQLvuXoZ.d.mts.map → types-MN9bOQ1g.d.mts.map} +1 -1
- package/dist/{types-DGw8KMX_.mjs → types-d2Szb1oz.mjs} +1 -1
- package/dist/{types-DGw8KMX_.mjs.map → types-d2Szb1oz.mjs.map} +1 -1
- package/dist/{types-B8tO_KdV.d.mts → types-ibtP7GEA.d.mts} +1 -1
- package/dist/{types-B8tO_KdV.d.mts.map → types-ibtP7GEA.d.mts.map} +1 -1
- package/dist/{update-check-B2JKz5cr.mjs → update-check-D8No-E5s.mjs} +2 -2
- package/dist/{update-check-B2JKz5cr.mjs.map → update-check-D8No-E5s.mjs.map} +1 -1
- package/dist/{utils-CoV-PYhg.mjs → utils-Dr01wRKt.mjs} +1 -1
- package/dist/{utils-CoV-PYhg.mjs.map → utils-Dr01wRKt.mjs.map} +1 -1
- package/dist/{validate-WkjGwBSO.mjs → validate-BttYU7NK.mjs} +2 -2
- package/dist/{validate-WkjGwBSO.mjs.map → validate-BttYU7NK.mjs.map} +1 -1
- package/dist/{validate-DpP1QUiV.d.mts → validate-Df09inbC.d.mts} +5 -5
- package/dist/{validate-DpP1QUiV.d.mts.map → validate-Df09inbC.d.mts.map} +1 -1
- package/dist/{validation-DG7Y9H4u.mjs → validation-DH2WRwWO.mjs} +3 -3
- package/dist/{validation-DG7Y9H4u.mjs.map → validation-DH2WRwWO.mjs.map} +1 -1
- package/dist/version-BbygH8CT.mjs +7 -0
- package/dist/{version-BnlfLUa6.mjs.map → version-BbygH8CT.mjs.map} +1 -1
- package/dist/{version-BwEGkqkx.mjs → version-CseoDDOd.mjs} +1 -1
- package/dist/{version-BwEGkqkx.mjs.map → version-CseoDDOd.mjs.map} +1 -1
- package/dist/{virtual-modules-B6vJW15k.mjs → virtual-modules-82GlnQyG.mjs} +2 -2
- package/dist/{virtual-modules-B6vJW15k.mjs.map → virtual-modules-82GlnQyG.mjs.map} +1 -1
- package/dist/{widgets-D7I_9xff.mjs → widgets-DMAgGcQt.mjs} +3 -3
- package/dist/{widgets-D7I_9xff.mjs.map → widgets-DMAgGcQt.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-m_141EtN.mjs → wxr-taxonomies-Bi5kFSxQ.mjs} +3 -3
- package/dist/{wxr-taxonomies-m_141EtN.mjs.map → wxr-taxonomies-Bi5kFSxQ.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-Di1w9HDU.d.mts → wxr-taxonomies-y_FpYlDn.d.mts} +1 -1
- package/dist/{wxr-taxonomies-Di1w9HDU.d.mts.map → wxr-taxonomies-y_FpYlDn.d.mts.map} +1 -1
- package/package.json +6 -6
- package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +27 -11
- package/src/emdash-runtime.ts +24 -1
- package/src/media/usage/collection-deletion-processor.ts +35 -14
- package/src/media/usage/maintenance-engine.ts +47 -1
- package/src/schema/registry.ts +25 -8
- package/dist/collection-deletion-JecE26cS.mjs +0 -436
- package/dist/collection-deletion-JecE26cS.mjs.map +0 -1
- package/dist/collection-deletion-processor-DgCfF3a1.mjs +0 -217
- package/dist/collection-deletion-processor-DgCfF3a1.mjs.map +0 -1
- package/dist/config-BVX7iYr4.d.mts.map +0 -1
- package/dist/media-usage-B8q0owWQ.mjs +0 -1629
- package/dist/media-usage-B8q0owWQ.mjs.map +0 -1
- package/dist/media-usage-work-BlMjwPg8.mjs.map +0 -1
- package/dist/registry-CtHRqVe-.mjs.map +0 -1
- package/dist/version-BnlfLUa6.mjs +0 -7
- /package/dist/{api-tokens-BLz2MtQs.mjs → api-tokens-B4COohsb.mjs} +0 -0
- /package/dist/{ssrf-tA45vIPX.mjs → ssrf-sC4_5rxm.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bylines-CTGTsEAs.mjs","names":[],"sources":["../src/bylines/index.ts"],"sourcesContent":["/**\n * Runtime API for bylines\n *\n * Provides functions to query byline profiles and byline credits\n * associated with content entries. Follows the same pattern as\n * the taxonomies runtime API.\n *\n * i18n model (migration 040): byline rows are per-locale and share a\n * `translation_group`. Credits on `_emdash_content_bylines.byline_id` store\n * the translation_group, so a single credit spans every locale of a byline.\n *\n * Hydration is strict per locale: a credit at locale X renders iff a byline\n * row exists at locale X within the credited translation_group. There is no\n * read-time fallback. Mirrors `getEntryTerms` and the convention in PR #916.\n * Locale is passed in by callers — `query.ts` resolves it from the entry's\n * own `data.locale` for the runtime path.\n */\n\nimport { sql } from \"kysely\";\n\nimport { BylineRepository } from \"../database/repositories/byline.js\";\nimport type { BylineSummary, ContentBylineCredit } from \"../database/repositories/types.js\";\nimport { validateIdentifier } from \"../database/validate.js\";\nimport { resolveLocaleChain } from \"../i18n/resolve.js\";\nimport { getDb } from \"../loader.js\";\nimport { requestCached } from \"../request-cache.js\";\nimport { resolveBylineCredits, type BylineEntry } from \"./credits.js\";\n\n/**\n * No-op — kept for API compatibility.\n *\n * Used to invalidate a worker-lifetime \"has any byline?\" probe. That\n * probe added a query on every cold isolate to save one query on sites\n * with zero bylines (i.e. the wrong tradeoff), so we dropped it. The\n * batch byline join below returns an empty map for empty sites at the\n * same cost as the probe, without the pre-check.\n */\nexport function invalidateBylineCache(): void {\n\t// Intentionally empty.\n}\n\n/**\n * Get a byline by ID.\n *\n * @example\n * ```ts\n * import { getByline } from \"emdash\";\n *\n * const byline = await getByline(\"01HXYZ...\");\n * if (byline) {\n * console.log(byline.displayName);\n * }\n * ```\n */\nexport async function getByline(id: string): Promise<BylineSummary | null> {\n\tconst db = await getDb();\n\tconst repo = new BylineRepository(db);\n\treturn repo.findById(id);\n}\n\n/**\n * Get a byline by slug.\n *\n * Standalone identity lookup (e.g. rendering an author profile page). Walks\n * the configured locale fallback chain — same pattern as `getMenu` and\n * `getTerm`, see PR #916. Returns the first match found, walking\n * `[requestedLocale, ...fallbacks, defaultLocale]` in order.\n *\n * Note: this is intentionally different from credit hydration on a content\n * entry (`getEntryBylines`), which is strict per locale with no fallback.\n * The distinction: identity lookups answer \"give me this byline\", and\n * falling back to another locale's display name is acceptable. Credit\n * hydration answers \"what should render on this entry\", where falling back\n * silently surfaces a stale-locale name and contradicts editorial intent.\n *\n * @example\n * ```ts\n * import { getBylineBySlug } from \"emdash\";\n *\n * const byline = await getBylineBySlug(\"jane-doe\", { locale: \"de-de\" });\n * if (byline) {\n * console.log(byline.displayName);\n * }\n * ```\n */\nexport async function getBylineBySlug(\n\tslug: string,\n\toptions?: { locale?: string },\n): Promise<BylineSummary | null> {\n\tconst chain = resolveLocaleChain(options?.locale);\n\tconst cacheKey = `byline-by-slug:${slug}:${chain.length > 0 ? chain.join(\",\") : \"*\"}`;\n\treturn requestCached(cacheKey, async () => {\n\t\tconst db = await getDb();\n\t\tconst repo = new BylineRepository(db);\n\n\t\tif (chain.length === 0) {\n\t\t\t// No i18n or no resolved locale — fall back to the repo's\n\t\t\t// \"lowest-locale-code\" deterministic match.\n\t\t\treturn repo.findBySlug(slug);\n\t\t}\n\n\t\tfor (const locale of chain) {\n\t\t\tconst row = await repo.findBySlug(slug, { locale });\n\t\t\tif (row) return row;\n\t\t}\n\t\treturn null;\n\t});\n}\n\n/**\n * Get byline credits for a single content entry.\n *\n * Strict per locale (post-migration 040): a credit renders iff a byline row\n * exists at the requested locale within the credited translation_group.\n * Callers wanting fallback behaviour apply it themselves. When `locale` is\n * omitted, returns every locale variant of every credit on the entry —\n * useful for admin tooling, not for end-user rendering.\n *\n * Internal: not re-exported from the `emdash` package entry point. Every\n * entry returned by `getEmDashCollection` / `getEmDashEntry` already has\n * `data.bylines` populated by `hydrateEntryBylines` (which uses the batch\n * helper `getBylinesForEntries` directly). Site code should read those\n * fields rather than calling this function.\n */\nexport async function getEntryBylines(\n\tcollection: string,\n\tentryId: string,\n\toptions?: { locale?: string },\n): Promise<ContentBylineCredit[]> {\n\tvalidateIdentifier(collection, \"collection\");\n\tconst db = await getDb();\n\tconst repo = new BylineRepository(db);\n\n\tconst localeOpt = options?.locale !== undefined ? { locale: options.locale } : undefined;\n\tconst explicit = await repo.getContentBylines(collection, entryId, localeOpt);\n\tif (explicit.length > 0) {\n\t\treturn explicit.map((c) => ({ ...c, source: \"explicit\" as const }));\n\t}\n\n\t// `primary_byline_id` is the explicit-credit sentinel: non-null\n\t// suppresses author fallback even when the credit doesn't resolve\n\t// at this locale.\n\tconst ctx = await getEntryContext(db, collection, entryId);\n\tif (ctx.primaryBylineId) return [];\n\n\tif (ctx.authorId) {\n\t\tconst fallback = await repo.findByUserId(ctx.authorId, localeOpt);\n\t\tif (fallback) {\n\t\t\treturn [{ byline: fallback, sortOrder: 0, roleLabel: null, source: \"inferred\" }];\n\t\t}\n\t}\n\n\treturn [];\n}\n\nexport type { BylineEntry } from \"./credits.js\";\n\n/**\n * Batch-fetch byline credits for multiple content entries.\n *\n * Per-entry strict-locale hydration: entries are bucketed by `entry.locale`\n * and each bucket gets a single batched call to the strict-locale repo\n * method. Items with no `locale` field (legacy / single-locale installs)\n * share an unscoped bucket.\n *\n * Internal: consumed by `hydrateEntryBylines` in `query.ts` so that every\n * entry returned from `getEmDashCollection` / `getEmDashEntry` already has\n * `data.bylines` populated. Site code should rely on that eager hydration\n * rather than calling this directly -- this function is not re-exported\n * from the `emdash` package entry point.\n *\n * @param collection - The collection slug (e.g., \"posts\")\n * @param entries - Entry id + authorId + locale (each entry resolves at its own locale)\n * @returns Map from entry ID to array of byline credits\n */\nexport async function getBylinesForEntries(\n\tcollection: string,\n\tentries: BylineEntry[],\n): Promise<Map<string, ContentBylineCredit[]>> {\n\tvalidateIdentifier(collection, \"collection\");\n\tif (entries.length === 0) return new Map();\n\treturn resolveBylineCredits(await getDb(), collection, entries);\n}\n\n/**\n * Get content entries credited to a byline, in any credit position.\n *\n * Unlike filtering on the content table's `primary_byline_id` column (which\n * only finds entries where the byline is the first/primary credit), this\n * matches every explicit credit recorded in `_emdash_content_bylines`, so\n * co-authored entries where the byline is a secondary credit are included.\n *\n * `byline` is matched against the byline's `translation_group` (the value\n * stored on credits since migration 040), so a single credit spans every\n * locale variant of the byline. Pass `byline.translationGroup ?? byline.id`\n * from `getByline` / `getBylineBySlug`. An array matches any of the given\n * bylines (OR).\n *\n * The result respects the active locale, status, ordering, and eager\n * hydration of `getEmDashCollection`.\n *\n * @example\n * ```ts\n * import { getBylineBySlug, getEntriesByByline } from \"emdash\";\n *\n * const byline = await getBylineBySlug(\"jane-doe\");\n * if (byline) {\n * const posts = await getEntriesByByline(\"posts\", byline.translationGroup ?? byline.id, {\n * orderBy: { published_at: \"desc\" },\n * });\n * }\n * ```\n *\n * @param collection - The collection slug (e.g. \"posts\")\n * @param byline - A byline translation group, or an array of them (OR)\n * @param options - Optional locale, ordering, status, and limit\n */\nexport async function getEntriesByByline(\n\tcollection: string,\n\tbyline: string | string[],\n\toptions: {\n\t\tlocale?: string;\n\t\torderBy?: Record<string, \"asc\" | \"desc\">;\n\t\tstatus?: \"draft\" | \"published\" | \"archived\";\n\t\tlimit?: number;\n\t} = {},\n): Promise<Array<{ id: string; data: Record<string, unknown> }>> {\n\tconst { getEmDashCollection } = await import(\"../query.js\");\n\n\tconst queryOptions: Record<string, unknown> = {\n\t\twhere: { byline },\n\t};\n\tif (options.locale !== undefined) queryOptions.locale = options.locale;\n\tif (options.orderBy !== undefined) queryOptions.orderBy = options.orderBy;\n\tif (options.status !== undefined) queryOptions.status = options.status;\n\tif (options.limit !== undefined) queryOptions.limit = options.limit;\n\n\tconst { entries } = await getEmDashCollection(collection, queryOptions);\n\treturn entries;\n}\n\n/** Reads `author_id` + `primary_byline_id` for one entry in a single query. */\nasync function getEntryContext(\n\tdb: Awaited<ReturnType<typeof getDb>>,\n\tcollection: string,\n\tentryId: string,\n): Promise<{ authorId: string | null; primaryBylineId: string | null }> {\n\tvalidateIdentifier(collection, \"collection\");\n\tconst tableName = `ec_${collection}`;\n\n\tconst result = await sql<{\n\t\tauthor_id: string | null;\n\t\tprimary_byline_id: string | null;\n\t}>`\n\t\tSELECT author_id, primary_byline_id FROM ${sql.ref(tableName)}\n\t\tWHERE id = ${entryId}\n\t\tLIMIT 1\n\t`.execute(db);\n\n\tconst row = result.rows[0];\n\treturn {\n\t\tauthorId: row?.author_id ?? null,\n\t\tprimaryBylineId: row?.primary_byline_id ?? null,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,wBAA8B;;;;;;;;;;;;;;AAiB9C,eAAsB,UAAU,IAA2C;AAG1E,QADa,IAAI,iBADN,MAAM,OAAO,CACa,CACzB,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BzB,eAAsB,gBACrB,MACA,SACgC;CAChC,MAAM,QAAQ,mBAAmB,SAAS,OAAO;AAEjD,QAAO,cADU,kBAAkB,KAAK,GAAG,MAAM,SAAS,IAAI,MAAM,KAAK,IAAI,GAAG,OACjD,YAAY;EAE1C,MAAM,OAAO,IAAI,iBADN,MAAM,OAAO,CACa;AAErC,MAAI,MAAM,WAAW,EAGpB,QAAO,KAAK,WAAW,KAAK;AAG7B,OAAK,MAAM,UAAU,OAAO;GAC3B,MAAM,MAAM,MAAM,KAAK,WAAW,MAAM,EAAE,QAAQ,CAAC;AACnD,OAAI,IAAK,QAAO;;AAEjB,SAAO;GACN;;;;;;;;;;;;;;;;;;;;AAqEH,eAAsB,qBACrB,YACA,SAC8C;AAC9C,oBAAmB,YAAY,aAAa;AAC5C,KAAI,QAAQ,WAAW,EAAG,wBAAO,IAAI,KAAK;AAC1C,QAAO,qBAAqB,MAAM,OAAO,EAAE,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoChE,eAAsB,mBACrB,YACA,QACA,UAKI,EAAE,EAC0D;CAChE,MAAM,EAAE,wBAAwB,MAAM,OAAO;CAE7C,MAAM,eAAwC,EAC7C,OAAO,EAAE,QAAQ,EACjB;AACD,KAAI,QAAQ,WAAW,OAAW,cAAa,SAAS,QAAQ;AAChE,KAAI,QAAQ,YAAY,OAAW,cAAa,UAAU,QAAQ;AAClE,KAAI,QAAQ,WAAW,OAAW,cAAa,SAAS,QAAQ;AAChE,KAAI,QAAQ,UAAU,OAAW,cAAa,QAAQ,QAAQ;CAE9D,MAAM,EAAE,YAAY,MAAM,oBAAoB,YAAY,aAAa;AACvE,QAAO"}
|
|
1
|
+
{"version":3,"file":"bylines-gyWBWUUc.mjs","names":[],"sources":["../src/bylines/index.ts"],"sourcesContent":["/**\n * Runtime API for bylines\n *\n * Provides functions to query byline profiles and byline credits\n * associated with content entries. Follows the same pattern as\n * the taxonomies runtime API.\n *\n * i18n model (migration 040): byline rows are per-locale and share a\n * `translation_group`. Credits on `_emdash_content_bylines.byline_id` store\n * the translation_group, so a single credit spans every locale of a byline.\n *\n * Hydration is strict per locale: a credit at locale X renders iff a byline\n * row exists at locale X within the credited translation_group. There is no\n * read-time fallback. Mirrors `getEntryTerms` and the convention in PR #916.\n * Locale is passed in by callers — `query.ts` resolves it from the entry's\n * own `data.locale` for the runtime path.\n */\n\nimport { sql } from \"kysely\";\n\nimport { BylineRepository } from \"../database/repositories/byline.js\";\nimport type { BylineSummary, ContentBylineCredit } from \"../database/repositories/types.js\";\nimport { validateIdentifier } from \"../database/validate.js\";\nimport { resolveLocaleChain } from \"../i18n/resolve.js\";\nimport { getDb } from \"../loader.js\";\nimport { requestCached } from \"../request-cache.js\";\nimport { resolveBylineCredits, type BylineEntry } from \"./credits.js\";\n\n/**\n * No-op — kept for API compatibility.\n *\n * Used to invalidate a worker-lifetime \"has any byline?\" probe. That\n * probe added a query on every cold isolate to save one query on sites\n * with zero bylines (i.e. the wrong tradeoff), so we dropped it. The\n * batch byline join below returns an empty map for empty sites at the\n * same cost as the probe, without the pre-check.\n */\nexport function invalidateBylineCache(): void {\n\t// Intentionally empty.\n}\n\n/**\n * Get a byline by ID.\n *\n * @example\n * ```ts\n * import { getByline } from \"emdash\";\n *\n * const byline = await getByline(\"01HXYZ...\");\n * if (byline) {\n * console.log(byline.displayName);\n * }\n * ```\n */\nexport async function getByline(id: string): Promise<BylineSummary | null> {\n\tconst db = await getDb();\n\tconst repo = new BylineRepository(db);\n\treturn repo.findById(id);\n}\n\n/**\n * Get a byline by slug.\n *\n * Standalone identity lookup (e.g. rendering an author profile page). Walks\n * the configured locale fallback chain — same pattern as `getMenu` and\n * `getTerm`, see PR #916. Returns the first match found, walking\n * `[requestedLocale, ...fallbacks, defaultLocale]` in order.\n *\n * Note: this is intentionally different from credit hydration on a content\n * entry (`getEntryBylines`), which is strict per locale with no fallback.\n * The distinction: identity lookups answer \"give me this byline\", and\n * falling back to another locale's display name is acceptable. Credit\n * hydration answers \"what should render on this entry\", where falling back\n * silently surfaces a stale-locale name and contradicts editorial intent.\n *\n * @example\n * ```ts\n * import { getBylineBySlug } from \"emdash\";\n *\n * const byline = await getBylineBySlug(\"jane-doe\", { locale: \"de-de\" });\n * if (byline) {\n * console.log(byline.displayName);\n * }\n * ```\n */\nexport async function getBylineBySlug(\n\tslug: string,\n\toptions?: { locale?: string },\n): Promise<BylineSummary | null> {\n\tconst chain = resolveLocaleChain(options?.locale);\n\tconst cacheKey = `byline-by-slug:${slug}:${chain.length > 0 ? chain.join(\",\") : \"*\"}`;\n\treturn requestCached(cacheKey, async () => {\n\t\tconst db = await getDb();\n\t\tconst repo = new BylineRepository(db);\n\n\t\tif (chain.length === 0) {\n\t\t\t// No i18n or no resolved locale — fall back to the repo's\n\t\t\t// \"lowest-locale-code\" deterministic match.\n\t\t\treturn repo.findBySlug(slug);\n\t\t}\n\n\t\tfor (const locale of chain) {\n\t\t\tconst row = await repo.findBySlug(slug, { locale });\n\t\t\tif (row) return row;\n\t\t}\n\t\treturn null;\n\t});\n}\n\n/**\n * Get byline credits for a single content entry.\n *\n * Strict per locale (post-migration 040): a credit renders iff a byline row\n * exists at the requested locale within the credited translation_group.\n * Callers wanting fallback behaviour apply it themselves. When `locale` is\n * omitted, returns every locale variant of every credit on the entry —\n * useful for admin tooling, not for end-user rendering.\n *\n * Internal: not re-exported from the `emdash` package entry point. Every\n * entry returned by `getEmDashCollection` / `getEmDashEntry` already has\n * `data.bylines` populated by `hydrateEntryBylines` (which uses the batch\n * helper `getBylinesForEntries` directly). Site code should read those\n * fields rather than calling this function.\n */\nexport async function getEntryBylines(\n\tcollection: string,\n\tentryId: string,\n\toptions?: { locale?: string },\n): Promise<ContentBylineCredit[]> {\n\tvalidateIdentifier(collection, \"collection\");\n\tconst db = await getDb();\n\tconst repo = new BylineRepository(db);\n\n\tconst localeOpt = options?.locale !== undefined ? { locale: options.locale } : undefined;\n\tconst explicit = await repo.getContentBylines(collection, entryId, localeOpt);\n\tif (explicit.length > 0) {\n\t\treturn explicit.map((c) => ({ ...c, source: \"explicit\" as const }));\n\t}\n\n\t// `primary_byline_id` is the explicit-credit sentinel: non-null\n\t// suppresses author fallback even when the credit doesn't resolve\n\t// at this locale.\n\tconst ctx = await getEntryContext(db, collection, entryId);\n\tif (ctx.primaryBylineId) return [];\n\n\tif (ctx.authorId) {\n\t\tconst fallback = await repo.findByUserId(ctx.authorId, localeOpt);\n\t\tif (fallback) {\n\t\t\treturn [{ byline: fallback, sortOrder: 0, roleLabel: null, source: \"inferred\" }];\n\t\t}\n\t}\n\n\treturn [];\n}\n\nexport type { BylineEntry } from \"./credits.js\";\n\n/**\n * Batch-fetch byline credits for multiple content entries.\n *\n * Per-entry strict-locale hydration: entries are bucketed by `entry.locale`\n * and each bucket gets a single batched call to the strict-locale repo\n * method. Items with no `locale` field (legacy / single-locale installs)\n * share an unscoped bucket.\n *\n * Internal: consumed by `hydrateEntryBylines` in `query.ts` so that every\n * entry returned from `getEmDashCollection` / `getEmDashEntry` already has\n * `data.bylines` populated. Site code should rely on that eager hydration\n * rather than calling this directly -- this function is not re-exported\n * from the `emdash` package entry point.\n *\n * @param collection - The collection slug (e.g., \"posts\")\n * @param entries - Entry id + authorId + locale (each entry resolves at its own locale)\n * @returns Map from entry ID to array of byline credits\n */\nexport async function getBylinesForEntries(\n\tcollection: string,\n\tentries: BylineEntry[],\n): Promise<Map<string, ContentBylineCredit[]>> {\n\tvalidateIdentifier(collection, \"collection\");\n\tif (entries.length === 0) return new Map();\n\treturn resolveBylineCredits(await getDb(), collection, entries);\n}\n\n/**\n * Get content entries credited to a byline, in any credit position.\n *\n * Unlike filtering on the content table's `primary_byline_id` column (which\n * only finds entries where the byline is the first/primary credit), this\n * matches every explicit credit recorded in `_emdash_content_bylines`, so\n * co-authored entries where the byline is a secondary credit are included.\n *\n * `byline` is matched against the byline's `translation_group` (the value\n * stored on credits since migration 040), so a single credit spans every\n * locale variant of the byline. Pass `byline.translationGroup ?? byline.id`\n * from `getByline` / `getBylineBySlug`. An array matches any of the given\n * bylines (OR).\n *\n * The result respects the active locale, status, ordering, and eager\n * hydration of `getEmDashCollection`.\n *\n * @example\n * ```ts\n * import { getBylineBySlug, getEntriesByByline } from \"emdash\";\n *\n * const byline = await getBylineBySlug(\"jane-doe\");\n * if (byline) {\n * const posts = await getEntriesByByline(\"posts\", byline.translationGroup ?? byline.id, {\n * orderBy: { published_at: \"desc\" },\n * });\n * }\n * ```\n *\n * @param collection - The collection slug (e.g. \"posts\")\n * @param byline - A byline translation group, or an array of them (OR)\n * @param options - Optional locale, ordering, status, and limit\n */\nexport async function getEntriesByByline(\n\tcollection: string,\n\tbyline: string | string[],\n\toptions: {\n\t\tlocale?: string;\n\t\torderBy?: Record<string, \"asc\" | \"desc\">;\n\t\tstatus?: \"draft\" | \"published\" | \"archived\";\n\t\tlimit?: number;\n\t} = {},\n): Promise<Array<{ id: string; data: Record<string, unknown> }>> {\n\tconst { getEmDashCollection } = await import(\"../query.js\");\n\n\tconst queryOptions: Record<string, unknown> = {\n\t\twhere: { byline },\n\t};\n\tif (options.locale !== undefined) queryOptions.locale = options.locale;\n\tif (options.orderBy !== undefined) queryOptions.orderBy = options.orderBy;\n\tif (options.status !== undefined) queryOptions.status = options.status;\n\tif (options.limit !== undefined) queryOptions.limit = options.limit;\n\n\tconst { entries } = await getEmDashCollection(collection, queryOptions);\n\treturn entries;\n}\n\n/** Reads `author_id` + `primary_byline_id` for one entry in a single query. */\nasync function getEntryContext(\n\tdb: Awaited<ReturnType<typeof getDb>>,\n\tcollection: string,\n\tentryId: string,\n): Promise<{ authorId: string | null; primaryBylineId: string | null }> {\n\tvalidateIdentifier(collection, \"collection\");\n\tconst tableName = `ec_${collection}`;\n\n\tconst result = await sql<{\n\t\tauthor_id: string | null;\n\t\tprimary_byline_id: string | null;\n\t}>`\n\t\tSELECT author_id, primary_byline_id FROM ${sql.ref(tableName)}\n\t\tWHERE id = ${entryId}\n\t\tLIMIT 1\n\t`.execute(db);\n\n\tconst row = result.rows[0];\n\treturn {\n\t\tauthorId: row?.author_id ?? null,\n\t\tprimaryBylineId: row?.primary_byline_id ?? null,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,wBAA8B;;;;;;;;;;;;;;AAiB9C,eAAsB,UAAU,IAA2C;AAG1E,QADa,IAAI,iBADN,MAAM,OAAO,CACa,CACzB,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BzB,eAAsB,gBACrB,MACA,SACgC;CAChC,MAAM,QAAQ,mBAAmB,SAAS,OAAO;AAEjD,QAAO,cADU,kBAAkB,KAAK,GAAG,MAAM,SAAS,IAAI,MAAM,KAAK,IAAI,GAAG,OACjD,YAAY;EAE1C,MAAM,OAAO,IAAI,iBADN,MAAM,OAAO,CACa;AAErC,MAAI,MAAM,WAAW,EAGpB,QAAO,KAAK,WAAW,KAAK;AAG7B,OAAK,MAAM,UAAU,OAAO;GAC3B,MAAM,MAAM,MAAM,KAAK,WAAW,MAAM,EAAE,QAAQ,CAAC;AACnD,OAAI,IAAK,QAAO;;AAEjB,SAAO;GACN;;;;;;;;;;;;;;;;;;;;AAqEH,eAAsB,qBACrB,YACA,SAC8C;AAC9C,oBAAmB,YAAY,aAAa;AAC5C,KAAI,QAAQ,WAAW,EAAG,wBAAO,IAAI,KAAK;AAC1C,QAAO,qBAAqB,MAAM,OAAO,EAAE,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoChE,eAAsB,mBACrB,YACA,QACA,UAKI,EAAE,EAC0D;CAChE,MAAM,EAAE,wBAAwB,MAAM,OAAO;CAE7C,MAAM,eAAwC,EAC7C,OAAO,EAAE,QAAQ,EACjB;AACD,KAAI,QAAQ,WAAW,OAAW,cAAa,SAAS,QAAQ;AAChE,KAAI,QAAQ,YAAY,OAAW,cAAa,UAAU,QAAQ;AAClE,KAAI,QAAQ,WAAW,OAAW,cAAa,SAAS,QAAQ;AAChE,KAAI,QAAQ,UAAU,OAAW,cAAa,QAAQ,QAAQ;CAE9D,MAAM,EAAE,YAAY,MAAM,oBAAoB,YAAY,aAAa;AACvE,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"challenge-store-
|
|
1
|
+
{"version":3,"file":"challenge-store-VePApay4.mjs","names":[],"sources":["../src/auth/challenge-store.ts"],"sourcesContent":["/**\n * Challenge store for WebAuthn\n *\n * Stores WebAuthn challenges in a dedicated table with automatic expiration.\n */\n\nimport type { ChallengeStore, ChallengeData } from \"@emdash-cms/auth/passkey\";\nimport type { Kysely } from \"kysely\";\n\nimport type { Database } from \"../database/types.js\";\n\nexport function createChallengeStore(db: Kysely<Database>): ChallengeStore {\n\treturn {\n\t\tasync set(challenge: string, data: ChallengeData): Promise<void> {\n\t\t\tconst expiresAt = new Date(data.expiresAt).toISOString();\n\n\t\t\tawait db\n\t\t\t\t.insertInto(\"auth_challenges\")\n\t\t\t\t.values({\n\t\t\t\t\tchallenge,\n\t\t\t\t\ttype: data.type,\n\t\t\t\t\tuser_id: data.userId ?? null,\n\t\t\t\t\tdata: data.context ?? null,\n\t\t\t\t\texpires_at: expiresAt,\n\t\t\t\t})\n\t\t\t\t.onConflict((oc) =>\n\t\t\t\t\toc.column(\"challenge\").doUpdateSet({\n\t\t\t\t\t\ttype: data.type,\n\t\t\t\t\t\tuser_id: data.userId ?? null,\n\t\t\t\t\t\tdata: data.context ?? null,\n\t\t\t\t\t\texpires_at: expiresAt,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.execute();\n\t\t},\n\n\t\tasync get(challenge: string): Promise<ChallengeData | null> {\n\t\t\tconst row = await db\n\t\t\t\t.selectFrom(\"auth_challenges\")\n\t\t\t\t.selectAll()\n\t\t\t\t.where(\"challenge\", \"=\", challenge)\n\t\t\t\t.executeTakeFirst();\n\n\t\t\tif (!row) return null;\n\n\t\t\tconst expiresAt = new Date(row.expires_at).getTime();\n\n\t\t\t// Check expiration\n\t\t\tif (expiresAt < Date.now()) {\n\t\t\t\t// Expired, delete and return null\n\t\t\t\tawait this.delete(challenge);\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttype: row.type === \"registration\" ? \"registration\" : \"authentication\",\n\t\t\t\tuserId: row.user_id ?? undefined,\n\t\t\t\texpiresAt,\n\t\t\t\t...(row.data === null ? {} : { context: row.data }),\n\t\t\t};\n\t\t},\n\n\t\tasync delete(challenge: string): Promise<void> {\n\t\t\tawait db.deleteFrom(\"auth_challenges\").where(\"challenge\", \"=\", challenge).execute();\n\t\t},\n\t};\n}\n\n/**\n * Clean up expired challenges.\n * Should be called periodically (e.g., on startup, or via cron).\n */\nexport async function cleanupExpiredChallenges(db: Kysely<Database>): Promise<number> {\n\tconst now = new Date().toISOString();\n\n\tconst result = await db\n\t\t.deleteFrom(\"auth_challenges\")\n\t\t.where(\"expires_at\", \"<\", now)\n\t\t.executeTakeFirst();\n\n\treturn Number(result.numDeletedRows ?? 0);\n}\n"],"mappings":";AAWA,SAAgB,qBAAqB,IAAsC;AAC1E,QAAO;EACN,MAAM,IAAI,WAAmB,MAAoC;GAChE,MAAM,YAAY,IAAI,KAAK,KAAK,UAAU,CAAC,aAAa;AAExD,SAAM,GACJ,WAAW,kBAAkB,CAC7B,OAAO;IACP;IACA,MAAM,KAAK;IACX,SAAS,KAAK,UAAU;IACxB,MAAM,KAAK,WAAW;IACtB,YAAY;IACZ,CAAC,CACD,YAAY,OACZ,GAAG,OAAO,YAAY,CAAC,YAAY;IAClC,MAAM,KAAK;IACX,SAAS,KAAK,UAAU;IACxB,MAAM,KAAK,WAAW;IACtB,YAAY;IACZ,CAAC,CACF,CACA,SAAS;;EAGZ,MAAM,IAAI,WAAkD;GAC3D,MAAM,MAAM,MAAM,GAChB,WAAW,kBAAkB,CAC7B,WAAW,CACX,MAAM,aAAa,KAAK,UAAU,CAClC,kBAAkB;AAEpB,OAAI,CAAC,IAAK,QAAO;GAEjB,MAAM,YAAY,IAAI,KAAK,IAAI,WAAW,CAAC,SAAS;AAGpD,OAAI,YAAY,KAAK,KAAK,EAAE;AAE3B,UAAM,KAAK,OAAO,UAAU;AAC5B,WAAO;;AAGR,UAAO;IACN,MAAM,IAAI,SAAS,iBAAiB,iBAAiB;IACrD,QAAQ,IAAI,WAAW;IACvB;IACA,GAAI,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,SAAS,IAAI,MAAM;IAClD;;EAGF,MAAM,OAAO,WAAkC;AAC9C,SAAM,GAAG,WAAW,kBAAkB,CAAC,MAAM,aAAa,KAAK,UAAU,CAAC,SAAS;;EAEpF;;;;;;AAOF,eAAsB,yBAAyB,IAAuC;CACrF,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa;CAEpC,MAAM,SAAS,MAAM,GACnB,WAAW,kBAAkB,CAC7B,MAAM,cAAc,KAAK,IAAI,CAC7B,kBAAkB;AAEpB,QAAO,OAAO,OAAO,kBAAkB,EAAE"}
|
|
@@ -159,4 +159,4 @@ function decodeBase32(value) {
|
|
|
159
159
|
|
|
160
160
|
//#endregion
|
|
161
161
|
export { UNSUPPORTED_AUTH_MESSAGE as a, verificationError as i, multihashFromBlobCid as n, unsupportedAuthDetails as o, verifyMultihash as r, computeArtifactDigestCandidates as t };
|
|
162
|
-
//# sourceMappingURL=checksum-
|
|
162
|
+
//# sourceMappingURL=checksum-BSIhEAYW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checksum-DtH6m5uk.mjs","names":[],"sources":["../../registry-verification/dist/auth-B730dpJ4.js","../../registry-verification/dist/errors-D3_zxvwe.js","../../registry-verification/dist/checksum.js"],"sourcesContent":["//#region src/auth.ts\nconst UNSUPPORTED_AUTH_MESSAGE = \"This release requires an authentication method the client does not support.\";\nfunction unsupportedAuthDetails(auth) {\n\tif (!isRecord(auth) || typeof auth.hint_url !== \"string\" || auth.hint_url.length > 2048) return;\n\ttry {\n\t\tconst url = new URL(auth.hint_url);\n\t\tif (url.protocol !== \"https:\" || url.username || url.password) return void 0;\n\t\treturn { hintUrl: url.href };\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction isRecord(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n//#endregion\nexport { unsupportedAuthDetails as n, UNSUPPORTED_AUTH_MESSAGE as t };\n//# sourceMappingURL=auth-B730dpJ4.js.map","//#region src/errors.ts\n/** Stable, machine-readable failures returned by this package. */\nconst VERIFICATION_ERROR_CODES = [\n\t\"AUTH_METHOD_UNSUPPORTED\",\n\t\"BLOB_METADATA_MISMATCH\",\n\t\"BLOB_REF_INVALID\",\n\t\"BUNDLE_COMPRESSED_SIZE_EXCEEDED\",\n\t\"BUNDLE_DECOMPRESSED_SIZE_EXCEEDED\",\n\t\"BUNDLE_FILE_COUNT_EXCEEDED\",\n\t\"BUNDLE_FILE_SIZE_EXCEEDED\",\n\t\"BUNDLE_ID_MISMATCH\",\n\t\"BUNDLE_INVALID_ARCHIVE\",\n\t\"BUNDLE_INVALID_MANIFEST\",\n\t\"BUNDLE_INVALID_PATH\",\n\t\"BUNDLE_MISSING_BACKEND\",\n\t\"BUNDLE_MISSING_MANIFEST\",\n\t\"BUNDLE_PATH_COLLISION\",\n\t\"BUNDLE_UNSUPPORTED_ENTRY\",\n\t\"BUNDLE_VERSION_MISMATCH\",\n\t\"CHECKSUM_MISMATCH\",\n\t\"FETCH_FAILED\",\n\t\"HOST_REJECTED\",\n\t\"INVALID_MULTIHASH\",\n\t\"INVALID_URL\",\n\t\"PDS_RESOLUTION_FAILED\",\n\t\"PROFILE_EXTENSION_INVALID\",\n\t\"PROFILE_ID_MISMATCH\",\n\t\"PROFILE_LEXICON_INVALID\",\n\t\"PROFILE_POLICY_INVALID\",\n\t\"PROFILE_REPOSITORY_INVALID\",\n\t\"PROVENANCE_REQUIRED\",\n\t\"PROVENANCE_UNVERIFIABLE\",\n\t\"REDIRECT_LIMIT_EXCEEDED\",\n\t\"REDIRECT_LOCATION_MISSING\",\n\t\"RESOURCE_SIZE_EXCEEDED\",\n\t\"RESOURCE_STATUS_ERROR\",\n\t\"RESOURCE_TIMEOUT\",\n\t\"RELEASE_EXTENSION_INVALID\",\n\t\"RELEASE_EXTENSION_MISSING\",\n\t\"RELEASE_ARTIFACT_SOURCE_MISSING\",\n\t\"RELEASE_LEXICON_INVALID\",\n\t\"RELEASE_PACKAGE_MISMATCH\",\n\t\"RELEASE_RKEY_MISMATCH\",\n\t\"RELEASE_VERSION_INVALID\",\n\t\"RELEASE_VERSION_MISMATCH\",\n\t\"UNSUPPORTED_MULTIHASH\"\n];\nfunction verificationError(code, message, details) {\n\treturn {\n\t\tsuccess: false,\n\t\terror: {\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\t...details === void 0 ? {} : { details }\n\t\t}\n\t};\n}\n\n//#endregion\nexport { verificationError as n, VERIFICATION_ERROR_CODES as t };\n//# sourceMappingURL=errors-D3_zxvwe.js.map","import { n as verificationError } from \"./errors-D3_zxvwe.js\";\n\n//#region src/checksum.ts\nconst SHA2_256_CODE = 18;\nconst SHA2_256_LENGTH = 32;\nconst BASE32_ALPHABET = \"abcdefghijklmnopqrstuvwxyz234567\";\n/** Derive the required artifact checksum from a raw sha2-256 blob CID. */\nfunction multihashFromBlobCid(value) {\n\tif (!value.startsWith(\"b\")) return verificationError(\"BLOB_REF_INVALID\", \"The blob reference CID is malformed.\");\n\tconst bytes = decodeBase32(value.slice(1));\n\tif (bytes === null || bytes.length !== 36 || bytes[0] !== 1 || bytes[1] !== 85) return verificationError(\"BLOB_REF_INVALID\", \"Blob references must use a CIDv1 raw sha2-256 CID.\");\n\tconst checksum = `b${encodeBase32(bytes.slice(2))}`;\n\tif (!decodeMultihash(checksum).success) return verificationError(\"BLOB_REF_INVALID\", \"Blob references must use a CIDv1 raw sha2-256 CID.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: checksum\n\t};\n}\n/** Decodes a lowercase base32 multibase-encoded multihash. */\nfunction decodeMultihash(value) {\n\tif (!value.startsWith(\"b\")) return verificationError(\"INVALID_MULTIHASH\", \"Checksums must be lowercase base32 multibase-encoded multihashes.\");\n\tconst bytes = decodeBase32(value.slice(1));\n\tif (bytes === null) return verificationError(\"INVALID_MULTIHASH\", \"The multibase checksum is malformed.\");\n\tconst code = readVarint(bytes, 0);\n\tif (code === null) return verificationError(\"INVALID_MULTIHASH\", \"The multihash algorithm code is malformed.\");\n\tconst length = readVarint(bytes, code.nextOffset);\n\tif (length === null || length.value !== bytes.length - length.nextOffset) return verificationError(\"INVALID_MULTIHASH\", \"The multihash digest length is malformed.\");\n\tif (code.value !== SHA2_256_CODE) return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\tif (length.value !== SHA2_256_LENGTH) return verificationError(\"INVALID_MULTIHASH\", \"The sha2-256 digest must be 32 bytes.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: {\n\t\t\talgorithm: \"sha2-256\",\n\t\t\tdigest: bytes.slice(length.nextOffset)\n\t\t}\n\t};\n}\nasync function computeMultihash(bytes, algorithm = \"sha2-256\") {\n\tif (algorithm !== \"sha2-256\") return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\ttry {\n\t\tconst digest = new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)));\n\t\tconst multihash = new Uint8Array(2 + digest.length);\n\t\tmultihash[0] = SHA2_256_CODE;\n\t\tmultihash[1] = digest.length;\n\t\tmultihash.set(digest, 2);\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tvalue: `b${encodeBase32(multihash)}`\n\t\t};\n\t} catch {\n\t\treturn verificationError(\"UNSUPPORTED_MULTIHASH\", \"The sha2-256 algorithm is unavailable.\");\n\t}\n}\nasync function computeArtifactDigestCandidates(bytes) {\n\tconst [sha256, sha384, sha512] = await Promise.all([\n\t\tcrypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)),\n\t\tcrypto.subtle.digest(\"SHA-384\", new Uint8Array(bytes)),\n\t\tcrypto.subtle.digest(\"SHA-512\", new Uint8Array(bytes))\n\t]);\n\treturn [\n\t\tnew Uint8Array(sha256),\n\t\tnew Uint8Array(sha384),\n\t\tnew Uint8Array(sha512)\n\t];\n}\nasync function verifyMultihash(bytes, expected) {\n\tconst decoded = decodeMultihash(expected);\n\tif (!decoded.success) return decoded;\n\tconst actual = await computeDigest(bytes, decoded.value.algorithm);\n\tif (!actual.success) return actual;\n\tif (!compareDigestBytes(actual.value, decoded.value.digest)) return verificationError(\"CHECKSUM_MISMATCH\", \"The resource bytes do not match the expected checksum.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: true\n\t};\n}\n/**\n* Compare public checksum digest bytes without early exit. Digests are public\n* integrity metadata, so a portable byte loop is preferable to a Node-only\n* timing primitive while still avoiding an ordinary equality short circuit.\n*/\nfunction compareDigestBytes(left, right) {\n\tlet difference = left.length ^ right.length;\n\tconst maximumLength = Math.max(left.length, right.length);\n\tfor (let index = 0; index < maximumLength; index += 1) difference |= (left[index] ?? 0) ^ (right[index] ?? 0);\n\treturn difference === 0;\n}\nasync function computeDigest(bytes, algorithm) {\n\tif (algorithm !== \"sha2-256\") return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\ttry {\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tvalue: new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)))\n\t\t};\n\t} catch {\n\t\treturn verificationError(\"UNSUPPORTED_MULTIHASH\", \"The sha2-256 algorithm is unavailable.\");\n\t}\n}\nfunction readVarint(bytes, offset) {\n\tlet value = 0;\n\tlet shift = 0;\n\tfor (let index = offset; index < bytes.length && index < offset + 5; index += 1) {\n\t\tconst byte = bytes[index];\n\t\tif (byte === void 0) return null;\n\t\tvalue |= (byte & 127) << shift;\n\t\tif ((byte & 128) === 0) return {\n\t\t\tvalue,\n\t\t\tnextOffset: index + 1\n\t\t};\n\t\tshift += 7;\n\t}\n\treturn null;\n}\nfunction encodeBase32(bytes) {\n\tlet result = \"\";\n\tlet buffer = 0;\n\tlet bits = 0;\n\tfor (const byte of bytes) {\n\t\tbuffer = buffer << 8 | byte;\n\t\tbits += 8;\n\t\twhile (bits >= 5) {\n\t\t\tresult += BASE32_ALPHABET[buffer >>> bits - 5 & 31] ?? \"\";\n\t\t\tbits -= 5;\n\t\t}\n\t}\n\tif (bits > 0) result += BASE32_ALPHABET[buffer << 5 - bits & 31] ?? \"\";\n\treturn result;\n}\nfunction decodeBase32(value) {\n\tif (value.length === 0) return null;\n\tlet buffer = 0;\n\tlet bits = 0;\n\tconst output = [];\n\tfor (const character of value) {\n\t\tconst digit = BASE32_ALPHABET.indexOf(character);\n\t\tif (digit === -1) return null;\n\t\tbuffer = buffer << 5 | digit;\n\t\tbits += 5;\n\t\tif (bits >= 8) {\n\t\t\toutput.push(buffer >>> bits - 8 & 255);\n\t\t\tbits -= 8;\n\t\t}\n\t}\n\tif (bits > 0 && (buffer & (1 << bits) - 1) !== 0) return null;\n\treturn new Uint8Array(output);\n}\n\n//#endregion\nexport { compareDigestBytes, computeArtifactDigestCandidates, computeMultihash, decodeMultihash, multihashFromBlobCid, verifyMultihash };\n//# sourceMappingURL=checksum.js.map"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"checksum-BSIhEAYW.mjs","names":[],"sources":["../../registry-verification/dist/auth-B730dpJ4.js","../../registry-verification/dist/errors-D3_zxvwe.js","../../registry-verification/dist/checksum.js"],"sourcesContent":["//#region src/auth.ts\nconst UNSUPPORTED_AUTH_MESSAGE = \"This release requires an authentication method the client does not support.\";\nfunction unsupportedAuthDetails(auth) {\n\tif (!isRecord(auth) || typeof auth.hint_url !== \"string\" || auth.hint_url.length > 2048) return;\n\ttry {\n\t\tconst url = new URL(auth.hint_url);\n\t\tif (url.protocol !== \"https:\" || url.username || url.password) return void 0;\n\t\treturn { hintUrl: url.href };\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction isRecord(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n//#endregion\nexport { unsupportedAuthDetails as n, UNSUPPORTED_AUTH_MESSAGE as t };\n//# sourceMappingURL=auth-B730dpJ4.js.map","//#region src/errors.ts\n/** Stable, machine-readable failures returned by this package. */\nconst VERIFICATION_ERROR_CODES = [\n\t\"AUTH_METHOD_UNSUPPORTED\",\n\t\"BLOB_METADATA_MISMATCH\",\n\t\"BLOB_REF_INVALID\",\n\t\"BUNDLE_COMPRESSED_SIZE_EXCEEDED\",\n\t\"BUNDLE_DECOMPRESSED_SIZE_EXCEEDED\",\n\t\"BUNDLE_FILE_COUNT_EXCEEDED\",\n\t\"BUNDLE_FILE_SIZE_EXCEEDED\",\n\t\"BUNDLE_ID_MISMATCH\",\n\t\"BUNDLE_INVALID_ARCHIVE\",\n\t\"BUNDLE_INVALID_MANIFEST\",\n\t\"BUNDLE_INVALID_PATH\",\n\t\"BUNDLE_MISSING_BACKEND\",\n\t\"BUNDLE_MISSING_MANIFEST\",\n\t\"BUNDLE_PATH_COLLISION\",\n\t\"BUNDLE_UNSUPPORTED_ENTRY\",\n\t\"BUNDLE_VERSION_MISMATCH\",\n\t\"CHECKSUM_MISMATCH\",\n\t\"FETCH_FAILED\",\n\t\"HOST_REJECTED\",\n\t\"INVALID_MULTIHASH\",\n\t\"INVALID_URL\",\n\t\"PDS_RESOLUTION_FAILED\",\n\t\"PROFILE_EXTENSION_INVALID\",\n\t\"PROFILE_ID_MISMATCH\",\n\t\"PROFILE_LEXICON_INVALID\",\n\t\"PROFILE_POLICY_INVALID\",\n\t\"PROFILE_REPOSITORY_INVALID\",\n\t\"PROVENANCE_REQUIRED\",\n\t\"PROVENANCE_UNVERIFIABLE\",\n\t\"REDIRECT_LIMIT_EXCEEDED\",\n\t\"REDIRECT_LOCATION_MISSING\",\n\t\"RESOURCE_SIZE_EXCEEDED\",\n\t\"RESOURCE_STATUS_ERROR\",\n\t\"RESOURCE_TIMEOUT\",\n\t\"RELEASE_EXTENSION_INVALID\",\n\t\"RELEASE_EXTENSION_MISSING\",\n\t\"RELEASE_ARTIFACT_SOURCE_MISSING\",\n\t\"RELEASE_LEXICON_INVALID\",\n\t\"RELEASE_PACKAGE_MISMATCH\",\n\t\"RELEASE_RKEY_MISMATCH\",\n\t\"RELEASE_VERSION_INVALID\",\n\t\"RELEASE_VERSION_MISMATCH\",\n\t\"UNSUPPORTED_MULTIHASH\"\n];\nfunction verificationError(code, message, details) {\n\treturn {\n\t\tsuccess: false,\n\t\terror: {\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\t...details === void 0 ? {} : { details }\n\t\t}\n\t};\n}\n\n//#endregion\nexport { verificationError as n, VERIFICATION_ERROR_CODES as t };\n//# sourceMappingURL=errors-D3_zxvwe.js.map","import { n as verificationError } from \"./errors-D3_zxvwe.js\";\n\n//#region src/checksum.ts\nconst SHA2_256_CODE = 18;\nconst SHA2_256_LENGTH = 32;\nconst BASE32_ALPHABET = \"abcdefghijklmnopqrstuvwxyz234567\";\n/** Derive the required artifact checksum from a raw sha2-256 blob CID. */\nfunction multihashFromBlobCid(value) {\n\tif (!value.startsWith(\"b\")) return verificationError(\"BLOB_REF_INVALID\", \"The blob reference CID is malformed.\");\n\tconst bytes = decodeBase32(value.slice(1));\n\tif (bytes === null || bytes.length !== 36 || bytes[0] !== 1 || bytes[1] !== 85) return verificationError(\"BLOB_REF_INVALID\", \"Blob references must use a CIDv1 raw sha2-256 CID.\");\n\tconst checksum = `b${encodeBase32(bytes.slice(2))}`;\n\tif (!decodeMultihash(checksum).success) return verificationError(\"BLOB_REF_INVALID\", \"Blob references must use a CIDv1 raw sha2-256 CID.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: checksum\n\t};\n}\n/** Decodes a lowercase base32 multibase-encoded multihash. */\nfunction decodeMultihash(value) {\n\tif (!value.startsWith(\"b\")) return verificationError(\"INVALID_MULTIHASH\", \"Checksums must be lowercase base32 multibase-encoded multihashes.\");\n\tconst bytes = decodeBase32(value.slice(1));\n\tif (bytes === null) return verificationError(\"INVALID_MULTIHASH\", \"The multibase checksum is malformed.\");\n\tconst code = readVarint(bytes, 0);\n\tif (code === null) return verificationError(\"INVALID_MULTIHASH\", \"The multihash algorithm code is malformed.\");\n\tconst length = readVarint(bytes, code.nextOffset);\n\tif (length === null || length.value !== bytes.length - length.nextOffset) return verificationError(\"INVALID_MULTIHASH\", \"The multihash digest length is malformed.\");\n\tif (code.value !== SHA2_256_CODE) return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\tif (length.value !== SHA2_256_LENGTH) return verificationError(\"INVALID_MULTIHASH\", \"The sha2-256 digest must be 32 bytes.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: {\n\t\t\talgorithm: \"sha2-256\",\n\t\t\tdigest: bytes.slice(length.nextOffset)\n\t\t}\n\t};\n}\nasync function computeMultihash(bytes, algorithm = \"sha2-256\") {\n\tif (algorithm !== \"sha2-256\") return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\ttry {\n\t\tconst digest = new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)));\n\t\tconst multihash = new Uint8Array(2 + digest.length);\n\t\tmultihash[0] = SHA2_256_CODE;\n\t\tmultihash[1] = digest.length;\n\t\tmultihash.set(digest, 2);\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tvalue: `b${encodeBase32(multihash)}`\n\t\t};\n\t} catch {\n\t\treturn verificationError(\"UNSUPPORTED_MULTIHASH\", \"The sha2-256 algorithm is unavailable.\");\n\t}\n}\nasync function computeArtifactDigestCandidates(bytes) {\n\tconst [sha256, sha384, sha512] = await Promise.all([\n\t\tcrypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)),\n\t\tcrypto.subtle.digest(\"SHA-384\", new Uint8Array(bytes)),\n\t\tcrypto.subtle.digest(\"SHA-512\", new Uint8Array(bytes))\n\t]);\n\treturn [\n\t\tnew Uint8Array(sha256),\n\t\tnew Uint8Array(sha384),\n\t\tnew Uint8Array(sha512)\n\t];\n}\nasync function verifyMultihash(bytes, expected) {\n\tconst decoded = decodeMultihash(expected);\n\tif (!decoded.success) return decoded;\n\tconst actual = await computeDigest(bytes, decoded.value.algorithm);\n\tif (!actual.success) return actual;\n\tif (!compareDigestBytes(actual.value, decoded.value.digest)) return verificationError(\"CHECKSUM_MISMATCH\", \"The resource bytes do not match the expected checksum.\");\n\treturn {\n\t\tsuccess: true,\n\t\tvalue: true\n\t};\n}\n/**\n* Compare public checksum digest bytes without early exit. Digests are public\n* integrity metadata, so a portable byte loop is preferable to a Node-only\n* timing primitive while still avoiding an ordinary equality short circuit.\n*/\nfunction compareDigestBytes(left, right) {\n\tlet difference = left.length ^ right.length;\n\tconst maximumLength = Math.max(left.length, right.length);\n\tfor (let index = 0; index < maximumLength; index += 1) difference |= (left[index] ?? 0) ^ (right[index] ?? 0);\n\treturn difference === 0;\n}\nasync function computeDigest(bytes, algorithm) {\n\tif (algorithm !== \"sha2-256\") return verificationError(\"UNSUPPORTED_MULTIHASH\", \"The multihash algorithm is not supported.\");\n\ttry {\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tvalue: new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new Uint8Array(bytes)))\n\t\t};\n\t} catch {\n\t\treturn verificationError(\"UNSUPPORTED_MULTIHASH\", \"The sha2-256 algorithm is unavailable.\");\n\t}\n}\nfunction readVarint(bytes, offset) {\n\tlet value = 0;\n\tlet shift = 0;\n\tfor (let index = offset; index < bytes.length && index < offset + 5; index += 1) {\n\t\tconst byte = bytes[index];\n\t\tif (byte === void 0) return null;\n\t\tvalue |= (byte & 127) << shift;\n\t\tif ((byte & 128) === 0) return {\n\t\t\tvalue,\n\t\t\tnextOffset: index + 1\n\t\t};\n\t\tshift += 7;\n\t}\n\treturn null;\n}\nfunction encodeBase32(bytes) {\n\tlet result = \"\";\n\tlet buffer = 0;\n\tlet bits = 0;\n\tfor (const byte of bytes) {\n\t\tbuffer = buffer << 8 | byte;\n\t\tbits += 8;\n\t\twhile (bits >= 5) {\n\t\t\tresult += BASE32_ALPHABET[buffer >>> bits - 5 & 31] ?? \"\";\n\t\t\tbits -= 5;\n\t\t}\n\t}\n\tif (bits > 0) result += BASE32_ALPHABET[buffer << 5 - bits & 31] ?? \"\";\n\treturn result;\n}\nfunction decodeBase32(value) {\n\tif (value.length === 0) return null;\n\tlet buffer = 0;\n\tlet bits = 0;\n\tconst output = [];\n\tfor (const character of value) {\n\t\tconst digit = BASE32_ALPHABET.indexOf(character);\n\t\tif (digit === -1) return null;\n\t\tbuffer = buffer << 5 | digit;\n\t\tbits += 5;\n\t\tif (bits >= 8) {\n\t\t\toutput.push(buffer >>> bits - 8 & 255);\n\t\t\tbits -= 8;\n\t\t}\n\t}\n\tif (bits > 0 && (buffer & (1 << bits) - 1) !== 0) return null;\n\treturn new Uint8Array(output);\n}\n\n//#endregion\nexport { compareDigestBytes, computeArtifactDigestCandidates, computeMultihash, decodeMultihash, multihashFromBlobCid, verifyMultihash };\n//# sourceMappingURL=checksum.js.map"],"mappings":"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"}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -27,42 +27,42 @@ import { t as BylineRepository } from "../byline-02tu_Uc-.mjs";
|
|
|
27
27
|
import "../staged-Bw5eHbKS.mjs";
|
|
28
28
|
import "../dist-Cfu8mMBs.mjs";
|
|
29
29
|
import "../fts-manager-DU03MxWu.mjs";
|
|
30
|
-
import { h as selectTaxonomyDefs, p as parseTaxonomyCollections } from "../loader-
|
|
30
|
+
import { h as selectTaxonomyDefs, p as parseTaxonomyCollections } from "../loader-D4edocWH.mjs";
|
|
31
31
|
import "../collection-slugs-cache-BNRAPNiu.mjs";
|
|
32
32
|
import "../capture-triggers-CdZfvHtF.mjs";
|
|
33
33
|
import "../activation-DDuqAat2.mjs";
|
|
34
|
-
import "../
|
|
35
|
-
import { L as BlockTypeRegistry, n as SchemaRegistry } from "../registry-
|
|
34
|
+
import "../media-usage-work-VO108Q9E.mjs";
|
|
35
|
+
import { L as BlockTypeRegistry, n as SchemaRegistry } from "../registry-CzPJNu3H.mjs";
|
|
36
36
|
import "../hash-CY4QdeMJ.mjs";
|
|
37
37
|
import "../zod-generator-DnfG5sGQ.mjs";
|
|
38
38
|
import { r as isTransferError, t as TransferError } from "../errors-CjXd1LgH.mjs";
|
|
39
39
|
import "../canonical-CAecl1UQ.mjs";
|
|
40
40
|
import { d as sha256Hex, i as createSha256, s as packageDigest } from "../digest-DiYAoZpf.mjs";
|
|
41
|
-
import "../block-values-
|
|
42
|
-
import "../query-
|
|
43
|
-
import "../schema-
|
|
44
|
-
import "../relations-
|
|
45
|
-
import "../settings-
|
|
46
|
-
import "../schema-
|
|
47
|
-
import "../settings-
|
|
48
|
-
import "../ssrf-
|
|
49
|
-
import { t as applySeed } from "../apply-
|
|
50
|
-
import "../ssrf-
|
|
51
|
-
import { n as validateSeed } from "../validate-
|
|
52
|
-
import { a as MigrationManifestValidationError, c as normalizeAstroI18n, i as getMigrationIntegrationMetadata, n as MIGRATION_CONFIG_SYMBOL, s as validateMigrationManifest, t as buildMigrationManifest } from "../manifest-builder-
|
|
53
|
-
import "../identity-
|
|
54
|
-
import { n as claimExplicitSeedOwnership } from "../ownership-
|
|
41
|
+
import "../block-values-Bho1nsZF.mjs";
|
|
42
|
+
import "../query-BRNTde3V.mjs";
|
|
43
|
+
import "../schema-27XefSYG.mjs";
|
|
44
|
+
import "../relations-C8JpSkU6.mjs";
|
|
45
|
+
import "../settings-CwcrX-Ay.mjs";
|
|
46
|
+
import "../schema-Btvj3BMh.mjs";
|
|
47
|
+
import "../settings-D_cJtT48.mjs";
|
|
48
|
+
import "../ssrf-CRJ-xom5.mjs";
|
|
49
|
+
import { t as applySeed } from "../apply-CDNV4JJ-.mjs";
|
|
50
|
+
import "../ssrf-sC4_5rxm.mjs";
|
|
51
|
+
import { n as validateSeed } from "../validate-BttYU7NK.mjs";
|
|
52
|
+
import { a as MigrationManifestValidationError, c as normalizeAstroI18n, i as getMigrationIntegrationMetadata, n as MIGRATION_CONFIG_SYMBOL, s as validateMigrationManifest, t as buildMigrationManifest } from "../manifest-builder-8jsSLR7s.mjs";
|
|
53
|
+
import "../identity-DJ-5AcdG.mjs";
|
|
54
|
+
import { n as claimExplicitSeedOwnership } from "../ownership-Bd77AmJz.mjs";
|
|
55
55
|
import { LocalStorage } from "../storage/local.mjs";
|
|
56
|
-
import { t as createDatabase } from "../connection-
|
|
57
|
-
import { t as convertDataForRead } from "../portable-text-
|
|
56
|
+
import { t as createDatabase } from "../connection-C5GIciX9.mjs";
|
|
57
|
+
import { t as convertDataForRead } from "../portable-text-kcyN3F-a.mjs";
|
|
58
58
|
import { createHeaderAwareFetch, customHeadersInterceptor, getCachedAccessToken, isAccessRedirect, resolveCustomHeaders, runCloudflaredLogin } from "../client/cf-access.mjs";
|
|
59
59
|
import { EmDashApiError, EmDashClient } from "../client/index.mjs";
|
|
60
|
-
import { a as parseIndexLine, n as unpackSitePackage, o as parseManifest, r as decodeUtf8, t as packSitePackage } from "../tar-
|
|
61
|
-
import "../kinds-
|
|
62
|
-
import { t as MANIFEST_PATH } from "../paths-
|
|
63
|
-
import "../transformations-
|
|
64
|
-
import "../version-
|
|
65
|
-
import { r as verifyReceiptDigest } from "../receipt-
|
|
60
|
+
import { a as parseIndexLine, n as unpackSitePackage, o as parseManifest, r as decodeUtf8, t as packSitePackage } from "../tar-BGOZARjy.mjs";
|
|
61
|
+
import "../kinds-D1A-00-F.mjs";
|
|
62
|
+
import { t as MANIFEST_PATH } from "../paths-DkS74lBM.mjs";
|
|
63
|
+
import "../transformations-BtQdvyly.mjs";
|
|
64
|
+
import "../version-CseoDDOd.mjs";
|
|
65
|
+
import { r as verifyReceiptDigest } from "../receipt-C4icyHlC.mjs";
|
|
66
66
|
import { createRequire } from "node:module";
|
|
67
67
|
import { sql } from "kysely";
|
|
68
68
|
import { z } from "zod";
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as ContentFieldFilters } from "../content-list-query-
|
|
2
|
-
import { j as UpdateBlockTypeInput, k as CreateBlockTypeInput, w as BlockType } from "../types-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-
|
|
1
|
+
import { r as ContentFieldFilters } from "../content-list-query-B6P37Ug_.mjs";
|
|
2
|
+
import { j as UpdateBlockTypeInput, k as CreateBlockTypeInput, w as BlockType } from "../types-Bs4bi95j.mjs";
|
|
3
|
+
import "../types-ibtP7GEA.mjs";
|
|
4
|
+
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-SnhS6xku.mjs";
|
|
5
5
|
import { Kysely } from "kysely";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
@@ -65,15 +65,15 @@ declare const siteImportPlanSchema: z.ZodObject<{
|
|
|
65
65
|
emdashVersion: z.ZodString;
|
|
66
66
|
}, z.core.$strict>;
|
|
67
67
|
counts: z.ZodRecord<z.ZodEnum<{
|
|
68
|
-
collection: "collection";
|
|
69
|
-
term: "term";
|
|
70
68
|
seo: "seo";
|
|
71
|
-
|
|
69
|
+
media: "media";
|
|
72
70
|
byline: "byline";
|
|
73
|
-
|
|
71
|
+
collection: "collection";
|
|
74
72
|
setting: "setting";
|
|
73
|
+
relation: "relation";
|
|
75
74
|
widget: "widget";
|
|
76
|
-
|
|
75
|
+
term: "term";
|
|
76
|
+
menu: "menu";
|
|
77
77
|
principal: "principal";
|
|
78
78
|
block_type: "block_type";
|
|
79
79
|
block_type_version: "block_type_version";
|
|
@@ -140,15 +140,15 @@ declare const siteImportPlanSchema: z.ZodObject<{
|
|
|
140
140
|
unknown_storage_key: "unknown_storage_key";
|
|
141
141
|
}>;
|
|
142
142
|
kind: z.ZodEnum<{
|
|
143
|
-
collection: "collection";
|
|
144
|
-
term: "term";
|
|
145
143
|
seo: "seo";
|
|
146
|
-
|
|
144
|
+
media: "media";
|
|
147
145
|
byline: "byline";
|
|
148
|
-
|
|
146
|
+
collection: "collection";
|
|
149
147
|
setting: "setting";
|
|
148
|
+
relation: "relation";
|
|
150
149
|
widget: "widget";
|
|
151
|
-
|
|
150
|
+
term: "term";
|
|
151
|
+
menu: "menu";
|
|
152
152
|
principal: "principal";
|
|
153
153
|
block_type: "block_type";
|
|
154
154
|
block_type_version: "block_type_version";
|
|
@@ -212,15 +212,15 @@ declare const siteImportPlanSchema: z.ZodObject<{
|
|
|
212
212
|
}>;
|
|
213
213
|
message: z.ZodString;
|
|
214
214
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
215
|
-
collection: "collection";
|
|
216
|
-
term: "term";
|
|
217
215
|
seo: "seo";
|
|
218
|
-
|
|
216
|
+
media: "media";
|
|
219
217
|
byline: "byline";
|
|
220
|
-
|
|
218
|
+
collection: "collection";
|
|
221
219
|
setting: "setting";
|
|
220
|
+
relation: "relation";
|
|
222
221
|
widget: "widget";
|
|
223
|
-
|
|
222
|
+
term: "term";
|
|
223
|
+
menu: "menu";
|
|
224
224
|
principal: "principal";
|
|
225
225
|
block_type: "block_type";
|
|
226
226
|
block_type_version: "block_type_version";
|
|
@@ -273,15 +273,15 @@ declare const siteImportPlanSchema: z.ZodObject<{
|
|
|
273
273
|
}>;
|
|
274
274
|
message: z.ZodString;
|
|
275
275
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
276
|
-
collection: "collection";
|
|
277
|
-
term: "term";
|
|
278
276
|
seo: "seo";
|
|
279
|
-
|
|
277
|
+
media: "media";
|
|
280
278
|
byline: "byline";
|
|
281
|
-
|
|
279
|
+
collection: "collection";
|
|
282
280
|
setting: "setting";
|
|
281
|
+
relation: "relation";
|
|
283
282
|
widget: "widget";
|
|
284
|
-
|
|
283
|
+
term: "term";
|
|
284
|
+
menu: "menu";
|
|
285
285
|
principal: "principal";
|
|
286
286
|
block_type: "block_type";
|
|
287
287
|
block_type_version: "block_type_version";
|
|
@@ -361,15 +361,15 @@ declare const exportCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
361
361
|
}, z.core.$strict>>;
|
|
362
362
|
}, z.core.$strict>;
|
|
363
363
|
kind: z.ZodEnum<{
|
|
364
|
-
collection: "collection";
|
|
365
|
-
term: "term";
|
|
366
364
|
seo: "seo";
|
|
367
|
-
|
|
365
|
+
media: "media";
|
|
368
366
|
byline: "byline";
|
|
369
|
-
|
|
367
|
+
collection: "collection";
|
|
370
368
|
setting: "setting";
|
|
369
|
+
relation: "relation";
|
|
371
370
|
widget: "widget";
|
|
372
|
-
|
|
371
|
+
term: "term";
|
|
372
|
+
menu: "menu";
|
|
373
373
|
principal: "principal";
|
|
374
374
|
block_type: "block_type";
|
|
375
375
|
block_type_version: "block_type_version";
|
|
@@ -431,15 +431,15 @@ declare const exportCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
431
431
|
stage: z.ZodLiteral<"export_validate">;
|
|
432
432
|
position: z.ZodNullable<z.ZodObject<{
|
|
433
433
|
kind: z.ZodEnum<{
|
|
434
|
-
collection: "collection";
|
|
435
|
-
term: "term";
|
|
436
434
|
seo: "seo";
|
|
437
|
-
|
|
435
|
+
media: "media";
|
|
438
436
|
byline: "byline";
|
|
439
|
-
|
|
437
|
+
collection: "collection";
|
|
440
438
|
setting: "setting";
|
|
439
|
+
relation: "relation";
|
|
441
440
|
widget: "widget";
|
|
442
|
-
|
|
441
|
+
term: "term";
|
|
442
|
+
menu: "menu";
|
|
443
443
|
principal: "principal";
|
|
444
444
|
block_type: "block_type";
|
|
445
445
|
block_type_version: "block_type_version";
|
|
@@ -474,15 +474,15 @@ declare const analysisCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
474
474
|
stage: z.ZodLiteral<"analyze_records">;
|
|
475
475
|
position: z.ZodObject<{
|
|
476
476
|
kind: z.ZodEnum<{
|
|
477
|
-
collection: "collection";
|
|
478
|
-
term: "term";
|
|
479
477
|
seo: "seo";
|
|
480
|
-
|
|
478
|
+
media: "media";
|
|
481
479
|
byline: "byline";
|
|
482
|
-
|
|
480
|
+
collection: "collection";
|
|
483
481
|
setting: "setting";
|
|
482
|
+
relation: "relation";
|
|
484
483
|
widget: "widget";
|
|
485
|
-
|
|
484
|
+
term: "term";
|
|
485
|
+
menu: "menu";
|
|
486
486
|
principal: "principal";
|
|
487
487
|
block_type: "block_type";
|
|
488
488
|
block_type_version: "block_type_version";
|
|
@@ -524,15 +524,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
524
524
|
stage: z.ZodLiteral<"schema">;
|
|
525
525
|
position: z.ZodObject<{
|
|
526
526
|
kind: z.ZodEnum<{
|
|
527
|
-
collection: "collection";
|
|
528
|
-
term: "term";
|
|
529
527
|
seo: "seo";
|
|
530
|
-
|
|
528
|
+
media: "media";
|
|
531
529
|
byline: "byline";
|
|
532
|
-
|
|
530
|
+
collection: "collection";
|
|
533
531
|
setting: "setting";
|
|
532
|
+
relation: "relation";
|
|
534
533
|
widget: "widget";
|
|
535
|
-
|
|
534
|
+
term: "term";
|
|
535
|
+
menu: "menu";
|
|
536
536
|
principal: "principal";
|
|
537
537
|
block_type: "block_type";
|
|
538
538
|
block_type_version: "block_type_version";
|
|
@@ -561,15 +561,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
561
561
|
stage: z.ZodLiteral<"media">;
|
|
562
562
|
position: z.ZodObject<{
|
|
563
563
|
kind: z.ZodEnum<{
|
|
564
|
-
collection: "collection";
|
|
565
|
-
term: "term";
|
|
566
564
|
seo: "seo";
|
|
567
|
-
|
|
565
|
+
media: "media";
|
|
568
566
|
byline: "byline";
|
|
569
|
-
|
|
567
|
+
collection: "collection";
|
|
570
568
|
setting: "setting";
|
|
569
|
+
relation: "relation";
|
|
571
570
|
widget: "widget";
|
|
572
|
-
|
|
571
|
+
term: "term";
|
|
572
|
+
menu: "menu";
|
|
573
573
|
principal: "principal";
|
|
574
574
|
block_type: "block_type";
|
|
575
575
|
block_type_version: "block_type_version";
|
|
@@ -598,15 +598,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
598
598
|
stage: z.ZodLiteral<"terms_bylines">;
|
|
599
599
|
position: z.ZodObject<{
|
|
600
600
|
kind: z.ZodEnum<{
|
|
601
|
-
collection: "collection";
|
|
602
|
-
term: "term";
|
|
603
601
|
seo: "seo";
|
|
604
|
-
|
|
602
|
+
media: "media";
|
|
605
603
|
byline: "byline";
|
|
606
|
-
|
|
604
|
+
collection: "collection";
|
|
607
605
|
setting: "setting";
|
|
606
|
+
relation: "relation";
|
|
608
607
|
widget: "widget";
|
|
609
|
-
|
|
608
|
+
term: "term";
|
|
609
|
+
menu: "menu";
|
|
610
610
|
principal: "principal";
|
|
611
611
|
block_type: "block_type";
|
|
612
612
|
block_type_version: "block_type_version";
|
|
@@ -635,15 +635,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
635
635
|
stage: z.ZodLiteral<"content">;
|
|
636
636
|
position: z.ZodObject<{
|
|
637
637
|
kind: z.ZodEnum<{
|
|
638
|
-
collection: "collection";
|
|
639
|
-
term: "term";
|
|
640
638
|
seo: "seo";
|
|
641
|
-
|
|
639
|
+
media: "media";
|
|
642
640
|
byline: "byline";
|
|
643
|
-
|
|
641
|
+
collection: "collection";
|
|
644
642
|
setting: "setting";
|
|
643
|
+
relation: "relation";
|
|
645
644
|
widget: "widget";
|
|
646
|
-
|
|
645
|
+
term: "term";
|
|
646
|
+
menu: "menu";
|
|
647
647
|
principal: "principal";
|
|
648
648
|
block_type: "block_type";
|
|
649
649
|
block_type_version: "block_type_version";
|
|
@@ -672,15 +672,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
672
672
|
stage: z.ZodLiteral<"relations">;
|
|
673
673
|
position: z.ZodObject<{
|
|
674
674
|
kind: z.ZodEnum<{
|
|
675
|
-
collection: "collection";
|
|
676
|
-
term: "term";
|
|
677
675
|
seo: "seo";
|
|
678
|
-
|
|
676
|
+
media: "media";
|
|
679
677
|
byline: "byline";
|
|
680
|
-
|
|
678
|
+
collection: "collection";
|
|
681
679
|
setting: "setting";
|
|
680
|
+
relation: "relation";
|
|
682
681
|
widget: "widget";
|
|
683
|
-
|
|
682
|
+
term: "term";
|
|
683
|
+
menu: "menu";
|
|
684
684
|
principal: "principal";
|
|
685
685
|
block_type: "block_type";
|
|
686
686
|
block_type_version: "block_type_version";
|
|
@@ -709,15 +709,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
709
709
|
stage: z.ZodLiteral<"presentation">;
|
|
710
710
|
position: z.ZodObject<{
|
|
711
711
|
kind: z.ZodEnum<{
|
|
712
|
-
collection: "collection";
|
|
713
|
-
term: "term";
|
|
714
712
|
seo: "seo";
|
|
715
|
-
|
|
713
|
+
media: "media";
|
|
716
714
|
byline: "byline";
|
|
717
|
-
|
|
715
|
+
collection: "collection";
|
|
718
716
|
setting: "setting";
|
|
717
|
+
relation: "relation";
|
|
719
718
|
widget: "widget";
|
|
720
|
-
|
|
719
|
+
term: "term";
|
|
720
|
+
menu: "menu";
|
|
721
721
|
principal: "principal";
|
|
722
722
|
block_type: "block_type";
|
|
723
723
|
block_type_version: "block_type_version";
|
|
@@ -745,9 +745,9 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
745
745
|
}, z.core.$strict>, z.ZodObject<{
|
|
746
746
|
stage: z.ZodLiteral<"rebuild">;
|
|
747
747
|
step: z.ZodEnum<{
|
|
748
|
-
search: "search";
|
|
749
748
|
taxonomies: "taxonomies";
|
|
750
749
|
options: "options";
|
|
750
|
+
search: "search";
|
|
751
751
|
media_usage: "media_usage";
|
|
752
752
|
caches: "caches";
|
|
753
753
|
}>;
|
|
@@ -756,15 +756,15 @@ declare const importCursorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
756
756
|
stage: z.ZodLiteral<"verify">;
|
|
757
757
|
position: z.ZodNullable<z.ZodObject<{
|
|
758
758
|
kind: z.ZodEnum<{
|
|
759
|
-
collection: "collection";
|
|
760
|
-
term: "term";
|
|
761
759
|
seo: "seo";
|
|
762
|
-
|
|
760
|
+
media: "media";
|
|
763
761
|
byline: "byline";
|
|
764
|
-
|
|
762
|
+
collection: "collection";
|
|
765
763
|
setting: "setting";
|
|
764
|
+
relation: "relation";
|
|
766
765
|
widget: "widget";
|
|
767
|
-
|
|
766
|
+
term: "term";
|
|
767
|
+
menu: "menu";
|
|
768
768
|
principal: "principal";
|
|
769
769
|
block_type: "block_type";
|
|
770
770
|
block_type_version: "block_type_version";
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-
|
|
2
|
-
import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-
|
|
1
|
+
import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-kcyN3F-a.mjs";
|
|
2
|
+
import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-CriYXY1c.mjs";
|
|
3
3
|
import mime from "mime/lite";
|
|
4
4
|
|
|
5
5
|
//#region src/client/index.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-reaction-
|
|
1
|
+
{"version":3,"file":"comment-reaction-B5sZzSoA.mjs","names":[],"sources":["../src/database/repositories/comment-reaction.ts"],"sourcesContent":["import type { Kysely } from \"kysely\";\nimport { ulid } from \"ulidx\";\n\nimport { SQL_BATCH_SIZE, chunks } from \"../../utils/chunks.js\";\nimport type { Database } from \"../types.js\";\n\n/** Per-comment reaction counts: `{ like: 12, love: 3 }`. */\nexport type ReactionCounts = Record<string, number>;\n\nexport interface ToggleReactionInput {\n\tcommentId: string;\n\treaction: string;\n\tvoterHash: string;\n}\n\n/**\n * Repository for comment reactions (likes / emoji).\n *\n * Reactions are deduped per (comment, voter, reaction) by a unique index, so\n * a second toggle of the same reaction by the same voter removes it.\n */\nexport class CommentReactionRepository {\n\tconstructor(private db: Kysely<Database>) {}\n\n\t/**\n\t * Toggle a reaction for a voter on a comment.\n\t *\n\t * @returns `{ reacted: true }` if the reaction was added, `{ reacted: false }`\n\t * if an existing reaction was removed.\n\t */\n\tasync toggle(input: ToggleReactionInput): Promise<{ reacted: boolean }> {\n\t\t// Idempotent add: insert, or no-op if this voter already has this\n\t\t// reaction. Using ON CONFLICT (rather than read-then-write) avoids a\n\t\t// TOCTOU race where two concurrent toggles both see \"no row\" and the\n\t\t// second INSERT violates the unique index — the old path surfaced that\n\t\t// as a 500. The unique index doubles as the conflict target.\n\t\tconst inserted = await this.db\n\t\t\t.insertInto(\"_emdash_comment_reactions\")\n\t\t\t.values({\n\t\t\t\tid: ulid(),\n\t\t\t\tcomment_id: input.commentId,\n\t\t\t\treaction: input.reaction,\n\t\t\t\tvoter_hash: input.voterHash,\n\t\t\t\tcreated_at: new Date().toISOString(),\n\t\t\t})\n\t\t\t.onConflict((oc) => oc.columns([\"comment_id\", \"voter_hash\", \"reaction\"]).doNothing())\n\t\t\t.executeTakeFirst();\n\n\t\tif ((inserted.numInsertedOrUpdatedRows ?? 0n) > 0n) {\n\t\t\treturn { reacted: true };\n\t\t}\n\n\t\t// The reaction already existed → toggle it off.\n\t\tawait this.db\n\t\t\t.deleteFrom(\"_emdash_comment_reactions\")\n\t\t\t.where(\"comment_id\", \"=\", input.commentId)\n\t\t\t.where(\"voter_hash\", \"=\", input.voterHash)\n\t\t\t.where(\"reaction\", \"=\", input.reaction)\n\t\t\t.execute();\n\t\treturn { reacted: false };\n\t}\n\n\t/**\n\t * Aggregate reaction counts for a set of comments.\n\t *\n\t * @returns a Map keyed by comment id; comments with no reactions are absent.\n\t */\n\tasync countsForComments(commentIds: string[]): Promise<Map<string, ReactionCounts>> {\n\t\tconst result = new Map<string, ReactionCounts>();\n\t\tif (commentIds.length === 0) return result;\n\n\t\tfor (const batch of chunks(commentIds, SQL_BATCH_SIZE)) {\n\t\t\tconst rows = await this.db\n\t\t\t\t.selectFrom(\"_emdash_comment_reactions\")\n\t\t\t\t.select([\"comment_id\", \"reaction\"])\n\t\t\t\t.select((eb) => eb.fn.count<number>(\"id\").as(\"count\"))\n\t\t\t\t.where(\"comment_id\", \"in\", batch)\n\t\t\t\t.groupBy([\"comment_id\", \"reaction\"])\n\t\t\t\t.execute();\n\n\t\t\tfor (const row of rows) {\n\t\t\t\tconst counts = result.get(row.comment_id) ?? {};\n\t\t\t\tcounts[row.reaction] = Number(row.count);\n\t\t\t\tresult.set(row.comment_id, counts);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Which reactions a given voter has set, per comment.\n\t *\n\t * @returns a Map keyed by comment id whose values are the reaction names the\n\t * voter has active on that comment.\n\t */\n\tasync viewerReactions(commentIds: string[], voterHash: string): Promise<Map<string, string[]>> {\n\t\tconst result = new Map<string, string[]>();\n\t\tif (commentIds.length === 0) return result;\n\n\t\tfor (const batch of chunks(commentIds, SQL_BATCH_SIZE)) {\n\t\t\tconst rows = await this.db\n\t\t\t\t.selectFrom(\"_emdash_comment_reactions\")\n\t\t\t\t.select([\"comment_id\", \"reaction\"])\n\t\t\t\t.where(\"comment_id\", \"in\", batch)\n\t\t\t\t.where(\"voter_hash\", \"=\", voterHash)\n\t\t\t\t.execute();\n\n\t\t\tfor (const row of rows) {\n\t\t\t\tconst list = result.get(row.comment_id) ?? [];\n\t\t\t\tlist.push(row.reaction);\n\t\t\t\tresult.set(row.comment_id, list);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Count a voter's reactions within a recent time window (for rate limiting).\n\t */\n\tasync countRecentByVoter(voterHash: string, windowMinutes = 10): Promise<number> {\n\t\tconst cutoff = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();\n\t\tconst result = await this.db\n\t\t\t.selectFrom(\"_emdash_comment_reactions\")\n\t\t\t.select((eb) => eb.fn.count<number>(\"id\").as(\"count\"))\n\t\t\t.where(\"voter_hash\", \"=\", voterHash)\n\t\t\t.where(\"created_at\", \">\", cutoff)\n\t\t\t.executeTakeFirst();\n\t\treturn Number(result?.count ?? 0);\n\t}\n}\n"],"mappings":";;;;;;;;;;AAqBA,IAAa,4BAAb,MAAuC;CACtC,YAAY,AAAQ,IAAsB;EAAtB;;;;;;;;CAQpB,MAAM,OAAO,OAA2D;AAkBvE,QAZiB,MAAM,KAAK,GAC1B,WAAW,4BAA4B,CACvC,OAAO;GACP,IAAI,MAAM;GACV,YAAY,MAAM;GAClB,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,6BAAY,IAAI,MAAM,EAAC,aAAa;GACpC,CAAC,CACD,YAAY,OAAO,GAAG,QAAQ;GAAC;GAAc;GAAc;GAAW,CAAC,CAAC,WAAW,CAAC,CACpF,kBAAkB,EAEN,4BAA4B,MAAM,GAC/C,QAAO,EAAE,SAAS,MAAM;AAIzB,QAAM,KAAK,GACT,WAAW,4BAA4B,CACvC,MAAM,cAAc,KAAK,MAAM,UAAU,CACzC,MAAM,cAAc,KAAK,MAAM,UAAU,CACzC,MAAM,YAAY,KAAK,MAAM,SAAS,CACtC,SAAS;AACX,SAAO,EAAE,SAAS,OAAO;;;;;;;CAQ1B,MAAM,kBAAkB,YAA4D;EACnF,MAAM,yBAAS,IAAI,KAA6B;AAChD,MAAI,WAAW,WAAW,EAAG,QAAO;AAEpC,OAAK,MAAM,SAAS,OAAO,YAAY,eAAe,EAAE;GACvD,MAAM,OAAO,MAAM,KAAK,GACtB,WAAW,4BAA4B,CACvC,OAAO,CAAC,cAAc,WAAW,CAAC,CAClC,QAAQ,OAAO,GAAG,GAAG,MAAc,KAAK,CAAC,GAAG,QAAQ,CAAC,CACrD,MAAM,cAAc,MAAM,MAAM,CAChC,QAAQ,CAAC,cAAc,WAAW,CAAC,CACnC,SAAS;AAEX,QAAK,MAAM,OAAO,MAAM;IACvB,MAAM,SAAS,OAAO,IAAI,IAAI,WAAW,IAAI,EAAE;AAC/C,WAAO,IAAI,YAAY,OAAO,IAAI,MAAM;AACxC,WAAO,IAAI,IAAI,YAAY,OAAO;;;AAIpC,SAAO;;;;;;;;CASR,MAAM,gBAAgB,YAAsB,WAAmD;EAC9F,MAAM,yBAAS,IAAI,KAAuB;AAC1C,MAAI,WAAW,WAAW,EAAG,QAAO;AAEpC,OAAK,MAAM,SAAS,OAAO,YAAY,eAAe,EAAE;GACvD,MAAM,OAAO,MAAM,KAAK,GACtB,WAAW,4BAA4B,CACvC,OAAO,CAAC,cAAc,WAAW,CAAC,CAClC,MAAM,cAAc,MAAM,MAAM,CAChC,MAAM,cAAc,KAAK,UAAU,CACnC,SAAS;AAEX,QAAK,MAAM,OAAO,MAAM;IACvB,MAAM,OAAO,OAAO,IAAI,IAAI,WAAW,IAAI,EAAE;AAC7C,SAAK,KAAK,IAAI,SAAS;AACvB,WAAO,IAAI,IAAI,YAAY,KAAK;;;AAIlC,SAAO;;;;;CAMR,MAAM,mBAAmB,WAAmB,gBAAgB,IAAqB;EAChF,MAAM,0BAAS,IAAI,KAAK,KAAK,KAAK,GAAG,gBAAgB,KAAK,IAAK,EAAC,aAAa;EAC7E,MAAM,SAAS,MAAM,KAAK,GACxB,WAAW,4BAA4B,CACvC,QAAQ,OAAO,GAAG,GAAG,MAAc,KAAK,CAAC,GAAG,QAAQ,CAAC,CACrD,MAAM,cAAc,KAAK,UAAU,CACnC,MAAM,cAAc,KAAK,OAAO,CAChC,kBAAkB;AACpB,SAAO,OAAO,QAAQ,SAAS,EAAE"}
|
|
@@ -192,4 +192,4 @@ async function hashIp(ip, salt) {
|
|
|
192
192
|
|
|
193
193
|
//#endregion
|
|
194
194
|
export { handleCommentInbox as a, handleCommentGet as i, handleCommentCounts as n, handleCommentList as o, handleCommentDelete as r, hashIp as s, handleCommentBulk as t };
|
|
195
|
-
//# sourceMappingURL=comments-
|
|
195
|
+
//# sourceMappingURL=comments-B3F-ETyh.mjs.map
|