emdash 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-token-AgOs1UWD.mjs +26 -0
- package/dist/action-token-AgOs1UWD.mjs.map +1 -0
- package/dist/activation-xomsCMJg.mjs +387 -0
- package/dist/activation-xomsCMJg.mjs.map +1 -0
- package/dist/adapters-DM1oyHIN.d.mts +173 -0
- package/dist/adapters-DM1oyHIN.d.mts.map +1 -0
- package/dist/allowed-origins-CFtudhyw.mjs +116 -0
- package/dist/allowed-origins-CFtudhyw.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +48 -47
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +10 -10
- package/dist/api-CltsXhiX.mjs +4980 -0
- package/dist/api-CltsXhiX.mjs.map +1 -0
- package/dist/api-tokens-P3mAaQgr.mjs +166 -0
- package/dist/api-tokens-P3mAaQgr.mjs.map +1 -0
- package/dist/apply-Q7uvzBWW.mjs +1680 -0
- package/dist/apply-Q7uvzBWW.mjs.map +1 -0
- package/dist/approvals-DycwI6lZ.mjs +460 -0
- package/dist/approvals-DycwI6lZ.mjs.map +1 -0
- package/dist/artifact-fetch-CWxyELVI.mjs +659 -0
- package/dist/artifact-fetch-CWxyELVI.mjs.map +1 -0
- package/dist/artifacts-UzWbysb8.mjs +307 -0
- package/dist/artifacts-UzWbysb8.mjs.map +1 -0
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +38 -12
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +12 -12
- package/dist/astro/middleware/auth.mjs +12 -11
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +6 -6
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +9 -22
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +33 -21
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +203 -120
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +15 -15
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +15 -15
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +17 -17
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +17 -17
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -22
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -23
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +23 -23
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +19 -19
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -18
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/index.mjs +18 -18
- package/dist/astro/routes/api/admin/core-update.mjs +8 -8
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +7 -7
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +6 -6
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +22 -22
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +22 -22
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +23 -23
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +29 -29
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +22 -22
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +22 -22
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +9 -9
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +9 -9
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +72 -71
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +70 -69
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +71 -70
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +81 -80
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +71 -70
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +70 -69
- 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 +80 -79
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +70 -69
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +71 -70
- 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 +82 -81
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +10 -10
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +73 -72
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +71 -70
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +70 -69
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +70 -69
- 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 +8 -8
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +70 -69
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +5 -5
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +39 -39
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +39 -39
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +42 -42
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +42 -42
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +42 -42
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +43 -43
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +43 -43
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +43 -43
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +43 -43
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +41 -41
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +43 -43
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +15 -15
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +7 -7
- package/dist/astro/routes/api/admin/users/index.mjs +15 -15
- package/dist/astro/routes/api/auth/dev-bypass.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/accept.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/complete.mjs +20 -20
- package/dist/astro/routes/api/auth/invite/index.mjs +17 -17
- package/dist/astro/routes/api/auth/invite/register-options.mjs +18 -18
- package/dist/astro/routes/api/auth/logout.mjs +6 -6
- package/dist/astro/routes/api/auth/magic-link/send.mjs +19 -19
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +16 -16
- package/dist/astro/routes/api/auth/me.mjs +16 -16
- package/dist/astro/routes/api/auth/mode.mjs +6 -6
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +36 -13
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +20 -5
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +15 -15
- package/dist/astro/routes/api/auth/passkey/index.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/options.mjs +20 -20
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +18 -18
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +19 -19
- package/dist/astro/routes/api/auth/passkey/verify.mjs +20 -20
- package/dist/astro/routes/api/auth/signup/complete.mjs +20 -20
- package/dist/astro/routes/api/auth/signup/request.mjs +18 -18
- package/dist/astro/routes/api/auth/signup/verify.mjs +5 -5
- package/dist/astro/routes/api/calendar.d.mts +8 -0
- package/dist/astro/routes/api/calendar.d.mts.map +1 -0
- package/dist/astro/routes/api/calendar.mjs +204 -0
- package/dist/astro/routes/api/calendar.mjs.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +20 -20
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +31 -31
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +34 -34
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +34 -34
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +24 -24
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +17 -17
- package/dist/astro/routes/api/content/_collection_/authors.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/index.mjs +16 -16
- package/dist/astro/routes/api/content/_collection_/trash.mjs +16 -16
- package/dist/astro/routes/api/dashboard.mjs +11 -11
- package/dist/astro/routes/api/dev/emails.mjs +6 -6
- package/dist/astro/routes/api/health.mjs +7 -7
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +24 -24
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/execute.mjs +23 -23
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs +20 -20
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +27 -27
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +24 -24
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +32 -32
- package/dist/astro/routes/api/manifest.mjs +7 -7
- package/dist/astro/routes/api/mcp.mjs +94 -94
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +19 -19
- package/dist/astro/routes/api/media/_id_/replace.mjs +17 -17
- package/dist/astro/routes/api/media/_id_/upload.mjs +10 -10
- package/dist/astro/routes/api/media/_id_/usage.mjs +31 -31
- package/dist/astro/routes/api/media/_id_.mjs +29 -29
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +7 -7
- package/dist/astro/routes/api/media/file/_...key_.mjs +10 -10
- package/dist/astro/routes/api/media/folders/_id_.mjs +17 -17
- package/dist/astro/routes/api/media/folders/index.mjs +17 -17
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +6 -6
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +6 -6
- package/dist/astro/routes/api/media/providers/index.mjs +6 -6
- package/dist/astro/routes/api/media/upload-url.mjs +23 -23
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +37 -36
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +18 -18
- package/dist/astro/routes/api/menus/_name_/items.mjs +18 -18
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +18 -18
- package/dist/astro/routes/api/menus/_name_/translations.mjs +18 -18
- package/dist/astro/routes/api/menus/_name_.mjs +18 -18
- package/dist/astro/routes/api/menus/index.mjs +18 -18
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/code.mjs +12 -12
- package/dist/astro/routes/api/oauth/device/token.mjs +11 -11
- package/dist/astro/routes/api/oauth/register.mjs +8 -8
- package/dist/astro/routes/api/oauth/token/refresh.mjs +9 -9
- package/dist/astro/routes/api/oauth/token/revoke.mjs +9 -9
- package/dist/astro/routes/api/oauth/token.mjs +9 -9
- package/dist/astro/routes/api/openapi.json.mjs +21 -21
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/index.mjs +20 -19
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +20 -19
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +20 -19
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +20 -19
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +34 -34
- package/dist/astro/routes/api/relations/index.mjs +34 -34
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +6 -6
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +17 -17
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +70 -69
- 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 +70 -69
- 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 +70 -69
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +70 -69
- 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 +70 -69
- 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 +70 -69
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +70 -69
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +70 -69
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +70 -69
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +16 -16
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +70 -69
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +70 -69
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +19 -19
- package/dist/astro/routes/api/search/index.mjs +18 -18
- package/dist/astro/routes/api/search/rebuild.mjs +19 -19
- package/dist/astro/routes/api/search/stats.mjs +9 -9
- package/dist/astro/routes/api/search/suggest.mjs +18 -18
- package/dist/astro/routes/api/sections/_slug_.mjs +18 -18
- package/dist/astro/routes/api/sections/index.mjs +18 -18
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +8 -8
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +8 -8
- package/dist/astro/routes/api/settings/backups/export.mjs +8 -8
- package/dist/astro/routes/api/settings/backups/index.mjs +9 -9
- package/dist/astro/routes/api/settings/email.mjs +7 -7
- package/dist/astro/routes/api/settings.mjs +22 -22
- package/dist/astro/routes/api/setup/admin-verify.mjs +21 -21
- package/dist/astro/routes/api/setup/admin.mjs +19 -19
- package/dist/astro/routes/api/setup/dev-bypass.mjs +42 -42
- package/dist/astro/routes/api/setup/dev-reset.mjs +5 -5
- package/dist/astro/routes/api/setup/index.mjs +54 -49
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +7 -7
- package/dist/astro/routes/api/snapshot.mjs +10 -10
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +22 -22
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +22 -22
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +22 -22
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +22 -22
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +21 -21
- package/dist/astro/routes/api/taxonomies/_name_.mjs +22 -22
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +35 -35
- package/dist/astro/routes/api/taxonomies/index.mjs +22 -22
- package/dist/astro/routes/api/themes/preview.mjs +8 -8
- package/dist/astro/routes/api/typegen.mjs +7 -7
- package/dist/astro/routes/api/visual-editing/action-token.mjs +8 -8
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +20 -20
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +5 -5
- 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 +17 -17
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +19 -19
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +19 -19
- package/dist/astro/routes/api/widget-areas/_name_.mjs +9 -9
- package/dist/astro/routes/api/widget-areas/index.mjs +19 -19
- package/dist/astro/routes/api/widget-components.mjs +6 -6
- package/dist/astro/routes/robots.txt.mjs +7 -7
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +8 -8
- package/dist/astro/types.d.mts +17 -17
- package/dist/audit-CCH3MA4Y.mjs +127 -0
- package/dist/audit-CCH3MA4Y.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/auth/providers/microsoft.d.mts +27 -0
- package/dist/auth/providers/microsoft.d.mts.map +1 -0
- package/dist/auth/providers/microsoft.mjs +20 -0
- package/dist/auth/providers/microsoft.mjs.map +1 -0
- package/dist/authoritative-records-dSvXCfzb.mjs +5172 -0
- package/dist/authoritative-records-dSvXCfzb.mjs.map +1 -0
- package/dist/authorize-DeWfk--K.mjs +49 -0
- package/dist/authorize-DeWfk--K.mjs.map +1 -0
- package/dist/backup-CFnbdTSJ.mjs +246 -0
- package/dist/backup-CFnbdTSJ.mjs.map +1 -0
- package/dist/base64-BQBZwXCx.mjs +63 -0
- package/dist/base64-BQBZwXCx.mjs.map +1 -0
- package/dist/block-types-C0YFSfR7.mjs +132 -0
- package/dist/block-types-C0YFSfR7.mjs.map +1 -0
- package/dist/block-values-H4E0XwE8.mjs +175 -0
- package/dist/block-values-H4E0XwE8.mjs.map +1 -0
- package/dist/byline-BhVslYLz.mjs +909 -0
- package/dist/byline-BhVslYLz.mjs.map +1 -0
- package/dist/byline-fields-DHJs0Mja.mjs +280 -0
- package/dist/byline-fields-DHJs0Mja.mjs.map +1 -0
- package/dist/byline-fields-xdxE9kxZ.mjs +123 -0
- package/dist/byline-fields-xdxE9kxZ.mjs.map +1 -0
- package/dist/bylines-B_nN9liM.mjs +234 -0
- package/dist/bylines-B_nN9liM.mjs.map +1 -0
- package/dist/bylines-C71YACkL.mjs +150 -0
- package/dist/bylines-C71YACkL.mjs.map +1 -0
- package/dist/cache-aTYCL9nK.mjs +133 -0
- package/dist/cache-aTYCL9nK.mjs.map +1 -0
- package/dist/canonical-Y1dpjCnp.mjs +174 -0
- package/dist/canonical-Y1dpjCnp.mjs.map +1 -0
- package/dist/capture-triggers-C9JKoIdT.mjs +362 -0
- package/dist/capture-triggers-C9JKoIdT.mjs.map +1 -0
- package/dist/challenge-store-CxZxPqaw.mjs +51 -0
- package/dist/challenge-store-CxZxPqaw.mjs.map +1 -0
- package/dist/checksum-DtH6m5uk.mjs +162 -0
- package/dist/checksum-DtH6m5uk.mjs.map +1 -0
- package/dist/chrome-tags-BIKBMZYO.mjs +24 -0
- package/dist/chrome-tags-BIKBMZYO.mjs.map +1 -0
- package/dist/chunks-zlGB5IQP.mjs +25 -0
- package/dist/chunks-zlGB5IQP.mjs.map +1 -0
- package/dist/cli/index.mjs +47 -47
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +121 -121
- package/dist/client/index.mjs +2 -2
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs +85 -0
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs.map +1 -0
- package/dist/comment-Bu08Wvr3.mjs +313 -0
- package/dist/comment-Bu08Wvr3.mjs.map +1 -0
- package/dist/comment-reaction-B8SfT-yM.mjs +85 -0
- package/dist/comment-reaction-B8SfT-yM.mjs.map +1 -0
- package/dist/comments-BRtp992B.mjs +99 -0
- package/dist/comments-BRtp992B.mjs.map +1 -0
- package/dist/comments-DVUYqdyC.mjs +195 -0
- package/dist/comments-DVUYqdyC.mjs.map +1 -0
- package/dist/components-CQY-Sgm-.mjs +108 -0
- package/dist/components-CQY-Sgm-.mjs.map +1 -0
- package/dist/config-B-uePMLj.d.mts +39 -0
- package/dist/config-B-uePMLj.d.mts.map +1 -0
- package/dist/config-B6BDSsz2.d.mts +6712 -0
- package/dist/config-B6BDSsz2.d.mts.map +1 -0
- package/dist/config-BsJHiQxC.mjs +228 -0
- package/dist/config-BsJHiQxC.mjs.map +1 -0
- package/dist/connection-B9pIasFd.mjs +36 -0
- package/dist/connection-B9pIasFd.mjs.map +1 -0
- package/dist/content-Dji9vEiW.mjs +2063 -0
- package/dist/content-Dji9vEiW.mjs.map +1 -0
- package/dist/content-list-query-DiNwyKtd.d.mts +26 -0
- package/dist/content-list-query-DiNwyKtd.d.mts.map +1 -0
- package/dist/content-repair-B7wnbzhN.mjs +442 -0
- package/dist/content-repair-B7wnbzhN.mjs.map +1 -0
- package/dist/context-Ctcxc8Ia.mjs +2026 -0
- package/dist/context-Ctcxc8Ia.mjs.map +1 -0
- package/dist/credits-Bu7dlobo.mjs +110 -0
- package/dist/credits-Bu7dlobo.mjs.map +1 -0
- package/dist/cron-xe5XKqA-.mjs +306 -0
- package/dist/cron-xe5XKqA-.mjs.map +1 -0
- package/dist/dashboard-B5hVHOtf.mjs +151 -0
- package/dist/dashboard-B5hVHOtf.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +5 -5
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +4 -4
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +4 -4
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/default-DaoYyFRS.mjs +81 -0
- package/dist/default-DaoYyFRS.mjs.map +1 -0
- package/dist/deferred-tasks-BYcDx2o_.d.mts +9 -0
- package/dist/deferred-tasks-BYcDx2o_.d.mts.map +1 -0
- package/dist/dev-typegen-Dtl8AfS6.mjs +29 -0
- package/dist/dev-typegen-Dtl8AfS6.mjs.map +1 -0
- package/dist/device-flow-Ma5P5d2e.mjs +521 -0
- package/dist/device-flow-Ma5P5d2e.mjs.map +1 -0
- package/dist/digest-xIpR3o64.mjs +194 -0
- package/dist/digest-xIpR3o64.mjs.map +1 -0
- package/dist/direct-executor-DMWwCey3.mjs +104 -0
- package/dist/direct-executor-DMWwCey3.mjs.map +1 -0
- package/dist/email-console-DmqVF5J_.mjs +50 -0
- package/dist/email-console-DmqVF5J_.mjs.map +1 -0
- package/dist/email-locale-Cc5YSXfJ.mjs +25 -0
- package/dist/email-locale-Cc5YSXfJ.mjs.map +1 -0
- package/dist/emdash-runtime-BlybX9Ui.mjs +4249 -0
- package/dist/emdash-runtime-BlybX9Ui.mjs.map +1 -0
- package/dist/enrich-Duu4sV3a.mjs +194 -0
- package/dist/enrich-Duu4sV3a.mjs.map +1 -0
- package/dist/entry-lock-De1L8qUQ.mjs +163 -0
- package/dist/entry-lock-De1L8qUQ.mjs.map +1 -0
- package/dist/entry-lock-esmMbgI9.d.mts +4551 -0
- package/dist/entry-lock-esmMbgI9.d.mts.map +1 -0
- package/dist/entry-lock-sxz2PGAT.mjs +1197 -0
- package/dist/entry-lock-sxz2PGAT.mjs.map +1 -0
- package/dist/env-types-BkjCtN13.mjs +38 -0
- package/dist/env-types-BkjCtN13.mjs.map +1 -0
- package/dist/error-B0rgPgsQ.mjs +90 -0
- package/dist/error-B0rgPgsQ.mjs.map +1 -0
- package/dist/errors-CuHQRiBW.mjs +120 -0
- package/dist/errors-CuHQRiBW.mjs.map +1 -0
- package/dist/errors-DTE6C3K_.mjs +470 -0
- package/dist/errors-DTE6C3K_.mjs.map +1 -0
- package/dist/escape-nJW7dR0s.mjs +9 -0
- package/dist/escape-nJW7dR0s.mjs.map +1 -0
- package/dist/fence-CGw57S4v.mjs +162 -0
- package/dist/fence-CGw57S4v.mjs.map +1 -0
- package/dist/field-defs-cache-Bw8w499w.mjs +77 -0
- package/dist/field-defs-cache-Bw8w499w.mjs.map +1 -0
- package/dist/field-map-hn-D-SyH.mjs +83 -0
- package/dist/field-map-hn-D-SyH.mjs.map +1 -0
- package/dist/fts-manager-DacCYIe4.mjs +443 -0
- package/dist/fts-manager-DacCYIe4.mjs.map +1 -0
- package/dist/gc-BBplHrv6.mjs +75 -0
- package/dist/gc-BBplHrv6.mjs.map +1 -0
- package/dist/hash-C4DFoJ7Z.mjs +37 -0
- package/dist/hash-C4DFoJ7Z.mjs.map +1 -0
- package/dist/hook-result-DSRRxu_-.d.mts +31 -0
- package/dist/hook-result-DSRRxu_-.d.mts.map +1 -0
- package/dist/hreflang-CKPunvU0.mjs +105 -0
- package/dist/hreflang-CKPunvU0.mjs.map +1 -0
- package/dist/hreflang-egumj6WF.d.mts +50 -0
- package/dist/hreflang-egumj6WF.d.mts.map +1 -0
- package/dist/http-route-dispatch-DjNFZcJ2.mjs +339 -0
- package/dist/http-route-dispatch-DjNFZcJ2.mjs.map +1 -0
- package/dist/identity-Dfrx2_Bc.mjs +35 -0
- package/dist/identity-Dfrx2_Bc.mjs.map +1 -0
- package/dist/import-ROBvhbNc.mjs +2021 -0
- package/dist/import-ROBvhbNc.mjs.map +1 -0
- package/dist/index-B4sIdCAT.d.mts +623 -0
- package/dist/index-B4sIdCAT.d.mts.map +1 -0
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +98 -97
- package/dist/init-lock-BGmew3r1.mjs +56 -0
- package/dist/init-lock-BGmew3r1.mjs.map +1 -0
- package/dist/install-finalization-CPM7Gged.mjs +58 -0
- package/dist/install-finalization-CPM7Gged.mjs.map +1 -0
- package/dist/keys-DxqxcAD4.mjs +61 -0
- package/dist/keys-DxqxcAD4.mjs.map +1 -0
- package/dist/kinds-BQl5gN6e.mjs +974 -0
- package/dist/kinds-BQl5gN6e.mjs.map +1 -0
- package/dist/lifecycle-DGQI7itS.mjs +25 -0
- package/dist/lifecycle-DGQI7itS.mjs.map +1 -0
- package/dist/load-DMxRl4VK.mjs +28 -0
- package/dist/load-DMxRl4VK.mjs.map +1 -0
- package/dist/loader-1DMiOq5s.mjs +1303 -0
- package/dist/loader-1DMiOq5s.mjs.map +1 -0
- package/dist/loops-Dn1i16FP.mjs +205 -0
- package/dist/loops-Dn1i16FP.mjs.map +1 -0
- package/dist/manifest-builder-CTw4FmZk.mjs +189 -0
- package/dist/manifest-builder-CTw4FmZk.mjs.map +1 -0
- package/dist/manifest-schema-gy37bD_D.mjs +496 -0
- package/dist/manifest-schema-gy37bD_D.mjs.map +1 -0
- package/dist/marketplace-tHWSsCUo.mjs +257 -0
- package/dist/marketplace-tHWSsCUo.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +14 -14
- package/dist/media/local-runtime.mjs +7 -7
- package/dist/media-Bw-Q65ve.mjs +294 -0
- package/dist/media-Bw-Q65ve.mjs.map +1 -0
- package/dist/media-BzUDu7nl.mjs +373 -0
- package/dist/media-BzUDu7nl.mjs.map +1 -0
- package/dist/media-aahnKHze.mjs +408 -0
- package/dist/media-aahnKHze.mjs.map +1 -0
- package/dist/media-allowlist-RMrjo8TU.mjs +45 -0
- package/dist/media-allowlist-RMrjo8TU.mjs.map +1 -0
- package/dist/media-folders-kabR1oJf.mjs +210 -0
- package/dist/media-folders-kabR1oJf.mjs.map +1 -0
- package/dist/media-url-DloW2xrP.mjs +43 -0
- package/dist/media-url-DloW2xrP.mjs.map +1 -0
- package/dist/media-usage-CHHpV7ee.mjs +282 -0
- package/dist/media-usage-CHHpV7ee.mjs.map +1 -0
- package/dist/media-usage-activation-BinYqC_r.mjs +78 -0
- package/dist/media-usage-activation-BinYqC_r.mjs.map +1 -0
- package/dist/media-usage-work-C734aq6s.mjs +1015 -0
- package/dist/media-usage-work-C734aq6s.mjs.map +1 -0
- package/dist/media-usage-work-lxvV0-UO.mjs +151 -0
- package/dist/media-usage-work-lxvV0-UO.mjs.map +1 -0
- package/dist/menus-6RHNq4ZK.mjs +753 -0
- package/dist/menus-6RHNq4ZK.mjs.map +1 -0
- package/dist/menus-AuCTaO9W.mjs +3704 -0
- package/dist/menus-AuCTaO9W.mjs.map +1 -0
- package/dist/menus-BQKqf0Up.mjs +92 -0
- package/dist/menus-BQKqf0Up.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/mime-B5M9R53H.mjs +81 -0
- package/dist/mime-B5M9R53H.mjs.map +1 -0
- package/dist/mode-nh0ppSX5.mjs +23 -0
- package/dist/mode-nh0ppSX5.mjs.map +1 -0
- package/dist/node-sqlite-compat-CDOEcc97.mjs +63 -0
- package/dist/node-sqlite-compat-CDOEcc97.mjs.map +1 -0
- package/dist/oauth-authorization-BtYQ80uU.mjs +274 -0
- package/dist/oauth-authorization-BtYQ80uU.mjs.map +1 -0
- package/dist/oauth-clients-C1S4NQHh.mjs +266 -0
- package/dist/oauth-clients-C1S4NQHh.mjs.map +1 -0
- package/dist/oauth-state-store-CpGi2FZH.mjs +50 -0
- package/dist/oauth-state-store-CpGi2FZH.mjs.map +1 -0
- package/dist/oauth-user-lookup-BNp1aFAr.mjs +26 -0
- package/dist/oauth-user-lookup-BNp1aFAr.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/options-B41aLm1I.d.mts +81 -0
- package/dist/options-B41aLm1I.d.mts.map +1 -0
- package/dist/ownership-DoeAIuTg.mjs +12 -0
- package/dist/ownership-DoeAIuTg.mjs.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +6 -6
- package/dist/parse-CmFDTGzp.mjs +81 -0
- package/dist/parse-CmFDTGzp.mjs.map +1 -0
- package/dist/parse-QVS0t5oR.d.mts +172 -0
- package/dist/parse-QVS0t5oR.d.mts.map +1 -0
- package/dist/passkey-config-C-MxsV22.mjs +46 -0
- package/dist/passkey-config-C-MxsV22.mjs.map +1 -0
- package/dist/paths-kr8hAMMI.mjs +77 -0
- package/dist/paths-kr8hAMMI.mjs.map +1 -0
- package/dist/placeholder-Dn7MMdWr.d.mts +306 -0
- package/dist/placeholder-Dn7MMdWr.d.mts.map +1 -0
- package/dist/plan-CuQOeU9g.mjs +135 -0
- package/dist/plan-CuQOeU9g.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +14 -14
- package/dist/plugin-test-runtime.mjs +110 -109
- 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 +44 -43
- package/dist/plugins-CGb-G98c.mjs +261 -0
- package/dist/plugins-CGb-G98c.mjs.map +1 -0
- package/dist/policy-C5wrDXYV.mjs +45 -0
- package/dist/policy-C5wrDXYV.mjs.map +1 -0
- package/dist/portable-text-BnRuiR1-.mjs +307 -0
- package/dist/portable-text-BnRuiR1-.mjs.map +1 -0
- package/dist/preview-xWNSR1Li.mjs +107 -0
- package/dist/preview-xWNSR1Li.mjs.map +1 -0
- package/dist/protocol-ClxN-m1e.d.mts +61 -0
- package/dist/protocol-ClxN-m1e.d.mts.map +1 -0
- package/dist/public-submission-CkmT2SKv.mjs +250 -0
- package/dist/public-submission-CkmT2SKv.mjs.map +1 -0
- package/dist/public-url-B5a0QAh6.mjs +101 -0
- package/dist/public-url-B5a0QAh6.mjs.map +1 -0
- package/dist/query-DHqFiqqH.mjs +41 -0
- package/dist/query-DHqFiqqH.mjs.map +1 -0
- package/dist/query-DT85BehD.mjs +1125 -0
- package/dist/query-DT85BehD.mjs.map +1 -0
- package/dist/rate-limit-iMvcu3eu.mjs +120 -0
- package/dist/rate-limit-iMvcu3eu.mjs.map +1 -0
- package/dist/receipt-Dpp1uaX9.mjs +43 -0
- package/dist/receipt-Dpp1uaX9.mjs.map +1 -0
- package/dist/redirect-BRoLiWQE.mjs +19 -0
- package/dist/redirect-BRoLiWQE.mjs.map +1 -0
- package/dist/redirect-xZNpBoGp.mjs +417 -0
- package/dist/redirect-xZNpBoGp.mjs.map +1 -0
- package/dist/redirects-D4EWeXAo.mjs +148 -0
- package/dist/redirects-D4EWeXAo.mjs.map +1 -0
- package/dist/redirects-DCKqwiWp.mjs +446 -0
- package/dist/redirects-DCKqwiWp.mjs.map +1 -0
- package/dist/registry/testing.mjs +3 -3
- package/dist/registry-DaXmUsD4.mjs +8369 -0
- package/dist/registry-DaXmUsD4.mjs.map +1 -0
- package/dist/relations-JvBP8nGP.mjs +776 -0
- package/dist/relations-JvBP8nGP.mjs.map +1 -0
- package/dist/request-context.d.mts +2 -2
- package/dist/request-context.mjs.map +1 -1
- package/dist/request-meta-B6blULFY.mjs +141 -0
- package/dist/request-meta-B6blULFY.mjs.map +1 -0
- package/dist/resolve-DAhHi5tn.mjs +100 -0
- package/dist/resolve-DAhHi5tn.mjs.map +1 -0
- package/dist/revision-BWEH2qQB.mjs +368 -0
- package/dist/revision-BWEH2qQB.mjs.map +1 -0
- package/dist/route-wire-DK600v4u.mjs +197 -0
- package/dist/route-wire-DK600v4u.mjs.map +1 -0
- package/dist/routes-BeZyaCzv.mjs +272 -0
- package/dist/routes-BeZyaCzv.mjs.map +1 -0
- package/dist/runner-CskI4Hmq.mjs +6372 -0
- package/dist/runner-CskI4Hmq.mjs.map +1 -0
- package/dist/runner-J3Cj6DGk.d.mts +68 -0
- package/dist/runner-J3Cj6DGk.d.mts.map +1 -0
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +3 -3
- package/dist/schema/project-env-types.mjs +37 -37
- package/dist/schema-CK0ihqMR.mjs +815 -0
- package/dist/schema-CK0ihqMR.mjs.map +1 -0
- package/dist/schema-VtaZSrC-.mjs +13 -0
- package/dist/schema-VtaZSrC-.mjs.map +1 -0
- package/dist/scopes-BRnGlL9t.mjs +34 -0
- package/dist/scopes-BRnGlL9t.mjs.map +1 -0
- package/dist/search-D6-XK1Sn.mjs +448 -0
- package/dist/search-D6-XK1Sn.mjs.map +1 -0
- package/dist/secrets-Cc_O3Kp-.mjs +369 -0
- package/dist/secrets-Cc_O3Kp-.mjs.map +1 -0
- package/dist/sections-CBDCf7qR.mjs +346 -0
- package/dist/sections-CBDCf7qR.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +35 -35
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +22 -22
- package/dist/seo-BdeEPDNW.mjs +133 -0
- package/dist/seo-BdeEPDNW.mjs.map +1 -0
- package/dist/seo-C61bnPuV.mjs +114 -0
- package/dist/seo-C61bnPuV.mjs.map +1 -0
- package/dist/service-BuRKLMxa.mjs +150 -0
- package/dist/service-BuRKLMxa.mjs.map +1 -0
- package/dist/session-user-CqkPtrPL.mjs +61 -0
- package/dist/session-user-CqkPtrPL.mjs.map +1 -0
- package/dist/settings-0u0lTthS.mjs +51 -0
- package/dist/settings-0u0lTthS.mjs.map +1 -0
- package/dist/settings-WHr45II1.mjs +61 -0
- package/dist/settings-WHr45II1.mjs.map +1 -0
- package/dist/settings-m5tIYnF0.mjs +443 -0
- package/dist/settings-m5tIYnF0.mjs.map +1 -0
- package/dist/setup-complete-B2_dhZZz.mjs +65 -0
- package/dist/setup-complete-B2_dhZZz.mjs.map +1 -0
- package/dist/setup-nonce-CJV9ftSK.mjs +25 -0
- package/dist/setup-nonce-CJV9ftSK.mjs.map +1 -0
- package/dist/single-flight-cache-D0EaGbN1.mjs +104 -0
- package/dist/single-flight-cache-D0EaGbN1.mjs.map +1 -0
- package/dist/site-settings-KJOqJW6W.mjs +50 -0
- package/dist/site-settings-KJOqJW6W.mjs.map +1 -0
- package/dist/site-url-Ceq_AUK0.mjs +16 -0
- package/dist/site-url-Ceq_AUK0.mjs.map +1 -0
- package/dist/snapshot-Dzsn3NZa.mjs +414 -0
- package/dist/snapshot-Dzsn3NZa.mjs.map +1 -0
- package/dist/ssrf-DsmvZB80.mjs +406 -0
- package/dist/ssrf-DsmvZB80.mjs.map +1 -0
- package/dist/stage-Csnh_yEd.mjs +662 -0
- package/dist/stage-Csnh_yEd.mjs.map +1 -0
- package/dist/staged-Q7pnEVvI.mjs +686 -0
- package/dist/staged-Q7pnEVvI.mjs.map +1 -0
- package/dist/state-kGdOMQRY.mjs +153 -0
- package/dist/state-kGdOMQRY.mjs.map +1 -0
- package/dist/status-D39Fpy8R.mjs +30 -0
- package/dist/status-D39Fpy8R.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +2 -2
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-C7iy6eUb.d.mts +1615 -0
- package/dist/storage-query-C7iy6eUb.d.mts.map +1 -0
- package/dist/tar-BWiraSUY.mjs +449 -0
- package/dist/tar-BWiraSUY.mjs.map +1 -0
- package/dist/target-DOFs5oUC.mjs +27 -0
- package/dist/target-DOFs5oUC.mjs.map +1 -0
- package/dist/taxonomies-BS40Wxvi.mjs +939 -0
- package/dist/taxonomies-BS40Wxvi.mjs.map +1 -0
- package/dist/taxonomies-DAZU9VDd.mjs +697 -0
- package/dist/taxonomies-DAZU9VDd.mjs.map +1 -0
- package/dist/taxonomy-XzLE95Vx.mjs +525 -0
- package/dist/taxonomy-XzLE95Vx.mjs.map +1 -0
- package/dist/tokens-DSQan4p7.mjs +171 -0
- package/dist/tokens-DSQan4p7.mjs.map +1 -0
- package/dist/transfer-BcCVxDgf.mjs +166 -0
- package/dist/transfer-BcCVxDgf.mjs.map +1 -0
- package/dist/transfer-OMrancOt.mjs +8873 -0
- package/dist/transfer-OMrancOt.mjs.map +1 -0
- package/dist/transfer-download-Dc-ltjZY.mjs +33 -0
- package/dist/transfer-download-Dc-ltjZY.mjs.map +1 -0
- package/dist/transformations-Ddx7UtrY.mjs +196 -0
- package/dist/transformations-Ddx7UtrY.mjs.map +1 -0
- package/dist/transport-flR-Zmds.d.mts +42 -0
- package/dist/transport-flR-Zmds.d.mts.map +1 -0
- package/dist/transport-umzEbgYO.mjs +136 -0
- package/dist/transport-umzEbgYO.mjs.map +1 -0
- package/dist/trusted-proxy-BqfQFs6a.mjs +51 -0
- package/dist/trusted-proxy-BqfQFs6a.mjs.map +1 -0
- package/dist/turnstile-Do60baId.mjs +58 -0
- package/dist/turnstile-Do60baId.mjs.map +1 -0
- package/dist/types-BT1p3uyb.d.mts +1735 -0
- package/dist/types-BT1p3uyb.d.mts.map +1 -0
- package/dist/types-BYaPWs_F.d.mts +198 -0
- package/dist/types-BYaPWs_F.d.mts.map +1 -0
- package/dist/types-C-Xp0CcN.mjs +103 -0
- package/dist/types-C-Xp0CcN.mjs.map +1 -0
- package/dist/types-CLTQ9b_r.d.mts +374 -0
- package/dist/types-CLTQ9b_r.d.mts.map +1 -0
- package/dist/types-CPkQw2T2.d.mts +85 -0
- package/dist/types-CPkQw2T2.d.mts.map +1 -0
- package/dist/types-CQLvuXoZ.d.mts +198 -0
- package/dist/types-CQLvuXoZ.d.mts.map +1 -0
- package/dist/types-CV5xszpF.d.mts +363 -0
- package/dist/types-CV5xszpF.d.mts.map +1 -0
- package/dist/types-CdEMurNh.mjs +77 -0
- package/dist/types-CdEMurNh.mjs.map +1 -0
- package/dist/types-Cj0_yZkn.mjs +18 -0
- package/dist/types-Cj0_yZkn.mjs.map +1 -0
- package/dist/types-CxwtnuSS.mjs +37 -0
- package/dist/types-CxwtnuSS.mjs.map +1 -0
- package/dist/types-DGw8KMX_.mjs +16 -0
- package/dist/types-DGw8KMX_.mjs.map +1 -0
- package/dist/types-DOfVMPoo.d.mts +125 -0
- package/dist/types-DOfVMPoo.d.mts.map +1 -0
- package/dist/types-LtS0SM4F.d.mts +287 -0
- package/dist/types-LtS0SM4F.d.mts.map +1 -0
- package/dist/types-ifgOkcBa.d.mts +916 -0
- package/dist/types-ifgOkcBa.d.mts.map +1 -0
- package/dist/update-check-DOc2aBIU.mjs +161 -0
- package/dist/update-check-DOc2aBIU.mjs.map +1 -0
- package/dist/upload-attempts-nzdc3cay.mjs +32 -0
- package/dist/upload-attempts-nzdc3cay.mjs.map +1 -0
- package/dist/url-pattern-hVbqpXs6.mjs +41 -0
- package/dist/url-pattern-hVbqpXs6.mjs.map +1 -0
- package/dist/user-Dnp53zTq.mjs +171 -0
- package/dist/user-Dnp53zTq.mjs.map +1 -0
- package/dist/utils-CoV-PYhg.mjs +439 -0
- package/dist/utils-CoV-PYhg.mjs.map +1 -0
- package/dist/validate-CfQ9_YlD.d.mts +468 -0
- package/dist/validate-CfQ9_YlD.d.mts.map +1 -0
- package/dist/validate-DBX3DKtL.mjs +516 -0
- package/dist/validate-DBX3DKtL.mjs.map +1 -0
- package/dist/validation-BJMiDhB1.mjs +219 -0
- package/dist/validation-BJMiDhB1.mjs.map +1 -0
- package/dist/version-BaT8yKIT.mjs +7 -0
- package/dist/version-BaT8yKIT.mjs.map +1 -0
- package/dist/version-BwEGkqkx.mjs +9 -0
- package/dist/version-BwEGkqkx.mjs.map +1 -0
- package/dist/virtual-modules-B6vJW15k.mjs +516 -0
- package/dist/virtual-modules-B6vJW15k.mjs.map +1 -0
- package/dist/widgets-BkxBAgZ_.mjs +126 -0
- package/dist/widgets-BkxBAgZ_.mjs.map +1 -0
- package/dist/wxr-taxonomies-D7gAJyOF.mjs +453 -0
- package/dist/wxr-taxonomies-D7gAJyOF.mjs.map +1 -0
- package/dist/wxr-taxonomies-DM5J9AsT.d.mts +34 -0
- package/dist/wxr-taxonomies-DM5J9AsT.d.mts.map +1 -0
- package/dist/zod-generator-BQilAboC.mjs +424 -0
- package/dist/zod-generator-BQilAboC.mjs.map +1 -0
- package/package.json +11 -5
- package/src/api/errors.ts +3 -0
- package/src/api/handlers/bylines.ts +24 -3
- package/src/api/handlers/calendar.ts +246 -0
- package/src/api/handlers/content.ts +12 -5
- package/src/api/handlers/media-allowlist.ts +1 -0
- package/src/api/handlers/media-upload.ts +13 -10
- package/src/api/handlers/plugins.ts +21 -29
- package/src/api/handlers/redirects.ts +6 -6
- package/src/api/schemas/bylines.ts +3 -1
- package/src/api/schemas/content.ts +16 -0
- package/src/astro/integration/index.ts +18 -1
- package/src/astro/integration/routes.ts +5 -0
- package/src/astro/integration/vite-config.ts +11 -0
- package/src/astro/middleware/csp.ts +1 -0
- package/src/astro/middleware/redirect.ts +20 -9
- package/src/astro/middleware/request-context.ts +54 -27
- package/src/astro/middleware.ts +97 -12
- package/src/astro/prefetch.ts +10 -3
- package/src/astro/routes/api/admin/bylines/[id]/translations.ts +0 -5
- package/src/astro/routes/api/admin/bylines/index.ts +1 -1
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +1 -0
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +56 -4
- package/src/astro/routes/api/auth/oauth/[provider].ts +37 -4
- package/src/astro/routes/api/calendar.ts +35 -0
- package/src/astro/routes/api/media/upload-url.ts +8 -4
- package/src/astro/routes/api/media.ts +9 -5
- package/src/astro/routes/api/setup/index.ts +14 -2
- package/src/auth/providers/microsoft-admin.tsx +31 -0
- package/src/auth/providers/microsoft.ts +47 -0
- package/src/comments/turnstile.ts +6 -1
- package/src/components/HtmlBlock.astro +17 -6
- package/src/components/HtmlBlockFrame.astro +63 -0
- package/src/components/Iframe.astro +141 -0
- package/src/components/InlinePortableTextEditor.tsx +8 -7
- package/src/components/WebMcpSearch.astro +80 -0
- package/src/components/index.ts +5 -2
- package/src/components/webmcp-search.ts +142 -0
- package/src/config/secrets.ts +27 -15
- package/src/content/converters/portable-text-identity.ts +1 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +36 -2
- package/src/content/converters/prosemirror-to-portable-text.ts +28 -2
- package/src/content/converters/types.ts +24 -0
- package/src/database/content-datetime.ts +11 -4
- package/src/database/migrations/090_redirect_enable_loop_guard.ts +70 -0
- package/src/database/migrations/091_redirect_artifacts.ts +141 -0
- package/src/database/migrations/runner.ts +4 -0
- package/src/database/repositories/content.ts +81 -26
- package/src/database/repositories/redirect.ts +6 -1
- package/src/database/request-scoped.ts +34 -0
- package/src/database/types.ts +23 -0
- package/src/db/adapters.ts +2 -0
- package/src/emdash-runtime.ts +28 -3
- package/src/import/menus.ts +3 -0
- package/src/index.ts +1 -0
- package/src/loader.ts +226 -55
- package/src/mcp/server.ts +12 -4
- package/src/media/mime.ts +21 -0
- package/src/menus/index.ts +30 -26
- package/src/plugins/hooks.ts +10 -0
- package/src/plugins/manager.ts +12 -2
- package/src/plugins/types.ts +16 -0
- package/src/query.ts +12 -29
- package/src/redirects/artifacts.ts +460 -0
- package/src/redirects/cache.ts +76 -41
- package/src/request-context.ts +1 -1
- package/src/seed/apply.ts +65 -57
- package/src/settings/index.ts +17 -12
- package/src/transfer/format/columns.ts +3 -0
- package/src/transfer/import/rebuild.ts +17 -2
- package/src/transfer/import/scaffold.ts +16 -9
- package/src/ui.ts +1 -0
- package/src/utils/sanitize.ts +14 -9
- package/src/virtual-modules.d.ts +3 -0
- package/dist/action-token-D2KE1Rqf.mjs +0 -26
- package/dist/action-token-D2KE1Rqf.mjs.map +0 -1
- package/dist/activation-DDuqAat2.mjs +0 -387
- package/dist/activation-DDuqAat2.mjs.map +0 -1
- package/dist/adapters-Ds-1Pmkm.d.mts +0 -171
- package/dist/adapters-Ds-1Pmkm.d.mts.map +0 -1
- package/dist/allowed-origins-D78QvbTO.mjs +0 -116
- package/dist/allowed-origins-D78QvbTO.mjs.map +0 -1
- package/dist/api-BBZlif0y.mjs +0 -4974
- package/dist/api-BBZlif0y.mjs.map +0 -1
- package/dist/api-tokens-BGbfWZVO.mjs +0 -166
- package/dist/api-tokens-BGbfWZVO.mjs.map +0 -1
- package/dist/apply-CDNV4JJ-.mjs +0 -1672
- package/dist/apply-CDNV4JJ-.mjs.map +0 -1
- package/dist/approvals-CVvJSEBF.mjs +0 -460
- package/dist/approvals-CVvJSEBF.mjs.map +0 -1
- package/dist/artifact-fetch-CGK0DQLj.mjs +0 -659
- package/dist/artifact-fetch-CGK0DQLj.mjs.map +0 -1
- package/dist/audit-BszbE_BP.mjs +0 -127
- package/dist/audit-BszbE_BP.mjs.map +0 -1
- package/dist/authoritative-records-ChM8dTeV.mjs +0 -5172
- package/dist/authoritative-records-ChM8dTeV.mjs.map +0 -1
- package/dist/authorize-CTGywswM.mjs +0 -49
- package/dist/authorize-CTGywswM.mjs.map +0 -1
- package/dist/backup-CDrPP8fI.mjs +0 -246
- package/dist/backup-CDrPP8fI.mjs.map +0 -1
- package/dist/base64-DvnNgP7e.mjs +0 -63
- package/dist/base64-DvnNgP7e.mjs.map +0 -1
- package/dist/block-types-nNEaPkvx.mjs +0 -132
- package/dist/block-types-nNEaPkvx.mjs.map +0 -1
- package/dist/block-values-Bho1nsZF.mjs +0 -175
- package/dist/block-values-Bho1nsZF.mjs.map +0 -1
- package/dist/byline-02tu_Uc-.mjs +0 -909
- package/dist/byline-02tu_Uc-.mjs.map +0 -1
- package/dist/byline-fields-BYbTptTU.mjs +0 -280
- package/dist/byline-fields-BYbTptTU.mjs.map +0 -1
- package/dist/byline-fields-BjQH-1z9.mjs +0 -123
- package/dist/byline-fields-BjQH-1z9.mjs.map +0 -1
- package/dist/bylines-VytjeHBI.mjs +0 -214
- package/dist/bylines-VytjeHBI.mjs.map +0 -1
- package/dist/bylines-gyWBWUUc.mjs +0 -150
- package/dist/bylines-gyWBWUUc.mjs.map +0 -1
- package/dist/cache-CPanL9IO.mjs +0 -114
- package/dist/cache-CPanL9IO.mjs.map +0 -1
- package/dist/canonical-CAecl1UQ.mjs +0 -174
- package/dist/canonical-CAecl1UQ.mjs.map +0 -1
- package/dist/capture-triggers-CdZfvHtF.mjs +0 -362
- package/dist/capture-triggers-CdZfvHtF.mjs.map +0 -1
- package/dist/challenge-store-VePApay4.mjs +0 -51
- package/dist/challenge-store-VePApay4.mjs.map +0 -1
- package/dist/checksum-BSIhEAYW.mjs +0 -162
- package/dist/checksum-BSIhEAYW.mjs.map +0 -1
- package/dist/chrome-tags-CKELm-bo.mjs +0 -24
- package/dist/chrome-tags-CKELm-bo.mjs.map +0 -1
- package/dist/chunks-DBmkKmBH.mjs +0 -25
- package/dist/chunks-DBmkKmBH.mjs.map +0 -1
- package/dist/collection-slugs-cache-BNRAPNiu.mjs +0 -85
- package/dist/collection-slugs-cache-BNRAPNiu.mjs.map +0 -1
- package/dist/comment-Cq1UYN8_.mjs +0 -313
- package/dist/comment-Cq1UYN8_.mjs.map +0 -1
- package/dist/comment-reaction-B5sZzSoA.mjs +0 -85
- package/dist/comment-reaction-B5sZzSoA.mjs.map +0 -1
- package/dist/comments-B3F-ETyh.mjs +0 -195
- package/dist/comments-B3F-ETyh.mjs.map +0 -1
- package/dist/comments-zrTgWBSg.mjs +0 -99
- package/dist/comments-zrTgWBSg.mjs.map +0 -1
- package/dist/components-Dbf4Eq16.mjs +0 -108
- package/dist/components-Dbf4Eq16.mjs.map +0 -1
- package/dist/config-BCM5sQP7.d.mts +0 -6688
- package/dist/config-BCM5sQP7.d.mts.map +0 -1
- package/dist/config-CXPcy2iY.mjs +0 -228
- package/dist/config-CXPcy2iY.mjs.map +0 -1
- package/dist/config-CZkZBuBK.d.mts +0 -39
- package/dist/config-CZkZBuBK.d.mts.map +0 -1
- package/dist/connection-C5GIciX9.mjs +0 -36
- package/dist/connection-C5GIciX9.mjs.map +0 -1
- package/dist/content-RzEXY3QX.mjs +0 -2020
- package/dist/content-RzEXY3QX.mjs.map +0 -1
- package/dist/content-list-query-B6P37Ug_.d.mts +0 -26
- package/dist/content-list-query-B6P37Ug_.d.mts.map +0 -1
- package/dist/content-repair-BDVsYXWK.mjs +0 -442
- package/dist/content-repair-BDVsYXWK.mjs.map +0 -1
- package/dist/context-BpTIzY5h.mjs +0 -2026
- package/dist/context-BpTIzY5h.mjs.map +0 -1
- package/dist/credits-JOE92Gr7.mjs +0 -110
- package/dist/credits-JOE92Gr7.mjs.map +0 -1
- package/dist/cron-ktyapbdB.mjs +0 -306
- package/dist/cron-ktyapbdB.mjs.map +0 -1
- package/dist/dashboard-BoV4pwPP.mjs +0 -151
- package/dist/dashboard-BoV4pwPP.mjs.map +0 -1
- package/dist/default-B7KnYwtQ.mjs +0 -81
- package/dist/default-B7KnYwtQ.mjs.map +0 -1
- package/dist/deferred-tasks-eaUIqXj8.d.mts +0 -9
- package/dist/deferred-tasks-eaUIqXj8.d.mts.map +0 -1
- package/dist/dev-typegen-8JlYYFno.mjs +0 -29
- package/dist/dev-typegen-8JlYYFno.mjs.map +0 -1
- package/dist/device-flow-BlV_z24g.mjs +0 -521
- package/dist/device-flow-BlV_z24g.mjs.map +0 -1
- package/dist/digest-DiYAoZpf.mjs +0 -194
- package/dist/digest-DiYAoZpf.mjs.map +0 -1
- package/dist/direct-executor-Db8xA3zg.mjs +0 -104
- package/dist/direct-executor-Db8xA3zg.mjs.map +0 -1
- package/dist/email-console-Dm78wSmg.mjs +0 -50
- package/dist/email-console-Dm78wSmg.mjs.map +0 -1
- package/dist/email-locale-B4X9LXe9.mjs +0 -25
- package/dist/email-locale-B4X9LXe9.mjs.map +0 -1
- package/dist/emdash-runtime-BakQ6io7.mjs +0 -4239
- package/dist/emdash-runtime-BakQ6io7.mjs.map +0 -1
- package/dist/enrich-BDdVNeDK.mjs +0 -194
- package/dist/enrich-BDdVNeDK.mjs.map +0 -1
- package/dist/entry-lock-DY8B-xcr.d.mts +0 -4544
- package/dist/entry-lock-DY8B-xcr.d.mts.map +0 -1
- package/dist/entry-lock-DrUAdTzf.mjs +0 -163
- package/dist/entry-lock-DrUAdTzf.mjs.map +0 -1
- package/dist/entry-lock-yIkBduqJ.mjs +0 -1180
- package/dist/entry-lock-yIkBduqJ.mjs.map +0 -1
- package/dist/env-types-DkHYR2pl.mjs +0 -38
- package/dist/env-types-DkHYR2pl.mjs.map +0 -1
- package/dist/error-DIYXAVk4.mjs +0 -90
- package/dist/error-DIYXAVk4.mjs.map +0 -1
- package/dist/errors-CNvATh_7.mjs +0 -469
- package/dist/errors-CNvATh_7.mjs.map +0 -1
- package/dist/errors-CjXd1LgH.mjs +0 -120
- package/dist/errors-CjXd1LgH.mjs.map +0 -1
- package/dist/escape-B1GM0yJU.mjs +0 -9
- package/dist/escape-B1GM0yJU.mjs.map +0 -1
- package/dist/fence-8MaKKWhp.mjs +0 -162
- package/dist/fence-8MaKKWhp.mjs.map +0 -1
- package/dist/field-defs-cache-DEkFYCDE.mjs +0 -77
- package/dist/field-defs-cache-DEkFYCDE.mjs.map +0 -1
- package/dist/field-map-D7ioN0r0.mjs +0 -83
- package/dist/field-map-D7ioN0r0.mjs.map +0 -1
- package/dist/fts-manager-DU03MxWu.mjs +0 -443
- package/dist/fts-manager-DU03MxWu.mjs.map +0 -1
- package/dist/gc-DMiE7ezk.mjs +0 -75
- package/dist/gc-DMiE7ezk.mjs.map +0 -1
- package/dist/hash-CY4QdeMJ.mjs +0 -37
- package/dist/hash-CY4QdeMJ.mjs.map +0 -1
- package/dist/hook-result-Cb67D3P3.d.mts +0 -31
- package/dist/hook-result-Cb67D3P3.d.mts.map +0 -1
- package/dist/hreflang-Bterc3b7.mjs +0 -105
- package/dist/hreflang-Bterc3b7.mjs.map +0 -1
- package/dist/hreflang-uIBOE5yg.d.mts +0 -50
- package/dist/hreflang-uIBOE5yg.d.mts.map +0 -1
- package/dist/http-route-dispatch-DubjTibD.mjs +0 -339
- package/dist/http-route-dispatch-DubjTibD.mjs.map +0 -1
- package/dist/identity-DJ-5AcdG.mjs +0 -35
- package/dist/identity-DJ-5AcdG.mjs.map +0 -1
- package/dist/import-DEfuIgRz.mjs +0 -2020
- package/dist/import-DEfuIgRz.mjs.map +0 -1
- package/dist/index-xCy3j0f6.d.mts +0 -623
- package/dist/index-xCy3j0f6.d.mts.map +0 -1
- package/dist/init-lock-4eRRB4Le.mjs +0 -56
- package/dist/init-lock-4eRRB4Le.mjs.map +0 -1
- package/dist/install-finalization-DeGRbaVa.mjs +0 -58
- package/dist/install-finalization-DeGRbaVa.mjs.map +0 -1
- package/dist/keys-DWwMxdZh.mjs +0 -61
- package/dist/keys-DWwMxdZh.mjs.map +0 -1
- package/dist/kinds-D1A-00-F.mjs +0 -974
- package/dist/kinds-D1A-00-F.mjs.map +0 -1
- package/dist/lifecycle-BWtBGNEn.mjs +0 -25
- package/dist/lifecycle-BWtBGNEn.mjs.map +0 -1
- package/dist/load-BR1NEa_3.mjs +0 -28
- package/dist/load-BR1NEa_3.mjs.map +0 -1
- package/dist/loader-D4edocWH.mjs +0 -1197
- package/dist/loader-D4edocWH.mjs.map +0 -1
- package/dist/loops-DLaHFrvI.mjs +0 -205
- package/dist/loops-DLaHFrvI.mjs.map +0 -1
- package/dist/manifest-builder-8jsSLR7s.mjs +0 -189
- package/dist/manifest-builder-8jsSLR7s.mjs.map +0 -1
- package/dist/manifest-schema-DcZjRNEv.mjs +0 -496
- package/dist/manifest-schema-DcZjRNEv.mjs.map +0 -1
- package/dist/marketplace-CNxjq10S.mjs +0 -257
- package/dist/marketplace-CNxjq10S.mjs.map +0 -1
- package/dist/media-3v7mqAVX.mjs +0 -294
- package/dist/media-3v7mqAVX.mjs.map +0 -1
- package/dist/media-Bs6qmlVl.mjs +0 -408
- package/dist/media-Bs6qmlVl.mjs.map +0 -1
- package/dist/media-CputjGE1.mjs +0 -373
- package/dist/media-CputjGE1.mjs.map +0 -1
- package/dist/media-allowlist-isqF1gAh.mjs +0 -44
- package/dist/media-allowlist-isqF1gAh.mjs.map +0 -1
- package/dist/media-folders-D2VdVBf6.mjs +0 -210
- package/dist/media-folders-D2VdVBf6.mjs.map +0 -1
- package/dist/media-url-DbkMY3y6.mjs +0 -43
- package/dist/media-url-DbkMY3y6.mjs.map +0 -1
- package/dist/media-usage-activation-BaT4AlNI.mjs +0 -78
- package/dist/media-usage-activation-BaT4AlNI.mjs.map +0 -1
- package/dist/media-usage-v43L0kR_.mjs +0 -282
- package/dist/media-usage-v43L0kR_.mjs.map +0 -1
- package/dist/media-usage-work-CY8gIeU-.mjs +0 -151
- package/dist/media-usage-work-CY8gIeU-.mjs.map +0 -1
- package/dist/media-usage-work-VO108Q9E.mjs +0 -1015
- package/dist/media-usage-work-VO108Q9E.mjs.map +0 -1
- package/dist/menus-BYyeRemR.mjs +0 -3647
- package/dist/menus-BYyeRemR.mjs.map +0 -1
- package/dist/menus-mC_XTxD7.mjs +0 -92
- package/dist/menus-mC_XTxD7.mjs.map +0 -1
- package/dist/menus-trvc6_fW.mjs +0 -753
- package/dist/menus-trvc6_fW.mjs.map +0 -1
- package/dist/mime-IZf-LHIS.mjs +0 -36
- package/dist/mime-IZf-LHIS.mjs.map +0 -1
- package/dist/mode-B9-gMXL9.mjs +0 -23
- package/dist/mode-B9-gMXL9.mjs.map +0 -1
- package/dist/node-sqlite-compat-DztcWs4y.mjs +0 -63
- package/dist/node-sqlite-compat-DztcWs4y.mjs.map +0 -1
- package/dist/oauth-authorization-BIHy9SGU.mjs +0 -274
- package/dist/oauth-authorization-BIHy9SGU.mjs.map +0 -1
- package/dist/oauth-clients-BZWZvKXa.mjs +0 -266
- package/dist/oauth-clients-BZWZvKXa.mjs.map +0 -1
- package/dist/oauth-state-store-CxXTjXdI.mjs +0 -50
- package/dist/oauth-state-store-CxXTjXdI.mjs.map +0 -1
- package/dist/oauth-user-lookup-GWojfxRl.mjs +0 -26
- package/dist/oauth-user-lookup-GWojfxRl.mjs.map +0 -1
- package/dist/options-DRF6dlXY.d.mts +0 -81
- package/dist/options-DRF6dlXY.d.mts.map +0 -1
- package/dist/ownership-Bd77AmJz.mjs +0 -12
- package/dist/ownership-Bd77AmJz.mjs.map +0 -1
- package/dist/parse-5Y0W39xR.mjs +0 -81
- package/dist/parse-5Y0W39xR.mjs.map +0 -1
- package/dist/parse-BPblgoa-.d.mts +0 -172
- package/dist/parse-BPblgoa-.d.mts.map +0 -1
- package/dist/passkey-config-PiQ5cBnt.mjs +0 -46
- package/dist/passkey-config-PiQ5cBnt.mjs.map +0 -1
- package/dist/paths-DkS74lBM.mjs +0 -77
- package/dist/paths-DkS74lBM.mjs.map +0 -1
- package/dist/placeholder-Bez2282x.d.mts +0 -306
- package/dist/placeholder-Bez2282x.d.mts.map +0 -1
- package/dist/plan-Lw7iGnGD.mjs +0 -135
- package/dist/plan-Lw7iGnGD.mjs.map +0 -1
- package/dist/plugins-D7xSh1Lu.mjs +0 -277
- package/dist/plugins-D7xSh1Lu.mjs.map +0 -1
- package/dist/policy-DMRiMdLn.mjs +0 -45
- package/dist/policy-DMRiMdLn.mjs.map +0 -1
- package/dist/portable-text-kcyN3F-a.mjs +0 -307
- package/dist/portable-text-kcyN3F-a.mjs.map +0 -1
- package/dist/preview--2VDLaND.mjs +0 -107
- package/dist/preview--2VDLaND.mjs.map +0 -1
- package/dist/protocol-FvwLA8P-.d.mts +0 -61
- package/dist/protocol-FvwLA8P-.d.mts.map +0 -1
- package/dist/public-submission-BRyK76U8.mjs +0 -250
- package/dist/public-submission-BRyK76U8.mjs.map +0 -1
- package/dist/public-url-7j0cpCFc.mjs +0 -101
- package/dist/public-url-7j0cpCFc.mjs.map +0 -1
- package/dist/query-BRNTde3V.mjs +0 -41
- package/dist/query-BRNTde3V.mjs.map +0 -1
- package/dist/query-DyYYWOKk.mjs +0 -1161
- package/dist/query-DyYYWOKk.mjs.map +0 -1
- package/dist/rate-limit-D0BcE76H.mjs +0 -120
- package/dist/rate-limit-D0BcE76H.mjs.map +0 -1
- package/dist/receipt-C4icyHlC.mjs +0 -43
- package/dist/receipt-C4icyHlC.mjs.map +0 -1
- package/dist/redirect-9DbtxSNG.mjs +0 -19
- package/dist/redirect-9DbtxSNG.mjs.map +0 -1
- package/dist/redirect-BvFKh8Sz.mjs +0 -416
- package/dist/redirect-BvFKh8Sz.mjs.map +0 -1
- package/dist/redirects-1nhdEaTq.mjs +0 -148
- package/dist/redirects-1nhdEaTq.mjs.map +0 -1
- package/dist/redirects-D1yMnSR9.mjs +0 -446
- package/dist/redirects-D1yMnSR9.mjs.map +0 -1
- package/dist/registry-CzPJNu3H.mjs +0 -8366
- package/dist/registry-CzPJNu3H.mjs.map +0 -1
- package/dist/relations-C8JpSkU6.mjs +0 -776
- package/dist/relations-C8JpSkU6.mjs.map +0 -1
- package/dist/request-meta-Bs60XW1m.mjs +0 -141
- package/dist/request-meta-Bs60XW1m.mjs.map +0 -1
- package/dist/resolve-BHWgMU_X.mjs +0 -100
- package/dist/resolve-BHWgMU_X.mjs.map +0 -1
- package/dist/revision-CGkQA0e5.mjs +0 -366
- package/dist/revision-CGkQA0e5.mjs.map +0 -1
- package/dist/route-wire-ClUVQduA.mjs +0 -197
- package/dist/route-wire-ClUVQduA.mjs.map +0 -1
- package/dist/routes-D2GFl3B7.mjs +0 -272
- package/dist/routes-D2GFl3B7.mjs.map +0 -1
- package/dist/runner-CLpxmhl8.mjs +0 -6197
- package/dist/runner-CLpxmhl8.mjs.map +0 -1
- package/dist/runner-CWl76CH3.d.mts +0 -68
- package/dist/runner-CWl76CH3.d.mts.map +0 -1
- package/dist/schema-27XefSYG.mjs +0 -13
- package/dist/schema-27XefSYG.mjs.map +0 -1
- package/dist/schema-Btvj3BMh.mjs +0 -815
- package/dist/schema-Btvj3BMh.mjs.map +0 -1
- package/dist/scopes-DGCj6K4p.mjs +0 -34
- package/dist/scopes-DGCj6K4p.mjs.map +0 -1
- package/dist/search-pZRRmWjh.mjs +0 -448
- package/dist/search-pZRRmWjh.mjs.map +0 -1
- package/dist/secrets-CIi0nFiR.mjs +0 -341
- package/dist/secrets-CIi0nFiR.mjs.map +0 -1
- package/dist/sections-CIhqs3Ao.mjs +0 -346
- package/dist/sections-CIhqs3Ao.mjs.map +0 -1
- package/dist/seo-DifeiGdl.mjs +0 -114
- package/dist/seo-DifeiGdl.mjs.map +0 -1
- package/dist/seo-DpYxmGaL.mjs +0 -133
- package/dist/seo-DpYxmGaL.mjs.map +0 -1
- package/dist/service-COVdVpSK.mjs +0 -150
- package/dist/service-COVdVpSK.mjs.map +0 -1
- package/dist/session-user-C6IEjuty.mjs +0 -61
- package/dist/session-user-C6IEjuty.mjs.map +0 -1
- package/dist/settings-CwcrX-Ay.mjs +0 -61
- package/dist/settings-CwcrX-Ay.mjs.map +0 -1
- package/dist/settings-D_cJtT48.mjs +0 -439
- package/dist/settings-D_cJtT48.mjs.map +0 -1
- package/dist/settings-tnPQN3Z2.mjs +0 -51
- package/dist/settings-tnPQN3Z2.mjs.map +0 -1
- package/dist/setup-complete-BOrI10UY.mjs +0 -65
- package/dist/setup-complete-BOrI10UY.mjs.map +0 -1
- package/dist/setup-nonce-0XTBLTsX.mjs +0 -25
- package/dist/setup-nonce-0XTBLTsX.mjs.map +0 -1
- package/dist/single-flight-cache-B5O2qhO1.mjs +0 -104
- package/dist/single-flight-cache-B5O2qhO1.mjs.map +0 -1
- package/dist/site-settings-B7vGFRDT.mjs +0 -50
- package/dist/site-settings-B7vGFRDT.mjs.map +0 -1
- package/dist/site-url-wEYRMHBv.mjs +0 -16
- package/dist/site-url-wEYRMHBv.mjs.map +0 -1
- package/dist/snapshot-W36KbLmc.mjs +0 -414
- package/dist/snapshot-W36KbLmc.mjs.map +0 -1
- package/dist/ssrf-CRJ-xom5.mjs +0 -406
- package/dist/ssrf-CRJ-xom5.mjs.map +0 -1
- package/dist/stage-DA0NrTRZ.mjs +0 -662
- package/dist/stage-DA0NrTRZ.mjs.map +0 -1
- package/dist/staged-Bw5eHbKS.mjs +0 -686
- package/dist/staged-Bw5eHbKS.mjs.map +0 -1
- package/dist/state-BTlprvUF.mjs +0 -153
- package/dist/state-BTlprvUF.mjs.map +0 -1
- package/dist/status-C6IrSLMT.mjs +0 -30
- package/dist/status-C6IrSLMT.mjs.map +0 -1
- package/dist/storage-query-CdVF2bng.d.mts +0 -1614
- package/dist/storage-query-CdVF2bng.d.mts.map +0 -1
- package/dist/tar-BGOZARjy.mjs +0 -449
- package/dist/tar-BGOZARjy.mjs.map +0 -1
- package/dist/target-YhYH_0uc.mjs +0 -27
- package/dist/target-YhYH_0uc.mjs.map +0 -1
- package/dist/taxonomies-DK_XBrmT.mjs +0 -697
- package/dist/taxonomies-DK_XBrmT.mjs.map +0 -1
- package/dist/taxonomies-S1M3rUC0.mjs +0 -939
- package/dist/taxonomies-S1M3rUC0.mjs.map +0 -1
- package/dist/taxonomy-BesdHIwi.mjs +0 -525
- package/dist/taxonomy-BesdHIwi.mjs.map +0 -1
- package/dist/tokens-B_ffPF1q.mjs +0 -171
- package/dist/tokens-B_ffPF1q.mjs.map +0 -1
- package/dist/transfer-9fVSxyrV.mjs +0 -166
- package/dist/transfer-9fVSxyrV.mjs.map +0 -1
- package/dist/transfer-B7LUTaYD.mjs +0 -8855
- package/dist/transfer-B7LUTaYD.mjs.map +0 -1
- package/dist/transfer-download-BdNq4VWN.mjs +0 -33
- package/dist/transfer-download-BdNq4VWN.mjs.map +0 -1
- package/dist/transformations-BtQdvyly.mjs +0 -196
- package/dist/transformations-BtQdvyly.mjs.map +0 -1
- package/dist/transport-CriYXY1c.mjs +0 -136
- package/dist/transport-CriYXY1c.mjs.map +0 -1
- package/dist/transport-SnhS6xku.d.mts +0 -42
- package/dist/transport-SnhS6xku.d.mts.map +0 -1
- package/dist/trusted-proxy-C0eHXPd-.mjs +0 -51
- package/dist/trusted-proxy-C0eHXPd-.mjs.map +0 -1
- package/dist/turnstile-BNPrWd1e.mjs +0 -53
- package/dist/turnstile-BNPrWd1e.mjs.map +0 -1
- package/dist/types-B8sF_kE5.d.mts +0 -287
- package/dist/types-B8sF_kE5.d.mts.map +0 -1
- package/dist/types-BYVIYOlD.d.mts +0 -1720
- package/dist/types-BYVIYOlD.d.mts.map +0 -1
- package/dist/types-Bs4bi95j.d.mts +0 -374
- package/dist/types-Bs4bi95j.d.mts.map +0 -1
- package/dist/types-CGuODCZi.d.mts +0 -198
- package/dist/types-CGuODCZi.d.mts.map +0 -1
- package/dist/types-CVsmpTcU.mjs +0 -18
- package/dist/types-CVsmpTcU.mjs.map +0 -1
- package/dist/types-ClFEExxn.mjs +0 -37
- package/dist/types-ClFEExxn.mjs.map +0 -1
- package/dist/types-D994zUWB.d.mts +0 -85
- package/dist/types-D994zUWB.d.mts.map +0 -1
- package/dist/types-DAj1ByJQ.d.mts +0 -125
- package/dist/types-DAj1ByJQ.d.mts.map +0 -1
- package/dist/types-Dlv6esp4.mjs +0 -77
- package/dist/types-Dlv6esp4.mjs.map +0 -1
- package/dist/types-Dr1LVwL7.d.mts +0 -363
- package/dist/types-Dr1LVwL7.d.mts.map +0 -1
- package/dist/types-MN9bOQ1g.d.mts +0 -198
- package/dist/types-MN9bOQ1g.d.mts.map +0 -1
- package/dist/types-d2Szb1oz.mjs +0 -16
- package/dist/types-d2Szb1oz.mjs.map +0 -1
- package/dist/types-ibtP7GEA.d.mts +0 -896
- package/dist/types-ibtP7GEA.d.mts.map +0 -1
- package/dist/types-j6MBDjlZ.mjs +0 -103
- package/dist/types-j6MBDjlZ.mjs.map +0 -1
- package/dist/update-check-D8No-E5s.mjs +0 -161
- package/dist/update-check-D8No-E5s.mjs.map +0 -1
- package/dist/upload-attempts-BodUoFBu.mjs +0 -32
- package/dist/upload-attempts-BodUoFBu.mjs.map +0 -1
- package/dist/url-pattern-DGAG6ZP2.mjs +0 -41
- package/dist/url-pattern-DGAG6ZP2.mjs.map +0 -1
- package/dist/user-BOvuF1sQ.mjs +0 -171
- package/dist/user-BOvuF1sQ.mjs.map +0 -1
- package/dist/utils-Dr01wRKt.mjs +0 -439
- package/dist/utils-Dr01wRKt.mjs.map +0 -1
- package/dist/validate-BttYU7NK.mjs +0 -516
- package/dist/validate-BttYU7NK.mjs.map +0 -1
- package/dist/validate-Df09inbC.d.mts +0 -468
- package/dist/validate-Df09inbC.d.mts.map +0 -1
- package/dist/validation-DH2WRwWO.mjs +0 -219
- package/dist/validation-DH2WRwWO.mjs.map +0 -1
- package/dist/version-BbygH8CT.mjs +0 -7
- package/dist/version-BbygH8CT.mjs.map +0 -1
- package/dist/version-CseoDDOd.mjs +0 -9
- package/dist/version-CseoDDOd.mjs.map +0 -1
- package/dist/virtual-modules-82GlnQyG.mjs +0 -516
- package/dist/virtual-modules-82GlnQyG.mjs.map +0 -1
- package/dist/widgets-DMAgGcQt.mjs +0 -126
- package/dist/widgets-DMAgGcQt.mjs.map +0 -1
- package/dist/wxr-taxonomies-Bi5kFSxQ.mjs +0 -453
- package/dist/wxr-taxonomies-Bi5kFSxQ.mjs.map +0 -1
- package/dist/wxr-taxonomies-y_FpYlDn.d.mts +0 -34
- package/dist/wxr-taxonomies-y_FpYlDn.d.mts.map +0 -1
- package/dist/zod-generator-DnfG5sGQ.mjs +0 -424
- package/dist/zod-generator-DnfG5sGQ.mjs.map +0 -1
- /package/dist/{api-tokens-B4COohsb.mjs → api-tokens-BLz2MtQs.mjs} +0 -0
- /package/dist/{ssrf-sC4_5rxm.mjs → ssrf-tA45vIPX.mjs} +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { n as initWithLock, t as createInitLock } from "./init-lock-BGmew3r1.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/single-flight-cache.ts
|
|
4
|
+
/**
|
|
5
|
+
* Global-scope async value cache with single-flight and poison-immunity.
|
|
6
|
+
*
|
|
7
|
+
* Built for the "compute once for the lifetime of the JS global scope, read
|
|
8
|
+
* on every request" caches (site settings, search-health verification, ...).
|
|
9
|
+
* That global scope is the process on Node and the isolate on Cloudflare
|
|
10
|
+
* Workers — this helper is platform-neutral; the hazard it defends against is
|
|
11
|
+
* specific to workerd but the cache itself is not.
|
|
12
|
+
*
|
|
13
|
+
* These caches must coalesce concurrent cold reads into one query — but the
|
|
14
|
+
* obvious way to do that, caching the in-flight *promise* on a global and
|
|
15
|
+
* awaiting it from later requests, is unsafe on workerd: if the request that
|
|
16
|
+
* created the promise is cancelled mid-await (client disconnect, context
|
|
17
|
+
* teardown), its continuation never runs, so the promise neither resolves nor
|
|
18
|
+
* rejects. Every later request that awaits that shared promise then hangs
|
|
19
|
+
* until the isolate is evicted (observed as 524s at the 100s wall, near-zero
|
|
20
|
+
* CPU). A `.catch`/`.finally` that clears the cache doesn't help — a cancelled
|
|
21
|
+
* request settles neither way.
|
|
22
|
+
*
|
|
23
|
+
* This cache stores the resolved *value* (not a promise) and coalesces via
|
|
24
|
+
* `initWithLock`: one request becomes the owner and runs `fetch`, everyone
|
|
25
|
+
* else polls for the published value and never awaits the owner's promise.
|
|
26
|
+
* A cancelled owner can therefore never strand a waiter — the worst case is
|
|
27
|
+
* the lock looks held until `deadlineMs`, then the next caller reclaims. The
|
|
28
|
+
* owner's `fetch` is also anchored (waitUntil) so a cancelled originator's
|
|
29
|
+
* query still completes and populates the cache, and bounded by
|
|
30
|
+
* `ownerTimeoutMs` so a genuinely stuck fetch reclaims instead of hanging.
|
|
31
|
+
*
|
|
32
|
+
* Invalidation bumps `version`; reads compare against the version captured at
|
|
33
|
+
* call time and refetch on mismatch.
|
|
34
|
+
*/
|
|
35
|
+
function createSingleFlightCache() {
|
|
36
|
+
return {
|
|
37
|
+
value: null,
|
|
38
|
+
hasValue: false,
|
|
39
|
+
version: 0,
|
|
40
|
+
valueVersion: -1,
|
|
41
|
+
lock: createInitLock()
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Force the next `singleFlightCached` call to refetch. An in-flight owner
|
|
46
|
+
* fetched at the old version will not publish into the new version, so its
|
|
47
|
+
* result is ignored by subsequent reads.
|
|
48
|
+
*/
|
|
49
|
+
function invalidateSingleFlightCache(cache) {
|
|
50
|
+
cache.version++;
|
|
51
|
+
cache.hasValue = false;
|
|
52
|
+
cache.value = null;
|
|
53
|
+
cache.valueVersion = -1;
|
|
54
|
+
cache.lock.ownerStartedAt = null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Headroom between the owner's own timeout and the waiter reclaim deadline.
|
|
58
|
+
* The reclaim deadline must sit *above* `ownerTimeoutMs` so a slow-but-live
|
|
59
|
+
* owner times out (and releases the lock) before a waiter would reclaim it —
|
|
60
|
+
* otherwise a fetch slower than the deadline is superseded before it can
|
|
61
|
+
* publish, and steady traffic turns that into a self-sustaining stampede.
|
|
62
|
+
*/
|
|
63
|
+
const RECLAIM_HEADROOM_MS = 5e3;
|
|
64
|
+
function withTimeout(promise, ms) {
|
|
65
|
+
return new Promise((resolve, reject) => {
|
|
66
|
+
const timer = setTimeout(() => {
|
|
67
|
+
reject(/* @__PURE__ */ new Error(`singleFlightCached: owner fetch exceeded ${ms}ms`));
|
|
68
|
+
}, ms);
|
|
69
|
+
promise.then(resolve, reject).finally(() => {
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Return the cached value for `cache`, computing it via `fetch` under a
|
|
76
|
+
* single-flight lock on a miss. Concurrent callers coalesce onto one fetch;
|
|
77
|
+
* a cancelled owner cannot poison later callers (see file header).
|
|
78
|
+
*/
|
|
79
|
+
function singleFlightCached(cache, fetch, options = {}) {
|
|
80
|
+
const versionAtCall = cache.version;
|
|
81
|
+
const ownerTimeoutMs = options.ownerTimeoutMs !== void 0 && Number.isFinite(options.ownerTimeoutMs) && options.ownerTimeoutMs > 0 ? options.ownerTimeoutMs : void 0;
|
|
82
|
+
const deadlineMs = ownerTimeoutMs === void 0 ? options.deadlineMs : Math.max(options.deadlineMs ?? 0, ownerTimeoutMs + RECLAIM_HEADROOM_MS);
|
|
83
|
+
return initWithLock(cache.lock, () => cache.hasValue && cache.valueVersion === versionAtCall ? { v: cache.value } : null, (isCurrentClaim) => {
|
|
84
|
+
const real = (async () => {
|
|
85
|
+
const value = await fetch();
|
|
86
|
+
if (isCurrentClaim()) {
|
|
87
|
+
cache.value = value;
|
|
88
|
+
cache.hasValue = true;
|
|
89
|
+
cache.valueVersion = versionAtCall;
|
|
90
|
+
}
|
|
91
|
+
return { v: value };
|
|
92
|
+
})();
|
|
93
|
+
options.anchor?.(real.then(() => void 0, () => void 0));
|
|
94
|
+
return ownerTimeoutMs === void 0 ? real : withTimeout(real, ownerTimeoutMs);
|
|
95
|
+
}, {
|
|
96
|
+
deadlineMs,
|
|
97
|
+
pollMs: options.pollMs,
|
|
98
|
+
maxWaitMs: options.maxWaitMs
|
|
99
|
+
}).then((box) => box.v);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
export { invalidateSingleFlightCache as n, singleFlightCached as r, createSingleFlightCache as t };
|
|
104
|
+
//# sourceMappingURL=single-flight-cache-D0EaGbN1.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-flight-cache-D0EaGbN1.mjs","names":[],"sources":["../src/utils/single-flight-cache.ts"],"sourcesContent":["/**\n * Global-scope async value cache with single-flight and poison-immunity.\n *\n * Built for the \"compute once for the lifetime of the JS global scope, read\n * on every request\" caches (site settings, search-health verification, ...).\n * That global scope is the process on Node and the isolate on Cloudflare\n * Workers — this helper is platform-neutral; the hazard it defends against is\n * specific to workerd but the cache itself is not.\n *\n * These caches must coalesce concurrent cold reads into one query — but the\n * obvious way to do that, caching the in-flight *promise* on a global and\n * awaiting it from later requests, is unsafe on workerd: if the request that\n * created the promise is cancelled mid-await (client disconnect, context\n * teardown), its continuation never runs, so the promise neither resolves nor\n * rejects. Every later request that awaits that shared promise then hangs\n * until the isolate is evicted (observed as 524s at the 100s wall, near-zero\n * CPU). A `.catch`/`.finally` that clears the cache doesn't help — a cancelled\n * request settles neither way.\n *\n * This cache stores the resolved *value* (not a promise) and coalesces via\n * `initWithLock`: one request becomes the owner and runs `fetch`, everyone\n * else polls for the published value and never awaits the owner's promise.\n * A cancelled owner can therefore never strand a waiter — the worst case is\n * the lock looks held until `deadlineMs`, then the next caller reclaims. The\n * owner's `fetch` is also anchored (waitUntil) so a cancelled originator's\n * query still completes and populates the cache, and bounded by\n * `ownerTimeoutMs` so a genuinely stuck fetch reclaims instead of hanging.\n *\n * Invalidation bumps `version`; reads compare against the version captured at\n * call time and refetch on mismatch.\n */\n\nimport { createInitLock, type InitLock, initWithLock } from \"./init-lock.js\";\n\nexport interface SingleFlightCache<T> {\n\t/** Last resolved value, valid only when `hasValue` is true. */\n\tvalue: T | null;\n\t/**\n\t * Presence flag, separate from `value` so that falsy/`undefined`/`void`\n\t * results cache correctly (a plain null check can't distinguish \"cached\n\t * undefined\" from \"never fetched\").\n\t */\n\thasValue: boolean;\n\t/** Invalidation counter; bumped by `invalidateSingleFlightCache`. */\n\tversion: number;\n\t/** The `version` the cached value was fetched at. */\n\tvalueVersion: number;\n\t/** Reclaimable single-flight lock (see init-lock.ts). */\n\tlock: InitLock;\n}\n\nexport function createSingleFlightCache<T>(): SingleFlightCache<T> {\n\treturn { value: null, hasValue: false, version: 0, valueVersion: -1, lock: createInitLock() };\n}\n\n/**\n * Force the next `singleFlightCached` call to refetch. An in-flight owner\n * fetched at the old version will not publish into the new version, so its\n * result is ignored by subsequent reads.\n */\nexport function invalidateSingleFlightCache(cache: SingleFlightCache<unknown>): void {\n\tcache.version++;\n\tcache.hasValue = false;\n\tcache.value = null;\n\tcache.valueVersion = -1;\n\t// Free the single-flight lock so a reader at the new version starts the\n\t// refetch immediately instead of waiting out a stale owner's deadline. A\n\t// still-running old-version owner can neither publish into the new version\n\t// (version gate) nor clobber a new owner (claim gate), so releasing here\n\t// is safe; the worst case is one brief duplicate fetch.\n\tcache.lock.ownerStartedAt = null;\n}\n\n/**\n * Headroom between the owner's own timeout and the waiter reclaim deadline.\n * The reclaim deadline must sit *above* `ownerTimeoutMs` so a slow-but-live\n * owner times out (and releases the lock) before a waiter would reclaim it —\n * otherwise a fetch slower than the deadline is superseded before it can\n * publish, and steady traffic turns that into a self-sustaining stampede.\n */\nconst RECLAIM_HEADROOM_MS = 5_000;\n\nexport interface SingleFlightCachedOptions {\n\t/**\n\t * Hand the in-flight fetch to the host's lifetime extender (waitUntil via\n\t * `after()`), so a cancelled originating request still drives it to\n\t * completion and populates the cache.\n\t */\n\tanchor?: (promise: Promise<void>) => void;\n\t/** Reclaim the single-flight lock if the owner holds it past this. */\n\tdeadlineMs?: number;\n\t/** Waiter poll interval. */\n\tpollMs?: number;\n\t/** Waiter gives up and throws after this long rather than hanging. */\n\tmaxWaitMs?: number;\n\t/**\n\t * Bound the owner's own `fetch`: if it doesn't settle within this, the\n\t * owner rejects (and releases the lock) instead of waiting indefinitely.\n\t * The anchored copy keeps running, so a slow-but-live fetch can still\n\t * publish for a later caller. Omit to leave the owner unbounded.\n\t */\n\townerTimeoutMs?: number;\n}\n\n/** Boxed cache hit so a `void`/falsy value is still distinguishable from a miss. */\ninterface Box<T> {\n\tv: T;\n}\n\nfunction withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {\n\treturn new Promise<T>((resolve, reject) => {\n\t\tconst timer = setTimeout(() => {\n\t\t\treject(new Error(`singleFlightCached: owner fetch exceeded ${ms}ms`));\n\t\t}, ms);\n\t\t// Settle from the underlying promise (whichever wins the race with the\n\t\t// timer), and always clear the timer so a resolved fetch doesn't leave\n\t\t// a pending timeout holding the isolate alive.\n\t\tpromise.then(resolve, reject).finally(() => {\n\t\t\tclearTimeout(timer);\n\t\t});\n\t});\n}\n\n/**\n * Return the cached value for `cache`, computing it via `fetch` under a\n * single-flight lock on a miss. Concurrent callers coalesce onto one fetch;\n * a cancelled owner cannot poison later callers (see file header).\n */\nexport function singleFlightCached<T>(\n\tcache: SingleFlightCache<T>,\n\tfetch: () => Promise<T>,\n\toptions: SingleFlightCachedOptions = {},\n): Promise<T> {\n\t// Capture the version once: a value published at this version satisfies\n\t// this call; an invalidation that lands mid-fetch makes the published\n\t// value stale for *later* calls (which captured the newer version) but\n\t// still valid for this one.\n\tconst versionAtCall = cache.version;\n\n\t// Ignore a non-positive / non-finite owner timeout rather than letting it\n\t// degenerate into an instant-reject (setTimeout coerces NaN/0 to ~0ms).\n\tconst ownerTimeoutMs =\n\t\toptions.ownerTimeoutMs !== undefined &&\n\t\tNumber.isFinite(options.ownerTimeoutMs) &&\n\t\toptions.ownerTimeoutMs > 0\n\t\t\t? options.ownerTimeoutMs\n\t\t\t: undefined;\n\n\t// Keep the reclaim deadline above the owner timeout (see RECLAIM_HEADROOM_MS):\n\t// the owner's own timeout, not a waiter reclaim, is the primary release.\n\tconst deadlineMs =\n\t\townerTimeoutMs === undefined\n\t\t\t? options.deadlineMs\n\t\t\t: Math.max(options.deadlineMs ?? 0, ownerTimeoutMs + RECLAIM_HEADROOM_MS);\n\n\treturn initWithLock<Box<T>>(\n\t\tcache.lock,\n\t\t() =>\n\t\t\tcache.hasValue && cache.valueVersion === versionAtCall\n\t\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- hasValue gates that `value` holds a real T\n\t\t\t\t\t({ v: cache.value as T } satisfies Box<T>)\n\t\t\t\t: null,\n\t\t(isCurrentClaim) => {\n\t\t\t// The real work, anchored independently so a cancelled owner's\n\t\t\t// fetch still settles and publishes. Publication is gated on the\n\t\t\t// claim so a reclaimed slow owner can't clobber the reclaimer's\n\t\t\t// value (same contract as initWithLock's own callers).\n\t\t\tconst real = (async (): Promise<Box<T>> => {\n\t\t\t\tconst value = await fetch();\n\t\t\t\tif (isCurrentClaim()) {\n\t\t\t\t\tcache.value = value;\n\t\t\t\t\tcache.hasValue = true;\n\t\t\t\t\tcache.valueVersion = versionAtCall;\n\t\t\t\t}\n\t\t\t\treturn { v: value };\n\t\t\t})();\n\t\t\t// Anchor the real fetch (not the timeout race): this is what must\n\t\t\t// survive a cancelled owner and run to publication. initWithLock is\n\t\t\t// left to manage only the lock; we don't double-anchor.\n\t\t\toptions.anchor?.(\n\t\t\t\treal.then(\n\t\t\t\t\t() => undefined,\n\t\t\t\t\t() => undefined,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn ownerTimeoutMs === undefined ? real : withTimeout(real, ownerTimeoutMs);\n\t\t},\n\t\t{\n\t\t\tdeadlineMs,\n\t\t\tpollMs: options.pollMs,\n\t\t\tmaxWaitMs: options.maxWaitMs,\n\t\t},\n\t).then((box) => box.v);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAgB,0BAAmD;AAClE,QAAO;EAAE,OAAO;EAAM,UAAU;EAAO,SAAS;EAAG,cAAc;EAAI,MAAM,gBAAgB;EAAE;;;;;;;AAQ9F,SAAgB,4BAA4B,OAAyC;AACpF,OAAM;AACN,OAAM,WAAW;AACjB,OAAM,QAAQ;AACd,OAAM,eAAe;AAMrB,OAAM,KAAK,iBAAiB;;;;;;;;;AAU7B,MAAM,sBAAsB;AA6B5B,SAAS,YAAe,SAAqB,IAAwB;AACpE,QAAO,IAAI,SAAY,SAAS,WAAW;EAC1C,MAAM,QAAQ,iBAAiB;AAC9B,0BAAO,IAAI,MAAM,4CAA4C,GAAG,IAAI,CAAC;KACnE,GAAG;AAIN,UAAQ,KAAK,SAAS,OAAO,CAAC,cAAc;AAC3C,gBAAa,MAAM;IAClB;GACD;;;;;;;AAQH,SAAgB,mBACf,OACA,OACA,UAAqC,EAAE,EAC1B;CAKb,MAAM,gBAAgB,MAAM;CAI5B,MAAM,iBACL,QAAQ,mBAAmB,UAC3B,OAAO,SAAS,QAAQ,eAAe,IACvC,QAAQ,iBAAiB,IACtB,QAAQ,iBACR;CAIJ,MAAM,aACL,mBAAmB,SAChB,QAAQ,aACR,KAAK,IAAI,QAAQ,cAAc,GAAG,iBAAiB,oBAAoB;AAE3E,QAAO,aACN,MAAM,YAEL,MAAM,YAAY,MAAM,iBAAiB,gBAEtC,EAAE,GAAG,MAAM,OAAY,GACvB,OACH,mBAAmB;EAKnB,MAAM,QAAQ,YAA6B;GAC1C,MAAM,QAAQ,MAAM,OAAO;AAC3B,OAAI,gBAAgB,EAAE;AACrB,UAAM,QAAQ;AACd,UAAM,WAAW;AACjB,UAAM,eAAe;;AAEtB,UAAO,EAAE,GAAG,OAAO;MAChB;AAIJ,UAAQ,SACP,KAAK,WACE,cACA,OACN,CACD;AACD,SAAO,mBAAmB,SAAY,OAAO,YAAY,MAAM,eAAe;IAE/E;EACC;EACA,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACnB,CACD,CAAC,MAAM,QAAQ,IAAI,EAAE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { i as settingMediaIds } from "./settings-WHr45II1.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/media/usage/site-settings.ts
|
|
4
|
+
/**
|
|
5
|
+
* Media references held by site settings.
|
|
6
|
+
*
|
|
7
|
+
* Usage reads parse these from the stored `site:*` options on every read, so
|
|
8
|
+
* a change through any writer of those options shows up on the next read.
|
|
9
|
+
*/
|
|
10
|
+
const MEDIA_USAGE_SITE_SETTINGS = [
|
|
11
|
+
"logo",
|
|
12
|
+
"favicon",
|
|
13
|
+
"seo.defaultOgImage"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* One setting per option, which holds while each option has a single path in
|
|
17
|
+
* `SETTING_MEDIA_REFERENCE_PATHS`. A second path needs a setting of its own.
|
|
18
|
+
*/
|
|
19
|
+
const SITE_SETTING_OPTIONS = [
|
|
20
|
+
["site:logo", "logo"],
|
|
21
|
+
["site:favicon", "favicon"],
|
|
22
|
+
["site:seo", "seo.defaultOgImage"]
|
|
23
|
+
];
|
|
24
|
+
const MEDIA_USAGE_SITE_SETTING_OPTIONS = SITE_SETTING_OPTIONS.map(([option]) => option);
|
|
25
|
+
/**
|
|
26
|
+
* Group the site settings that select each media item, in settings order.
|
|
27
|
+
*
|
|
28
|
+
* @param options Raw JSON option values keyed by option name.
|
|
29
|
+
*/
|
|
30
|
+
function groupSiteSettingMediaUsage(options) {
|
|
31
|
+
const usage = /* @__PURE__ */ new Map();
|
|
32
|
+
for (const [option, setting] of SITE_SETTING_OPTIONS) for (const mediaId of settingMediaIds(option, parseOption(options.get(option)))) {
|
|
33
|
+
const settings = usage.get(mediaId);
|
|
34
|
+
if (settings) settings.push(setting);
|
|
35
|
+
else usage.set(mediaId, [setting]);
|
|
36
|
+
}
|
|
37
|
+
return usage;
|
|
38
|
+
}
|
|
39
|
+
function parseOption(value) {
|
|
40
|
+
if (value == null) return void 0;
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(value);
|
|
43
|
+
} catch {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { MEDIA_USAGE_SITE_SETTING_OPTIONS as n, groupSiteSettingMediaUsage as r, MEDIA_USAGE_SITE_SETTINGS as t };
|
|
50
|
+
//# sourceMappingURL=site-settings-KJOqJW6W.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-settings-KJOqJW6W.mjs","names":[],"sources":["../src/media/usage/site-settings.ts"],"sourcesContent":["/**\n * Media references held by site settings.\n *\n * Usage reads parse these from the stored `site:*` options on every read, so\n * a change through any writer of those options shows up on the next read.\n */\n\nimport { settingMediaIds, type PortableSettingName } from \"../../transfer/format/settings.js\";\n\nexport const MEDIA_USAGE_SITE_SETTINGS = [\"logo\", \"favicon\", \"seo.defaultOgImage\"] as const;\n\nexport type MediaUsageSiteSetting = (typeof MEDIA_USAGE_SITE_SETTINGS)[number];\n\n/**\n * One setting per option, which holds while each option has a single path in\n * `SETTING_MEDIA_REFERENCE_PATHS`. A second path needs a setting of its own.\n */\nconst SITE_SETTING_OPTIONS = [\n\t[\"site:logo\", \"logo\"],\n\t[\"site:favicon\", \"favicon\"],\n\t[\"site:seo\", \"seo.defaultOgImage\"],\n] as const satisfies readonly (readonly [PortableSettingName, MediaUsageSiteSetting])[];\n\nexport const MEDIA_USAGE_SITE_SETTING_OPTIONS = SITE_SETTING_OPTIONS.map(([option]) => option);\n\n/**\n * Group the site settings that select each media item, in settings order.\n *\n * @param options Raw JSON option values keyed by option name.\n */\nexport function groupSiteSettingMediaUsage(\n\toptions: ReadonlyMap<string, string | null>,\n): Map<string, MediaUsageSiteSetting[]> {\n\tconst usage = new Map<string, MediaUsageSiteSetting[]>();\n\tfor (const [option, setting] of SITE_SETTING_OPTIONS) {\n\t\tfor (const mediaId of settingMediaIds(option, parseOption(options.get(option)))) {\n\t\t\tconst settings = usage.get(mediaId);\n\t\t\tif (settings) settings.push(setting);\n\t\t\telse usage.set(mediaId, [setting]);\n\t\t}\n\t}\n\treturn usage;\n}\n\nfunction parseOption(value: string | null | undefined): unknown {\n\tif (value == null) return undefined;\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"mappings":";;;;;;;;;AASA,MAAa,4BAA4B;CAAC;CAAQ;CAAW;CAAqB;;;;;AAQlF,MAAM,uBAAuB;CAC5B,CAAC,aAAa,OAAO;CACrB,CAAC,gBAAgB,UAAU;CAC3B,CAAC,YAAY,qBAAqB;CAClC;AAED,MAAa,mCAAmC,qBAAqB,KAAK,CAAC,YAAY,OAAO;;;;;;AAO9F,SAAgB,2BACf,SACuC;CACvC,MAAM,wBAAQ,IAAI,KAAsC;AACxD,MAAK,MAAM,CAAC,QAAQ,YAAY,qBAC/B,MAAK,MAAM,WAAW,gBAAgB,QAAQ,YAAY,QAAQ,IAAI,OAAO,CAAC,CAAC,EAAE;EAChF,MAAM,WAAW,MAAM,IAAI,QAAQ;AACnC,MAAI,SAAU,UAAS,KAAK,QAAQ;MAC/B,OAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;;AAGpC,QAAO;;AAGR,SAAS,YAAY,OAA2C;AAC/D,KAAI,SAAS,KAAM,QAAO;AAC1B,KAAI;AACH,SAAO,KAAK,MAAM,MAAM;SACjB;AACP"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as OptionsRepository } from "./options-DhrI7eMv.mjs";
|
|
2
|
+
import { t as getConfiguredOrigin } from "./public-url-B5a0QAh6.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/api/site-url.ts
|
|
5
|
+
async function getSiteBaseUrl(db, request, config) {
|
|
6
|
+
const configured = getConfiguredOrigin(config);
|
|
7
|
+
if (configured) return `${configured}/_emdash`;
|
|
8
|
+
const storedUrl = await new OptionsRepository(db).get("emdash:site_url");
|
|
9
|
+
if (storedUrl) return `${storedUrl}/_emdash`;
|
|
10
|
+
const url = new URL(request.url);
|
|
11
|
+
return `${url.protocol}//${url.host}/_emdash`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getSiteBaseUrl as t };
|
|
16
|
+
//# sourceMappingURL=site-url-Ceq_AUK0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-url-Ceq_AUK0.mjs","names":[],"sources":["../src/api/site-url.ts"],"sourcesContent":["/**\n * Resolve the canonical site base URL for use in outbound links (emails, etc.).\n *\n * Precedence mirrors `getPublicOrigin`: the operator-configured origin\n * (`config.siteUrl`, then the `EMDASH_SITE_URL`/`SITE_URL` env vars) wins,\n * then the stored `emdash:site_url` option (written once during setup on the\n * real domain), and only before setup completes does the request URL fill in.\n * A configured or stored value always beats the request, so Host header\n * spoofing cannot redirect users to attacker-controlled domains.\n */\n\nimport type { Kysely } from \"kysely\";\n\nimport { OptionsRepository } from \"../database/repositories/options.js\";\nimport type { Database } from \"../database/types.js\";\nimport { getConfiguredOrigin, type SiteUrlConfig } from \"./public-url.js\";\n\nexport async function getSiteBaseUrl(\n\tdb: Kysely<Database>,\n\trequest: Request,\n\tconfig?: SiteUrlConfig,\n): Promise<string> {\n\tconst configured = getConfiguredOrigin(config);\n\tif (configured) {\n\t\treturn `${configured}/_emdash`;\n\t}\n\tconst options = new OptionsRepository(db);\n\tconst storedUrl = await options.get<string>(\"emdash:site_url\");\n\tif (storedUrl) {\n\t\treturn `${storedUrl}/_emdash`;\n\t}\n\t// Fallback: derive from request (only reached before setup completes)\n\tconst url = new URL(request.url);\n\treturn `${url.protocol}//${url.host}/_emdash`;\n}\n"],"mappings":";;;;AAiBA,eAAsB,eACrB,IACA,SACA,QACkB;CAClB,MAAM,aAAa,oBAAoB,OAAO;AAC9C,KAAI,WACH,QAAO,GAAG,WAAW;CAGtB,MAAM,YAAY,MADF,IAAI,kBAAkB,GAAG,CACT,IAAY,kBAAkB;AAC9D,KAAI,UACH,QAAO,GAAG,UAAU;CAGrB,MAAM,MAAM,IAAI,IAAI,QAAQ,IAAI;AAChC,QAAO,GAAG,IAAI,SAAS,IAAI,IAAI,KAAK"}
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { m as listTablesLike, p as listTableColumns } from "./dialect-helpers-7_IqPdh9.mjs";
|
|
2
|
+
import { sql } from "kysely";
|
|
3
|
+
|
|
4
|
+
//#region src/api/handlers/snapshot.ts
|
|
5
|
+
/**
|
|
6
|
+
* Verify HMAC-SHA256 preview signature using crypto.subtle.
|
|
7
|
+
* Returns true if the signature is valid and not expired.
|
|
8
|
+
*/
|
|
9
|
+
async function verifyPreviewSignature(source, exp, sig, secret) {
|
|
10
|
+
if (exp < Date.now() / 1e3) return false;
|
|
11
|
+
const encoder = new TextEncoder();
|
|
12
|
+
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), {
|
|
13
|
+
name: "HMAC",
|
|
14
|
+
hash: "SHA-256"
|
|
15
|
+
}, false, ["verify"]);
|
|
16
|
+
const sigBytes = new Uint8Array(sig.length / 2);
|
|
17
|
+
for (let i = 0; i < sig.length; i += 2) sigBytes[i / 2] = parseInt(sig.substring(i, i + 2), 16);
|
|
18
|
+
return crypto.subtle.verify("HMAC", key, sigBytes, encoder.encode(`${source}:${exp}`));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parse an X-Preview-Signature header value into its components.
|
|
22
|
+
*
|
|
23
|
+
* Format: "source:exp:sig" where source is a URL (contains colons),
|
|
24
|
+
* exp is a unix timestamp, and sig is 64 hex chars.
|
|
25
|
+
*
|
|
26
|
+
* Parses from the right since source URLs contain colons.
|
|
27
|
+
*
|
|
28
|
+
* @returns Parsed components, or null if the format is invalid
|
|
29
|
+
*/
|
|
30
|
+
function parsePreviewSignatureHeader(header) {
|
|
31
|
+
const lastColon = header.lastIndexOf(":");
|
|
32
|
+
if (lastColon <= 0) return null;
|
|
33
|
+
const sig = header.substring(lastColon + 1);
|
|
34
|
+
if (sig.length !== 64) return null;
|
|
35
|
+
const rest = header.substring(0, lastColon);
|
|
36
|
+
const secondLastColon = rest.lastIndexOf(":");
|
|
37
|
+
if (secondLastColon <= 0) return null;
|
|
38
|
+
const source = rest.substring(0, secondLastColon);
|
|
39
|
+
const exp = parseInt(rest.substring(secondLastColon + 1), 10);
|
|
40
|
+
if (isNaN(exp) || source.length === 0) return null;
|
|
41
|
+
return {
|
|
42
|
+
source,
|
|
43
|
+
exp,
|
|
44
|
+
sig
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const MEDIA_FILE_PREFIX = "/_emdash/api/media/file/";
|
|
48
|
+
const MEDIA_FILE_SUFFIX = /[?#]/;
|
|
49
|
+
const EXTERNAL_OR_ROOT_URL = /^(?:[a-z][a-z0-9+.-]*:|\/)/i;
|
|
50
|
+
/**
|
|
51
|
+
* Parse a JSON string value and inject `src` for local media objects.
|
|
52
|
+
* Returns the original string if it's not a local media value.
|
|
53
|
+
*/
|
|
54
|
+
function injectMediaSrc(jsonStr, origin) {
|
|
55
|
+
try {
|
|
56
|
+
const obj = JSON.parse(jsonStr);
|
|
57
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) return jsonStr;
|
|
58
|
+
if (injectMediaSrcInto(obj, origin)) return JSON.stringify(obj);
|
|
59
|
+
return jsonStr;
|
|
60
|
+
} catch {
|
|
61
|
+
return jsonStr;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function isRecord(value) {
|
|
65
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Recursively walk an object and inject `src` into local media values.
|
|
69
|
+
* Returns true if any modifications were made.
|
|
70
|
+
*/
|
|
71
|
+
function injectMediaSrcInto(obj, origin) {
|
|
72
|
+
let modified = false;
|
|
73
|
+
if ((obj.provider === "local" || !obj.provider && obj.id && obj.meta) && !obj.src) {
|
|
74
|
+
const storageKey = (isRecord(obj.meta) ? obj.meta : void 0)?.storageKey ?? obj.id;
|
|
75
|
+
if (typeof storageKey === "string" && storageKey) {
|
|
76
|
+
obj.src = `${origin}${MEDIA_FILE_PREFIX}${storageKey}`;
|
|
77
|
+
modified = true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
for (const value of Object.values(obj)) if (Array.isArray(value)) {
|
|
81
|
+
for (const item of value) if (isRecord(item)) {
|
|
82
|
+
if (injectMediaSrcInto(item, origin)) modified = true;
|
|
83
|
+
}
|
|
84
|
+
} else if (isRecord(value)) {
|
|
85
|
+
if (injectMediaSrcInto(value, origin)) modified = true;
|
|
86
|
+
}
|
|
87
|
+
return modified;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Safe identifier pattern for snapshot table names.
|
|
91
|
+
* More permissive than validateIdentifier() — allows leading underscores
|
|
92
|
+
* (needed for system tables like _emdash_collections).
|
|
93
|
+
*/
|
|
94
|
+
const SAFE_TABLE_NAME = /^[a-z_][a-z0-9_]*$/;
|
|
95
|
+
/**
|
|
96
|
+
* System tables included in snapshots.
|
|
97
|
+
* Content tables (ec_*) are discovered dynamically.
|
|
98
|
+
*/
|
|
99
|
+
const SYSTEM_TABLES = [
|
|
100
|
+
"_emdash_block_types",
|
|
101
|
+
"_emdash_block_type_versions",
|
|
102
|
+
"_emdash_collections",
|
|
103
|
+
"_emdash_fields",
|
|
104
|
+
"_emdash_taxonomy_defs",
|
|
105
|
+
"_emdash_taxonomy_def_groups",
|
|
106
|
+
"_emdash_menus",
|
|
107
|
+
"_emdash_menu_items",
|
|
108
|
+
"_emdash_sections",
|
|
109
|
+
"_emdash_widget_areas",
|
|
110
|
+
"_emdash_widgets",
|
|
111
|
+
"_emdash_seo",
|
|
112
|
+
"_emdash_migrations",
|
|
113
|
+
"content_taxonomies",
|
|
114
|
+
"taxonomies",
|
|
115
|
+
"options",
|
|
116
|
+
"media",
|
|
117
|
+
"revisions"
|
|
118
|
+
];
|
|
119
|
+
/**
|
|
120
|
+
* Published snapshots are available to preview-signature callers, so every
|
|
121
|
+
* system table must be classified explicitly. Adding a snapshot table without
|
|
122
|
+
* choosing a policy is a type error rather than an accidental data export.
|
|
123
|
+
*/
|
|
124
|
+
const PUBLISHED_TABLE_POLICIES = {
|
|
125
|
+
_emdash_block_types: "full",
|
|
126
|
+
_emdash_block_type_versions: "full",
|
|
127
|
+
_emdash_collections: "full",
|
|
128
|
+
_emdash_fields: "full",
|
|
129
|
+
_emdash_taxonomy_defs: "full",
|
|
130
|
+
_emdash_taxonomy_def_groups: "full",
|
|
131
|
+
_emdash_menus: "full",
|
|
132
|
+
_emdash_menu_items: "content-linked",
|
|
133
|
+
_emdash_sections: "full",
|
|
134
|
+
_emdash_widget_areas: "full",
|
|
135
|
+
_emdash_widgets: "full",
|
|
136
|
+
_emdash_seo: "content-linked",
|
|
137
|
+
_emdash_migrations: "full",
|
|
138
|
+
content_taxonomies: "content-linked",
|
|
139
|
+
taxonomies: "content-linked",
|
|
140
|
+
options: "content-linked",
|
|
141
|
+
media: "content-linked",
|
|
142
|
+
revisions: "omit"
|
|
143
|
+
};
|
|
144
|
+
const SYSTEM_TABLE_SET = new Set(SYSTEM_TABLES);
|
|
145
|
+
function isSystemTable(tableName) {
|
|
146
|
+
return SYSTEM_TABLE_SET.has(tableName);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Table name prefixes excluded from snapshots (auth/security data).
|
|
150
|
+
*/
|
|
151
|
+
const EXCLUDED_PREFIXES = [
|
|
152
|
+
"_emdash_api_tokens",
|
|
153
|
+
"_emdash_oauth_tokens",
|
|
154
|
+
"_emdash_authorization_codes",
|
|
155
|
+
"_emdash_device_codes",
|
|
156
|
+
"_emdash_migrations_lock",
|
|
157
|
+
"_emdash_transfer_",
|
|
158
|
+
"_plugin_",
|
|
159
|
+
"users",
|
|
160
|
+
"sessions",
|
|
161
|
+
"credentials",
|
|
162
|
+
"challenges"
|
|
163
|
+
];
|
|
164
|
+
/**
|
|
165
|
+
* Options key prefixes safe for inclusion in snapshots.
|
|
166
|
+
*
|
|
167
|
+
* The options table contains plugin secrets (plugin:*), passkey challenges
|
|
168
|
+
* (emdash:passkey_pending:*), and setup state that must not leak to
|
|
169
|
+
* preview databases. Only site-level rendering settings are needed.
|
|
170
|
+
*/
|
|
171
|
+
const SAFE_OPTIONS_PREFIXES = ["site:"];
|
|
172
|
+
function isExcluded(tableName) {
|
|
173
|
+
return EXCLUDED_PREFIXES.some((prefix) => tableName.startsWith(prefix));
|
|
174
|
+
}
|
|
175
|
+
function normalizeColumnType(type) {
|
|
176
|
+
switch (type.toLowerCase()) {
|
|
177
|
+
case "smallint":
|
|
178
|
+
case "integer":
|
|
179
|
+
case "bigint":
|
|
180
|
+
case "boolean": return "INTEGER";
|
|
181
|
+
case "real":
|
|
182
|
+
case "double precision":
|
|
183
|
+
case "numeric":
|
|
184
|
+
case "decimal": return "REAL";
|
|
185
|
+
case "blob":
|
|
186
|
+
case "bytea": return "BLOB";
|
|
187
|
+
case "json":
|
|
188
|
+
case "jsonb": return "JSON";
|
|
189
|
+
default: return "TEXT";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function normalizeRows(rows, types) {
|
|
193
|
+
for (const row of rows) for (const [column, type] of Object.entries(types)) {
|
|
194
|
+
const value = row[column];
|
|
195
|
+
if (type === "JSON" && value !== null && value !== void 0 && typeof value !== "string") row[column] = JSON.stringify(value);
|
|
196
|
+
}
|
|
197
|
+
return rows;
|
|
198
|
+
}
|
|
199
|
+
function createPublishedProjection() {
|
|
200
|
+
return {
|
|
201
|
+
content: /* @__PURE__ */ new Map(),
|
|
202
|
+
taxonomyGroups: /* @__PURE__ */ new Set(),
|
|
203
|
+
mediaIds: /* @__PURE__ */ new Set(),
|
|
204
|
+
mediaStorageKeys: /* @__PURE__ */ new Set()
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function readString(value) {
|
|
208
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
209
|
+
}
|
|
210
|
+
function recordPublishedContent(projection, tableName, rows) {
|
|
211
|
+
const references = {
|
|
212
|
+
ids: /* @__PURE__ */ new Set(),
|
|
213
|
+
translationGroups: /* @__PURE__ */ new Set()
|
|
214
|
+
};
|
|
215
|
+
for (const row of rows) {
|
|
216
|
+
const id = readString(row.id);
|
|
217
|
+
const translationGroup = readString(row.translation_group);
|
|
218
|
+
if (id) references.ids.add(id);
|
|
219
|
+
if (translationGroup) references.translationGroups.add(translationGroup);
|
|
220
|
+
}
|
|
221
|
+
projection.content.set(tableName.slice(3), references);
|
|
222
|
+
}
|
|
223
|
+
function isPublishedContentReference(projection, collection, reference) {
|
|
224
|
+
const collectionName = readString(collection);
|
|
225
|
+
const id = readString(reference);
|
|
226
|
+
if (!collectionName || !id) return false;
|
|
227
|
+
const references = projection.content.get(collectionName);
|
|
228
|
+
return references?.ids.has(id) === true || references?.translationGroups.has(id) === true;
|
|
229
|
+
}
|
|
230
|
+
function collectMediaReferences(value, projection) {
|
|
231
|
+
if (typeof value === "string") {
|
|
232
|
+
if (value.startsWith(MEDIA_FILE_PREFIX)) {
|
|
233
|
+
const storageKey = value.slice(24).split(MEDIA_FILE_SUFFIX, 1)[0];
|
|
234
|
+
if (storageKey) projection.mediaStorageKeys.add(storageKey);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const trimmed = value.trimStart();
|
|
238
|
+
if (trimmed.startsWith("{") || trimmed.startsWith("[")) try {
|
|
239
|
+
collectMediaReferences(JSON.parse(value), projection);
|
|
240
|
+
} catch {}
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (Array.isArray(value)) {
|
|
244
|
+
for (const item of value) collectMediaReferences(item, projection);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (!isRecord(value)) return;
|
|
248
|
+
const mediaId = readString(value.mediaId);
|
|
249
|
+
if (mediaId) projection.mediaIds.add(mediaId);
|
|
250
|
+
const provider = readString(value.provider);
|
|
251
|
+
const meta = isRecord(value.meta) ? value.meta : null;
|
|
252
|
+
const localMediaId = readString(value.id);
|
|
253
|
+
if ((provider === "local" || !provider && meta) && localMediaId) projection.mediaIds.add(localMediaId);
|
|
254
|
+
const storageKey = readString(value.storageKey) ?? readString(meta?.storageKey);
|
|
255
|
+
if (storageKey) projection.mediaStorageKeys.add(storageKey);
|
|
256
|
+
const assetRef = readString((isRecord(value.asset) ? value.asset : null)?._ref);
|
|
257
|
+
if (assetRef) {
|
|
258
|
+
projection.mediaIds.add(assetRef);
|
|
259
|
+
projection.mediaStorageKeys.add(assetRef);
|
|
260
|
+
}
|
|
261
|
+
for (const child of Object.values(value)) collectMediaReferences(child, projection);
|
|
262
|
+
}
|
|
263
|
+
function projectTaxonomyRows(rows, projection) {
|
|
264
|
+
const includedGroups = new Set(projection.taxonomyGroups);
|
|
265
|
+
const includedIds = new Set(projection.taxonomyGroups);
|
|
266
|
+
let changed = true;
|
|
267
|
+
while (changed) {
|
|
268
|
+
changed = false;
|
|
269
|
+
for (const row of rows) {
|
|
270
|
+
const id = readString(row.id);
|
|
271
|
+
const group = readString(row.translation_group);
|
|
272
|
+
if (!id) continue;
|
|
273
|
+
if (includedIds.has(id) || group && includedGroups.has(group)) {
|
|
274
|
+
if (!includedIds.has(id)) {
|
|
275
|
+
includedIds.add(id);
|
|
276
|
+
changed = true;
|
|
277
|
+
}
|
|
278
|
+
if (group && !includedGroups.has(group)) {
|
|
279
|
+
includedGroups.add(group);
|
|
280
|
+
changed = true;
|
|
281
|
+
}
|
|
282
|
+
const parentId = readString(row.parent_id);
|
|
283
|
+
if (parentId && !includedIds.has(parentId)) {
|
|
284
|
+
includedIds.add(parentId);
|
|
285
|
+
changed = true;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return rows.filter((row) => {
|
|
291
|
+
const id = readString(row.id);
|
|
292
|
+
const group = readString(row.translation_group);
|
|
293
|
+
return id && includedIds.has(id) || group && includedGroups.has(group);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
function projectPublishedRows(tableName, rows, projection) {
|
|
297
|
+
switch (tableName) {
|
|
298
|
+
case "_emdash_seo": return rows.filter((row) => {
|
|
299
|
+
if (!isPublishedContentReference(projection, row.collection, row.content_id)) return false;
|
|
300
|
+
const image = readString(row.seo_image);
|
|
301
|
+
if (image) {
|
|
302
|
+
collectMediaReferences(image, projection);
|
|
303
|
+
if (!EXTERNAL_OR_ROOT_URL.test(image)) {
|
|
304
|
+
projection.mediaIds.add(image);
|
|
305
|
+
projection.mediaStorageKeys.add(image);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return true;
|
|
309
|
+
});
|
|
310
|
+
case "content_taxonomies": return rows.filter((row) => {
|
|
311
|
+
const published = isPublishedContentReference(projection, row.collection, row.entry_id);
|
|
312
|
+
const taxonomyGroup = readString(row.taxonomy_id);
|
|
313
|
+
if (published && taxonomyGroup) projection.taxonomyGroups.add(taxonomyGroup);
|
|
314
|
+
return published;
|
|
315
|
+
});
|
|
316
|
+
case "taxonomies": return projectTaxonomyRows(rows, projection);
|
|
317
|
+
case "_emdash_menu_items": return rows.filter((row) => {
|
|
318
|
+
const type = readString(row.type);
|
|
319
|
+
const referenceId = readString(row.reference_id);
|
|
320
|
+
if (!referenceId || type === "custom") return true;
|
|
321
|
+
if (type === "taxonomy") {
|
|
322
|
+
projection.taxonomyGroups.add(referenceId);
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
if (type === "collection" && !row.reference_id) return true;
|
|
326
|
+
return isPublishedContentReference(projection, readString(row.reference_collection) ?? (type === "post" || type === "page" ? `${type}s` : null), referenceId);
|
|
327
|
+
});
|
|
328
|
+
case "media": return rows.filter((row) => {
|
|
329
|
+
const id = readString(row.id);
|
|
330
|
+
const storageKey = readString(row.storage_key);
|
|
331
|
+
return id !== null && projection.mediaIds.has(id) || storageKey !== null && projection.mediaStorageKeys.has(storageKey);
|
|
332
|
+
});
|
|
333
|
+
case "options": return rows;
|
|
334
|
+
default: return [];
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Generate a portable database snapshot.
|
|
339
|
+
*
|
|
340
|
+
* Discovers ec_* content tables dynamically, exports system tables
|
|
341
|
+
* needed for rendering, and includes schema info for table recreation.
|
|
342
|
+
*/
|
|
343
|
+
async function generateSnapshot(db, options) {
|
|
344
|
+
const includeDrafts = options?.includeDrafts ?? false;
|
|
345
|
+
const includeTrashed = options?.includeTrashed ?? false;
|
|
346
|
+
const optionPrefixes = options?.optionPrefixes ?? SAFE_OPTIONS_PREFIXES;
|
|
347
|
+
const optionKeys = new Set(options?.optionKeys);
|
|
348
|
+
const publishedOnly = !includeDrafts && !includeTrashed;
|
|
349
|
+
const publishedProjection = createPublishedProjection();
|
|
350
|
+
const allTables = [...await listTablesLike(db, "ec_%"), ...SYSTEM_TABLES];
|
|
351
|
+
const tables = {};
|
|
352
|
+
const schema = {};
|
|
353
|
+
for (const tableName of allTables) {
|
|
354
|
+
if (isExcluded(tableName)) continue;
|
|
355
|
+
if (!SAFE_TABLE_NAME.test(tableName)) continue;
|
|
356
|
+
const columnInfo = await listTableColumns(db, tableName);
|
|
357
|
+
if (columnInfo.length === 0) continue;
|
|
358
|
+
const columns = columnInfo.map((column) => column.name);
|
|
359
|
+
const types = {};
|
|
360
|
+
for (const column of columnInfo) types[column.name] = normalizeColumnType(column.type);
|
|
361
|
+
schema[tableName] = {
|
|
362
|
+
columns,
|
|
363
|
+
types
|
|
364
|
+
};
|
|
365
|
+
let rows;
|
|
366
|
+
if (tableName.startsWith("ec_")) if (includeTrashed) rows = (await sql`
|
|
367
|
+
SELECT * FROM ${sql.ref(tableName)}
|
|
368
|
+
`.execute(db)).rows;
|
|
369
|
+
else if (includeDrafts) rows = (await sql`
|
|
370
|
+
SELECT * FROM ${sql.ref(tableName)}
|
|
371
|
+
WHERE deleted_at IS NULL
|
|
372
|
+
`.execute(db)).rows;
|
|
373
|
+
else rows = (await sql`
|
|
374
|
+
SELECT * FROM ${sql.ref(tableName)}
|
|
375
|
+
WHERE deleted_at IS NULL
|
|
376
|
+
AND status = 'published'
|
|
377
|
+
`.execute(db)).rows;
|
|
378
|
+
else if (publishedOnly && isSystemTable(tableName) && PUBLISHED_TABLE_POLICIES[tableName] === "omit") rows = [];
|
|
379
|
+
else if (tableName === "options") rows = (await sql`
|
|
380
|
+
SELECT * FROM ${sql.ref(tableName)}
|
|
381
|
+
`.execute(db)).rows.filter((row) => {
|
|
382
|
+
const name = typeof row.name === "string" ? row.name : "";
|
|
383
|
+
return optionKeys.has(name) || optionPrefixes.some((prefix) => name.startsWith(prefix));
|
|
384
|
+
});
|
|
385
|
+
else rows = (await sql`
|
|
386
|
+
SELECT * FROM ${sql.ref(tableName)}
|
|
387
|
+
`.execute(db)).rows;
|
|
388
|
+
if (publishedOnly) {
|
|
389
|
+
if (tableName.startsWith("ec_")) recordPublishedContent(publishedProjection, tableName, rows);
|
|
390
|
+
else if (isSystemTable(tableName) && PUBLISHED_TABLE_POLICIES[tableName] === "content-linked") rows = projectPublishedRows(tableName, rows, publishedProjection);
|
|
391
|
+
for (const row of rows) collectMediaReferences(row, publishedProjection);
|
|
392
|
+
}
|
|
393
|
+
if (rows.length > 0) tables[tableName] = normalizeRows(rows, types);
|
|
394
|
+
}
|
|
395
|
+
if (options?.origin) {
|
|
396
|
+
const origin = options.origin;
|
|
397
|
+
for (const [tableName, rows] of Object.entries(tables)) {
|
|
398
|
+
if (!tableName.startsWith("ec_")) continue;
|
|
399
|
+
for (const row of rows) for (const [col, value] of Object.entries(row)) {
|
|
400
|
+
if (typeof value !== "string" || !value.startsWith("{")) continue;
|
|
401
|
+
row[col] = injectMediaSrc(value, origin);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
tables,
|
|
407
|
+
schema,
|
|
408
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
//#endregion
|
|
413
|
+
export { parsePreviewSignatureHeader as n, verifyPreviewSignature as r, generateSnapshot as t };
|
|
414
|
+
//# sourceMappingURL=snapshot-Dzsn3NZa.mjs.map
|