emdash 0.33.0 → 0.35.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/{adapters-BMyNSSZi.d.mts → adapters-Bb1vG41D.d.mts} +33 -2
- package/dist/adapters-Bb1vG41D.d.mts.map +1 -0
- package/dist/{allowed-origins-CG1pACtS.mjs → allowed-origins-DW7sYyqg.mjs} +2 -2
- package/dist/{allowed-origins-CG1pACtS.mjs.map → allowed-origins-DW7sYyqg.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +22 -21
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +6 -5
- package/dist/{api-D2hunekQ.mjs → api-BeBglVxU.mjs} +98 -407
- package/dist/api-BeBglVxU.mjs.map +1 -0
- package/dist/{api-tokens-CSND0i1z.mjs → api-tokens-KO24G1Fd.mjs} +2 -2
- package/dist/{api-tokens-CSND0i1z.mjs.map → api-tokens-KO24G1Fd.mjs.map} +1 -1
- package/dist/{apply-kwNEJW2l.mjs → apply-kUDt80-G.mjs} +131 -107
- package/dist/apply-kUDt80-G.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +163 -49
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/media-usage-write-fence.d.mts +7 -0
- package/dist/astro/middleware/media-usage-write-fence.d.mts.map +1 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs +35 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs.map +1 -0
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +10 -7
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -11
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +1763 -173
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +9 -8
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +9 -8
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +12 -11
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +12 -11
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +12 -11
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/index.mjs +17 -17
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +14 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -11
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -11
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +36 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +36 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +15 -14
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +37 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +37 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +51 -43
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +51 -43
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +50 -42
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +50 -42
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +50 -42
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +50 -42
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +51 -43
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +51 -43
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +47 -42
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +47 -42
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +4 -4
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +47 -42
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +9 -8
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +4 -4
- package/dist/astro/routes/api/admin/users/index.mjs +9 -8
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -9
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/complete.mjs +13 -12
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +10 -9
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +12 -11
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/logout.mjs +4 -4
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -11
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +4 -4
- package/dist/astro/routes/api/auth/me.mjs +10 -9
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +9 -8
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/options.mjs +14 -13
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +12 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +13 -12
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +13 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +13 -12
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -11
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +15 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +14 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +44 -31
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/index.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +10 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +10 -8
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- package/dist/astro/routes/api/dev/emails.mjs +4 -4
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +18 -16
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -5
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +14 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +13 -12
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +14 -14
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +18 -16
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +28 -27
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.d.mts.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +174 -72
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +13 -11
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +17 -16
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +16 -15
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -4
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -4
- package/dist/astro/routes/api/media/providers/index.mjs +4 -4
- package/dist/astro/routes/api/media/upload-url.mjs +11 -10
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +18 -15
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/translations.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_.mjs +11 -11
- package/dist/astro/routes/api/menus/index.mjs +11 -11
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/code.mjs +10 -10
- package/dist/astro/routes/api/oauth/device/token.mjs +9 -9
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -7
- package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -7
- package/dist/astro/routes/api/oauth/token.mjs +7 -7
- package/dist/astro/routes/api/openapi.json.mjs +152 -6
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +8 -7
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -11
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -11
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +13 -12
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +13 -12
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +18 -17
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +13 -12
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +18 -17
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +5 -5
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +47 -42
- 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 +47 -42
- 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 +47 -42
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +47 -42
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +47 -42
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +47 -42
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +10 -9
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +47 -42
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +47 -42
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +13 -13
- package/dist/astro/routes/api/search/index.mjs +12 -12
- package/dist/astro/routes/api/search/rebuild.mjs +13 -13
- package/dist/astro/routes/api/search/stats.mjs +8 -8
- package/dist/astro/routes/api/search/suggest.mjs +12 -12
- package/dist/astro/routes/api/sections/_slug_.mjs +12 -11
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +12 -11
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +14 -13
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +14 -13
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +13 -12
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +30 -31
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/index.mjs +31 -35
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +5 -5
- package/dist/astro/routes/api/snapshot.mjs +8 -8
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +18 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +46 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts +19 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs +88 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- package/dist/astro/routes/api/typegen.mjs +6 -6
- package/dist/astro/routes/api/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 +10 -9
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +12 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +12 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +7 -6
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +12 -11
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +4 -4
- package/dist/astro/routes/robots.txt.mjs +7 -6
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -10
- package/dist/astro/routes/sitemap.xml.mjs +8 -7
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +35 -17
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-qRhWQnel.mjs → authorize-DUElxgOQ.mjs} +2 -2
- package/dist/{authorize-qRhWQnel.mjs.map → authorize-DUElxgOQ.mjs.map} +1 -1
- package/dist/{backup-CtA6LDNw.mjs → backup-DWYpJlLj.mjs} +4 -4
- package/dist/{backup-CtA6LDNw.mjs.map → backup-DWYpJlLj.mjs.map} +1 -1
- package/dist/{base64-B-PsqheR.mjs → base64-CvLhUKQv.mjs} +1 -1
- package/dist/{base64-B-PsqheR.mjs.map → base64-CvLhUKQv.mjs.map} +1 -1
- package/dist/bundle-vn56sLos.mjs +663 -0
- package/dist/bundle-vn56sLos.mjs.map +1 -0
- package/dist/{byline-fields-CNc0Yq5i.mjs → byline-fields-txaLGoME.mjs} +2 -2
- package/dist/{byline-fields-CNc0Yq5i.mjs.map → byline-fields-txaLGoME.mjs.map} +1 -1
- package/dist/{byline-registry-ZkPKqEwC.mjs → byline-registry-DDun8sxh.mjs} +2 -2
- package/dist/{byline-registry-ZkPKqEwC.mjs.map → byline-registry-DDun8sxh.mjs.map} +1 -1
- package/dist/{byline-Cp6csL84.mjs → byline-yjvWq4ip.mjs} +5 -5
- package/dist/{byline-Cp6csL84.mjs.map → byline-yjvWq4ip.mjs.map} +1 -1
- package/dist/{bylines-cf-C9lmF.mjs → bylines-Bu7pchQ4.mjs} +5 -5
- package/dist/{bylines-cf-C9lmF.mjs.map → bylines-Bu7pchQ4.mjs.map} +1 -1
- package/dist/{bylines-CEj5CdT4.mjs → bylines-DjXS5p0P.mjs} +7 -7
- package/dist/{bylines-CEj5CdT4.mjs.map → bylines-DjXS5p0P.mjs.map} +1 -1
- package/dist/{cache-C9FptTFR.mjs → cache-C46-3Irl.mjs} +3 -3
- package/dist/{cache-C9FptTFR.mjs.map → cache-C46-3Irl.mjs.map} +1 -1
- package/dist/{challenge-store-D9VNKELo.mjs → challenge-store-SIL5DsF2.mjs} +1 -1
- package/dist/{challenge-store-D9VNKELo.mjs.map → challenge-store-SIL5DsF2.mjs.map} +1 -1
- package/dist/{chunks-DbYzib_k.mjs → chunks-fiZ8G9RJ.mjs} +2 -2
- package/dist/{chunks-DbYzib_k.mjs.map → chunks-fiZ8G9RJ.mjs.map} +1 -1
- package/dist/cli/index.mjs +655 -677
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +74 -4
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +25 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-deletion-DQPvMD8R.mjs +779 -0
- package/dist/collection-deletion-DQPvMD8R.mjs.map +1 -0
- package/dist/{comment-BIkJ6Fil.mjs → comment-Dxlep6cE.mjs} +2 -2
- package/dist/{comment-BIkJ6Fil.mjs.map → comment-Dxlep6cE.mjs.map} +1 -1
- package/dist/{comment-reaction-D-laEceb.mjs → comment-reaction-D-2J84UE.mjs} +2 -2
- package/dist/{comment-reaction-D-laEceb.mjs.map → comment-reaction-D-2J84UE.mjs.map} +1 -1
- package/dist/{comments-0_w6KChA.mjs → comments-CTfZtLmM.mjs} +3 -3
- package/dist/{comments-0_w6KChA.mjs.map → comments-CTfZtLmM.mjs.map} +1 -1
- package/dist/{components-BPxrRjpE.mjs → components-CQy3lh9x.mjs} +1 -1
- package/dist/{components-BPxrRjpE.mjs.map → components-CQy3lh9x.mjs.map} +1 -1
- package/dist/{config-DyF3OKg_.mjs → config-C3EBstHi.mjs} +18 -2
- package/dist/config-C3EBstHi.mjs.map +1 -0
- package/dist/config-COQzTe5Q.d.mts +34 -0
- package/dist/config-COQzTe5Q.d.mts.map +1 -0
- package/dist/{content-CJ94NEx5.mjs → content-ZHCc1ngN.mjs} +509 -78
- package/dist/content-ZHCc1ngN.mjs.map +1 -0
- package/dist/content-list-query-wJ2WN8Vp.d.mts +26 -0
- package/dist/content-list-query-wJ2WN8Vp.d.mts.map +1 -0
- package/dist/content-refresh-B_8SJzuU.mjs +2560 -0
- package/dist/content-refresh-B_8SJzuU.mjs.map +1 -0
- package/dist/{context-C_1nrqnW.mjs → context-ZldbZcle.mjs} +25 -17
- package/dist/context-ZldbZcle.mjs.map +1 -0
- package/dist/{cron-DRV-UC4K.mjs → cron-Y9aLtgrA.mjs} +1 -1
- package/dist/{cron-DRV-UC4K.mjs.map → cron-Y9aLtgrA.mjs.map} +1 -1
- package/dist/{dashboard-DINnNVVU.mjs → dashboard-DvHbk_cv.mjs} +44 -10
- package/dist/dashboard-DvHbk_cv.mjs.map +1 -0
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.mjs +31 -8
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +11 -0
- package/dist/db/libsql-migrations.d.mts.map +1 -0
- package/dist/db/libsql-migrations.mjs +57 -0
- package/dist/db/libsql-migrations.mjs.map +1 -0
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +10 -0
- package/dist/db/postgres-migrations.d.mts.map +1 -0
- package/dist/db/postgres-migrations.mjs +47 -0
- package/dist/db/postgres-migrations.mjs.map +1 -0
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +10 -0
- package/dist/db/sqlite-migrations.d.mts.map +1 -0
- package/dist/db/sqlite-migrations.mjs +28 -0
- package/dist/db/sqlite-migrations.mjs.map +1 -0
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-CcWLaRiR.mjs → db-errors-Cl-sKYTm.mjs} +1 -1
- package/dist/{db-errors-CcWLaRiR.mjs.map → db-errors-Cl-sKYTm.mjs.map} +1 -1
- package/dist/{default-BD2FG0xV.mjs → default-DdDl3fxv.mjs} +1 -1
- package/dist/{default-BD2FG0xV.mjs.map → default-DdDl3fxv.mjs.map} +1 -1
- package/dist/{deferred-tasks-C-WRCcKo.d.mts → deferred-tasks-SDWxrgzJ.d.mts} +1 -1
- package/dist/{deferred-tasks-C-WRCcKo.d.mts.map → deferred-tasks-SDWxrgzJ.d.mts.map} +1 -1
- package/dist/{device-flow-CTqd8mud.mjs → device-flow-C0GdD_z8.mjs} +4 -4
- package/dist/{device-flow-CTqd8mud.mjs.map → device-flow-C0GdD_z8.mjs.map} +1 -1
- package/dist/direct-executor-CDXeJCSs.mjs +85 -0
- package/dist/direct-executor-CDXeJCSs.mjs.map +1 -0
- package/dist/dist-D_6CKR8z.mjs +810 -0
- package/dist/dist-D_6CKR8z.mjs.map +1 -0
- package/dist/{email-console-C6WdcWbL.mjs → email-console-BHNjIwiB.mjs} +1 -1
- package/dist/{email-console-C6WdcWbL.mjs.map → email-console-BHNjIwiB.mjs.map} +1 -1
- package/dist/{enrich-CFJJgxs_.mjs → enrich-_ySMEvEE.mjs} +2 -2
- package/dist/{enrich-CFJJgxs_.mjs.map → enrich-_ySMEvEE.mjs.map} +1 -1
- package/dist/{error-oh_9i6bR.mjs → error-DupyJZE2.mjs} +3 -3
- package/dist/{error-oh_9i6bR.mjs.map → error-DupyJZE2.mjs.map} +1 -1
- package/dist/{errors-BucQ8VYz.mjs → errors-CLUPm7aD.mjs} +14 -2
- package/dist/errors-CLUPm7aD.mjs.map +1 -0
- package/dist/{escape-CXps5F_v.mjs → escape-DUY2r2Zs.mjs} +1 -1
- package/dist/{escape-CXps5F_v.mjs.map → escape-DUY2r2Zs.mjs.map} +1 -1
- package/dist/{field-defs-cache-WD82dMQq.mjs → field-defs-cache-BzwBlJrR.mjs} +4 -4
- package/dist/{field-defs-cache-WD82dMQq.mjs.map → field-defs-cache-BzwBlJrR.mjs.map} +1 -1
- package/dist/{fts-manager-BITakW_R.mjs → fts-manager-DyZEohZC.mjs} +76 -50
- package/dist/fts-manager-DyZEohZC.mjs.map +1 -0
- package/dist/{hreflang-BdZuVBhL.mjs → hreflang-BBe83kKa.mjs} +7 -7
- package/dist/{hreflang-BdZuVBhL.mjs.map → hreflang-BBe83kKa.mjs.map} +1 -1
- package/dist/{hreflang-BaLCNcDx.d.mts → hreflang-DwT2E0Sa.d.mts} +2 -2
- package/dist/{hreflang-BaLCNcDx.d.mts.map → hreflang-DwT2E0Sa.d.mts.map} +1 -1
- package/dist/identity-Ys6Dlc9C.mjs +35 -0
- package/dist/identity-Ys6Dlc9C.mjs.map +1 -0
- package/dist/{import-C-9uqyT3.mjs → import-DPkLmeXO.mjs} +5 -5
- package/dist/{import-C-9uqyT3.mjs.map → import-DPkLmeXO.mjs.map} +1 -1
- package/dist/{index-M37iz29I.d.mts → index-BVBZj4-7.d.mts} +236 -104
- package/dist/index-BVBZj4-7.d.mts.map +1 -0
- package/dist/{index-MGw47uWq.d.mts → index-C9KuQyO-.d.mts} +5 -10
- package/dist/index-C9KuQyO-.d.mts.map +1 -0
- package/dist/index.d.mts +21 -19
- package/dist/index.mjs +73 -67
- package/dist/{init-lock-DJkX6Hto.mjs → init-lock-6b309ZrF.mjs} +1 -1
- package/dist/{init-lock-DJkX6Hto.mjs.map → init-lock-6b309ZrF.mjs.map} +1 -1
- package/dist/{load-DV1DZuUJ.mjs → load-YJ2xl3ra.mjs} +2 -2
- package/dist/{load-DV1DZuUJ.mjs.map → load-YJ2xl3ra.mjs.map} +1 -1
- package/dist/{loader-CGugY7Zl.mjs → loader-CdG_Ci3H.mjs} +95 -53
- package/dist/loader-CdG_Ci3H.mjs.map +1 -0
- package/dist/manifest-builder-B252yQUf.mjs +189 -0
- package/dist/manifest-builder-B252yQUf.mjs.map +1 -0
- package/dist/{manifest-schema-Da7kj23y.mjs → manifest-schema-BXbUAHod.mjs} +1 -1
- package/dist/{manifest-schema-Da7kj23y.mjs.map → manifest-schema-BXbUAHod.mjs.map} +1 -1
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +3 -2
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +6 -5
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-OhYL-7Io.mjs → media-BWWWb8kg.mjs} +92 -3
- package/dist/media-BWWWb8kg.mjs.map +1 -0
- package/dist/{media-BP7S-nHT.mjs → media-CzhAn2--.mjs} +2 -2
- package/dist/{media-BP7S-nHT.mjs.map → media-CzhAn2--.mjs.map} +1 -1
- package/dist/{media-allowlist-D-peH1H5.mjs → media-allowlist-D6x-Us02.mjs} +14 -3
- package/dist/media-allowlist-D6x-Us02.mjs.map +1 -0
- package/dist/{media-upload-DtrwU2B0.mjs → media-upload-CHBVn6m-.mjs} +10 -8
- package/dist/{media-upload-DtrwU2B0.mjs.map → media-upload-CHBVn6m-.mjs.map} +1 -1
- package/dist/{media-url-DYs_YLOx.mjs → media-url-BvoX88FA.mjs} +1 -1
- package/dist/{media-url-DYs_YLOx.mjs.map → media-url-BvoX88FA.mjs.map} +1 -1
- package/dist/{media-usage-BlxfTkN0.mjs → media-usage-BZCydfvu.mjs} +137 -60
- package/dist/media-usage-BZCydfvu.mjs.map +1 -0
- package/dist/media-usage-work-CLo_6tct.mjs +152 -0
- package/dist/media-usage-work-CLo_6tct.mjs.map +1 -0
- package/dist/media-usage-work-DrCbqBcl.mjs +424 -0
- package/dist/media-usage-work-DrCbqBcl.mjs.map +1 -0
- package/dist/media-usage-write-fence-aHEgN1zB.mjs +42 -0
- package/dist/media-usage-write-fence-aHEgN1zB.mjs.map +1 -0
- package/dist/{menus-Y54RDPIN.mjs → menus-DSo5QeW0.mjs} +351 -95
- package/dist/menus-DSo5QeW0.mjs.map +1 -0
- package/dist/{menus-BcQWxeXu.mjs → menus-TCNSd2vp.mjs} +3 -3
- package/dist/{menus-BcQWxeXu.mjs.map → menus-TCNSd2vp.mjs.map} +1 -1
- package/dist/migrations/index.d.mts +22 -0
- package/dist/migrations/index.d.mts.map +1 -0
- package/dist/migrations/index.mjs +7 -0
- package/dist/{mode-BWyTBe3I.mjs → mode-BDoH_WcF.mjs} +1 -1
- package/dist/{mode-BWyTBe3I.mjs.map → mode-BDoH_WcF.mjs.map} +1 -1
- package/dist/{normalize-C-SHXmra.mjs → normalize-Bc-s_r-a.mjs} +1 -1
- package/dist/{normalize-C-SHXmra.mjs.map → normalize-Bc-s_r-a.mjs.map} +1 -1
- package/dist/{oauth-authorization-ClvktmrL.mjs → oauth-authorization-iOikmrJd.mjs} +4 -4
- package/dist/{oauth-authorization-ClvktmrL.mjs.map → oauth-authorization-iOikmrJd.mjs.map} +1 -1
- package/dist/{oauth-clients-8ao-U66l.mjs → oauth-clients-CvI0nHMJ.mjs} +1 -1
- package/dist/{oauth-clients-8ao-U66l.mjs.map → oauth-clients-CvI0nHMJ.mjs.map} +1 -1
- package/dist/{oauth-state-store-B1ofdTiQ.mjs → oauth-state-store-Ba8KZlwW.mjs} +1 -1
- package/dist/{oauth-state-store-B1ofdTiQ.mjs.map → oauth-state-store-Ba8KZlwW.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-CscEuIiR.mjs → oauth-user-lookup-C5SQwGYC.mjs} +1 -1
- package/dist/{oauth-user-lookup-CscEuIiR.mjs.map → oauth-user-lookup-C5SQwGYC.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{options-CA4eVX6P.d.mts → options--hhz-jZ1.d.mts} +4 -3
- package/dist/options--hhz-jZ1.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-CJKNuewM.mjs → parse-DFbuc-Fh.mjs} +2 -2
- package/dist/{parse-CJKNuewM.mjs.map → parse-DFbuc-Fh.mjs.map} +1 -1
- package/dist/{passkey-config-D-zrzMJI.mjs → passkey-config-DFAmUyuE.mjs} +1 -1
- package/dist/{passkey-config-D-zrzMJI.mjs.map → passkey-config-DFAmUyuE.mjs.map} +1 -1
- package/dist/{placeholder-DaeNS-VG.d.mts → placeholder-Dp0K3RkD.d.mts} +1 -1
- package/dist/{placeholder-DaeNS-VG.d.mts.map → placeholder-Dp0K3RkD.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +8 -1
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +7 -4
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/policy-TluUIxuu.mjs +45 -0
- package/dist/policy-TluUIxuu.mjs.map +1 -0
- package/dist/{portable-text-B_kqBmXB.mjs → portable-text-imBW5cHK.mjs} +1 -1
- package/dist/{portable-text-B_kqBmXB.mjs.map → portable-text-imBW5cHK.mjs.map} +1 -1
- package/dist/{preview-BU6PaLpM.mjs → preview-PW-nOnq4.mjs} +2 -2
- package/dist/{preview-BU6PaLpM.mjs.map → preview-PW-nOnq4.mjs.map} +1 -1
- package/dist/protocol-DjsJHTlK.d.mts +52 -0
- package/dist/protocol-DjsJHTlK.d.mts.map +1 -0
- package/dist/{public-url-Ox9oOlgp.mjs → public-url-CWoFhQT8.mjs} +1 -1
- package/dist/{public-url-Ox9oOlgp.mjs.map → public-url-CWoFhQT8.mjs.map} +1 -1
- package/dist/{query-rC9HKv1N.mjs → query-BWs7O5Il.mjs} +3 -3
- package/dist/{query-rC9HKv1N.mjs.map → query-BWs7O5Il.mjs.map} +1 -1
- package/dist/{query-C5w7PsRQ.mjs → query-zTVAR1Sl.mjs} +31 -49
- package/dist/query-zTVAR1Sl.mjs.map +1 -0
- package/dist/{rate-limit-kug6q99V.mjs → rate-limit-Bx4g9m3p.mjs} +2 -2
- package/dist/{rate-limit-kug6q99V.mjs.map → rate-limit-Bx4g9m3p.mjs.map} +1 -1
- package/dist/{redirect-Egf2R9yP.mjs → redirect-BgAOGHDq.mjs} +1 -1
- package/dist/{redirect-Egf2R9yP.mjs.map → redirect-BgAOGHDq.mjs.map} +1 -1
- package/dist/{redirect-DIJxXKOG.mjs → redirect-COsS6SWJ.mjs} +2 -2
- package/dist/{redirect-DIJxXKOG.mjs.map → redirect-COsS6SWJ.mjs.map} +1 -1
- package/dist/{redirects-G8wAhWAf.mjs → redirects-DTDHWH31.mjs} +133 -14
- package/dist/redirects-DTDHWH31.mjs.map +1 -0
- package/dist/{redirects-Bzm812bY.mjs → redirects-DyChwDkG.mjs} +4 -4
- package/dist/{redirects-Bzm812bY.mjs.map → redirects-DyChwDkG.mjs.map} +1 -1
- package/dist/registry-Cqa2I749.mjs +1275 -0
- package/dist/registry-Cqa2I749.mjs.map +1 -0
- package/dist/{relation-Cbe3Sd3m.mjs → relation-BnHB0T4J.mjs} +3 -3
- package/dist/{relation-Cbe3Sd3m.mjs.map → relation-BnHB0T4J.mjs.map} +1 -1
- package/dist/{relations-Bw_E1TXo.mjs → relations-BBApI4e2.mjs} +3 -3
- package/dist/{relations-Bw_E1TXo.mjs.map → relations-BBApI4e2.mjs.map} +1 -1
- package/dist/{relations-G2ta7GIl.d.mts → relations-BHo5A8Zf.d.mts} +367 -33
- package/dist/relations-BHo5A8Zf.d.mts.map +1 -0
- package/dist/{relations-qHwpUe66.mjs → relations-D5sM5fW0.mjs} +6 -6
- package/dist/{relations-qHwpUe66.mjs.map → relations-D5sM5fW0.mjs.map} +1 -1
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-Df-jFbAd.mjs → request-meta-DgZJh3zG.mjs} +2 -2
- package/dist/{request-meta-Df-jFbAd.mjs.map → request-meta-DgZJh3zG.mjs.map} +1 -1
- package/dist/{resolve-DZzG4HqM.mjs → resolve-DOhVEvty.mjs} +2 -2
- package/dist/{resolve-DZzG4HqM.mjs.map → resolve-DOhVEvty.mjs.map} +1 -1
- package/dist/{runner-BaADli8l.d.mts → runner-BYHZn3Jy.d.mts} +16 -3
- package/dist/runner-BYHZn3Jy.d.mts.map +1 -0
- package/dist/{runner-BFTrkYhu.mjs → runner-C1T11CfC.mjs} +1190 -257
- package/dist/runner-C1T11CfC.mjs.map +1 -0
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +4 -3
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema-2AOsSn2v.mjs +390 -0
- package/dist/schema-2AOsSn2v.mjs.map +1 -0
- package/dist/{schema-CiQXr6_F.mjs → schema-DZ5YVVZj.mjs} +3 -3
- package/dist/{schema-CiQXr6_F.mjs.map → schema-DZ5YVVZj.mjs.map} +1 -1
- package/dist/{scopes-CNJVT5i5.mjs → scopes-8ClPF2bC.mjs} +3 -3
- package/dist/{scopes-CNJVT5i5.mjs.map → scopes-8ClPF2bC.mjs.map} +1 -1
- package/dist/{search-FZhx5dDU.mjs → search-u1QYdOCG.mjs} +25 -15
- package/dist/search-u1QYdOCG.mjs.map +1 -0
- package/dist/{secrets-DLd8RXee.mjs → secrets-BEgsAQEU.mjs} +3 -3
- package/dist/{secrets-DLd8RXee.mjs.map → secrets-BEgsAQEU.mjs.map} +1 -1
- package/dist/{sections-BrIrMUCn.mjs → sections-DmHviGyM.mjs} +3 -3
- package/dist/{sections-BrIrMUCn.mjs.map → sections-DmHviGyM.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -22
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +16 -15
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-CobNfOvb.mjs → seo-AFpVvTqr.mjs} +5 -3
- package/dist/seo-AFpVvTqr.mjs.map +1 -0
- package/dist/{seo-DTHRntNC.mjs → seo-Dq4G-RrO.mjs} +2 -2
- package/dist/{seo-DTHRntNC.mjs.map → seo-Dq4G-RrO.mjs.map} +1 -1
- package/dist/{service-B-pYGPgR.mjs → service-BpArayPr.mjs} +3 -3
- package/dist/{service-B-pYGPgR.mjs.map → service-BpArayPr.mjs.map} +1 -1
- package/dist/{session-user-BvM9-zNl.mjs → session-user-BEorKVT-.mjs} +1 -1
- package/dist/{session-user-BvM9-zNl.mjs.map → session-user-BEorKVT-.mjs.map} +1 -1
- package/dist/{settings-DPHau-WH.mjs → settings-DE9xtzqd.mjs} +3 -3
- package/dist/{settings-DPHau-WH.mjs.map → settings-DE9xtzqd.mjs.map} +1 -1
- package/dist/{settings-kJhGiQ4z.mjs → settings-xRdoUZr0.mjs} +4 -4
- package/dist/{settings-kJhGiQ4z.mjs.map → settings-xRdoUZr0.mjs.map} +1 -1
- package/dist/{setup-complete-u50Qm8rY.mjs → setup-complete-BnT8pq_C.mjs} +1 -1
- package/dist/{setup-complete-u50Qm8rY.mjs.map → setup-complete-BnT8pq_C.mjs.map} +1 -1
- package/dist/{setup-nonce-DCjiiOD2.mjs → setup-nonce-CBitf_oQ.mjs} +1 -1
- package/dist/{setup-nonce-DCjiiOD2.mjs.map → setup-nonce-CBitf_oQ.mjs.map} +1 -1
- package/dist/{single-flight-cache-DW3w11Pu.mjs → single-flight-cache-B0eLKS6K.mjs} +2 -2
- package/dist/{single-flight-cache-DW3w11Pu.mjs.map → single-flight-cache-B0eLKS6K.mjs.map} +1 -1
- package/dist/{site-url-I-lJ5kma.mjs → site-url-DjpIXMXJ.mjs} +2 -2
- package/dist/{site-url-I-lJ5kma.mjs.map → site-url-DjpIXMXJ.mjs.map} +1 -1
- package/dist/slugify-B994zkXC.mjs +17 -0
- package/dist/slugify-B994zkXC.mjs.map +1 -0
- package/dist/{snapshot-I_fjLDaD.mjs → snapshot-BBlGkb2q.mjs} +1 -1
- package/dist/{snapshot-I_fjLDaD.mjs.map → snapshot-BBlGkb2q.mjs.map} +1 -1
- package/dist/{ssrf-CTa6v21i.mjs → ssrf-Cpvg_n3A.mjs} +1 -1
- package/dist/{ssrf-CTa6v21i.mjs.map → ssrf-Cpvg_n3A.mjs.map} +1 -1
- package/dist/{state-CQvoefYP.mjs → state-DYwPue40.mjs} +1 -1
- package/dist/{state-CQvoefYP.mjs.map → state-DYwPue40.mjs.map} +1 -1
- package/dist/{status-CIsmlC1E.mjs → status-CWVYpbD8.mjs} +1 -1
- package/dist/{status-CIsmlC1E.mjs.map → status-CWVYpbD8.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +3 -3
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/target-DixqqV5i.mjs +27 -0
- package/dist/target-DixqqV5i.mjs.map +1 -0
- package/dist/{taxonomies-CLN1N92E.mjs → taxonomies-BlrncHi9.mjs} +75 -64
- package/dist/taxonomies-BlrncHi9.mjs.map +1 -0
- package/dist/{taxonomies-CKuaZER5.mjs → taxonomies-OHUIiIpI.mjs} +280 -56
- package/dist/taxonomies-OHUIiIpI.mjs.map +1 -0
- package/dist/{taxonomy-pOrB2kZe.mjs → taxonomy-BqCZ1TdU.mjs} +131 -78
- package/dist/taxonomy-BqCZ1TdU.mjs.map +1 -0
- package/dist/{tokens-DagaJGK8.mjs → tokens-C39klX8R.mjs} +2 -2
- package/dist/{tokens-DagaJGK8.mjs.map → tokens-C39klX8R.mjs.map} +1 -1
- package/dist/{transport-DVsa5YYo.mjs → transport-DBJwa-Si.mjs} +1 -1
- package/dist/{transport-DVsa5YYo.mjs.map → transport-DBJwa-Si.mjs.map} +1 -1
- package/dist/{transport-CAwTaTp_.d.mts → transport-RQE36APG.d.mts} +1 -1
- package/dist/{transport-CAwTaTp_.d.mts.map → transport-RQE36APG.d.mts.map} +1 -1
- package/dist/{trusted-proxy-D20_7fyX.mjs → trusted-proxy-CEVekpby.mjs} +1 -1
- package/dist/{trusted-proxy-D20_7fyX.mjs.map → trusted-proxy-CEVekpby.mjs.map} +1 -1
- package/dist/{types-NBI3rF-_.mjs → types-75KIqzL9.mjs} +18 -2
- package/dist/types-75KIqzL9.mjs.map +1 -0
- package/dist/{types-BjxTKxrZ.mjs → types-BW1syrlw.mjs} +1 -1
- package/dist/{types-BjxTKxrZ.mjs.map → types-BW1syrlw.mjs.map} +1 -1
- package/dist/{types-DLG4IFEQ.d.mts → types-BcqdcT-r.d.mts} +1 -1
- package/dist/{types-DLG4IFEQ.d.mts.map → types-BcqdcT-r.d.mts.map} +1 -1
- package/dist/{types-LoagAGzH.d.mts → types-BntycPTF.d.mts} +1 -1
- package/dist/{types-LoagAGzH.d.mts.map → types-BntycPTF.d.mts.map} +1 -1
- package/dist/{types-BnFP1M3J.d.mts → types-C2pMvO62.d.mts} +32 -10
- package/dist/types-C2pMvO62.d.mts.map +1 -0
- package/dist/{types-Cd8iuS1J.mjs → types-CQPWhPxE.mjs} +9 -12
- package/dist/types-CQPWhPxE.mjs.map +1 -0
- package/dist/{types-C8oz_ayJ.d.mts → types-CXnOzDe1.d.mts} +1 -1
- package/dist/{types-C8oz_ayJ.d.mts.map → types-CXnOzDe1.d.mts.map} +1 -1
- package/dist/types-CtzytVXn.mjs.map +1 -1
- package/dist/{types-BGWPMiBO.d.mts → types-DN64_zzZ.d.mts} +44 -5
- package/dist/types-DN64_zzZ.d.mts.map +1 -0
- package/dist/{types-Dc4ntQjQ.d.mts → types-DQIDRKF2.d.mts} +124 -1
- package/dist/types-DQIDRKF2.d.mts.map +1 -0
- package/dist/{types-CbUcuxxc.d.mts → types-DWRhk9xZ.d.mts} +1 -1
- package/dist/{types-CbUcuxxc.d.mts.map → types-DWRhk9xZ.d.mts.map} +1 -1
- package/dist/{types-BK6U01Ro.d.mts → types-Dfk8KI5R.d.mts} +1 -1
- package/dist/{types-BK6U01Ro.d.mts.map → types-Dfk8KI5R.d.mts.map} +1 -1
- package/dist/{types-Cz8hNch2.d.mts → types-DrJrVCT1.d.mts} +25 -5
- package/dist/types-DrJrVCT1.d.mts.map +1 -0
- package/dist/{upload-attempts-D8QAFLUJ.mjs → upload-attempts-D4FS8LT6.mjs} +1 -1
- package/dist/{upload-attempts-D8QAFLUJ.mjs.map → upload-attempts-D4FS8LT6.mjs.map} +1 -1
- package/dist/url-pattern-BHS0V5Ng.mjs +33 -0
- package/dist/url-pattern-BHS0V5Ng.mjs.map +1 -0
- package/dist/{user-DBrq4UVq.mjs → user-DJZfUJVE.mjs} +3 -3
- package/dist/{user-DBrq4UVq.mjs.map → user-DJZfUJVE.mjs.map} +1 -1
- package/dist/{utils-hLzi_2Fn.mjs → utils-D4vD_Y98.mjs} +3 -3
- package/dist/{utils-hLzi_2Fn.mjs.map → utils-D4vD_Y98.mjs.map} +1 -1
- package/dist/{validate-mKo3RxBM.mjs → validate-BMLBvxOC.mjs} +24 -5
- package/dist/validate-BMLBvxOC.mjs.map +1 -0
- package/dist/{validate-C3oSmA7F.d.mts → validate-CTqt5nuE.d.mts} +15 -7
- package/dist/validate-CTqt5nuE.d.mts.map +1 -0
- package/dist/{validation-BgpucsvF.mjs → validation-npvENUCB.mjs} +11 -10
- package/dist/{validation-BgpucsvF.mjs.map → validation-npvENUCB.mjs.map} +1 -1
- package/dist/version-DB_fqCSI.mjs +7 -0
- package/dist/{version-C4PnpmoV.mjs.map → version-DB_fqCSI.mjs.map} +1 -1
- package/dist/{widgets-CJJtkiKh.mjs → widgets-BD3ho7Rq.mjs} +3 -3
- package/dist/{widgets-CJJtkiKh.mjs.map → widgets-BD3ho7Rq.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-9PPSy8X6.mjs → wxr-taxonomies-B1R3vBoD.mjs} +13 -32
- package/dist/{wxr-taxonomies-9PPSy8X6.mjs.map → wxr-taxonomies-B1R3vBoD.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-Bkpp_2tK.d.mts → wxr-taxonomies-Ca68766D.d.mts} +1 -1
- package/dist/{wxr-taxonomies-Bkpp_2tK.d.mts.map → wxr-taxonomies-Ca68766D.d.mts.map} +1 -1
- package/dist/{zod-generator-CG64Hnbh.mjs → zod-generator-LC-on_Vb.mjs} +52 -5
- package/dist/zod-generator-LC-on_Vb.mjs.map +1 -0
- package/package.json +32 -8
- package/src/api/errors.ts +12 -0
- package/src/api/handlers/content.ts +127 -29
- package/src/api/handlers/dashboard.ts +12 -2
- package/src/api/handlers/index.ts +16 -0
- package/src/api/handlers/manifest.ts +2 -0
- package/src/api/handlers/media-allowlist.ts +13 -2
- package/src/api/handlers/media-usage-work.ts +188 -0
- package/src/api/handlers/media-usage.ts +5 -3
- package/src/api/handlers/schema.ts +9 -3
- package/src/api/handlers/seo.ts +5 -2
- package/src/api/handlers/taxonomies.ts +345 -82
- package/src/api/media-usage-write-fence.ts +64 -0
- package/src/api/openapi/document.ts +199 -0
- package/src/api/schemas/common.ts +3 -1
- package/src/api/schemas/content.ts +122 -1
- package/src/api/schemas/media-usage.ts +133 -0
- package/src/api/schemas/schema.ts +78 -3
- package/src/api/schemas/taxonomies.ts +40 -8
- package/src/api/types.ts +1 -0
- package/src/astro/integration/index.ts +101 -56
- package/src/astro/integration/routes.ts +34 -4
- package/src/astro/integration/runtime.ts +18 -0
- package/src/astro/integration/virtual-modules.ts +25 -1
- package/src/astro/integration/vite-config.ts +16 -1
- package/src/astro/middleware/media-usage-write-fence.ts +30 -0
- package/src/astro/middleware/redirect.ts +12 -2
- package/src/astro/middleware/scoped-db.ts +21 -0
- package/src/astro/middleware.ts +140 -16
- package/src/astro/routes/api/admin/media-usage/collection-deletions/index.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/collection-deletions/retry.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/work/index.ts +26 -0
- package/src/astro/routes/api/admin/media-usage/work/retry.ts +26 -0
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/install.ts +4 -0
- package/src/astro/routes/api/auth/dev-bypass.ts +0 -4
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +67 -31
- package/src/astro/routes/api/import/wordpress/execute.ts +3 -10
- package/src/astro/routes/api/mcp.ts +1 -0
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +7 -1
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +1 -7
- package/src/astro/routes/api/setup/dev-bypass.ts +2 -7
- package/src/astro/routes/api/setup/index.ts +5 -13
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +1 -0
- package/src/astro/routes/api/taxonomies/[name]/translations.ts +48 -0
- package/src/astro/routes/api/taxonomies/[name].ts +102 -0
- package/src/astro/types.ts +25 -4
- package/src/cleanup.ts +6 -12
- package/src/cli/commands/doctor.ts +193 -6
- package/src/cli/commands/export-seed.ts +4 -1
- package/src/cli/commands/migrate.ts +593 -0
- package/src/cli/index.ts +2 -23
- package/src/client/index.ts +119 -0
- package/src/components/Block.astro +12 -0
- package/src/components/InlinePortableTextEditor.tsx +89 -1
- package/src/content/converters/mark-safety.ts +120 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +25 -16
- package/src/content/converters/prosemirror-to-portable-text.ts +12 -2
- package/src/content-list-query.ts +29 -0
- package/src/database/index.ts +8 -2
- package/src/database/migrations/060_collection_admin_config.ts +16 -0
- package/src/database/migrations/061_media_usage_cleanup.ts +77 -0
- package/src/database/migrations/062_media_usage_cleanup_fence.ts +295 -0
- package/src/database/migrations/063_media_usage_incremental_work.ts +397 -0
- package/src/database/migrations/064_fts_plain_text.ts +253 -0
- package/src/database/migrations/065_media_usage_collection_deletion.ts +85 -0
- package/src/database/migrations/066_media_usage_reconciliation.ts +115 -0
- package/src/database/migrations/067_indexed_content_fields.ts +39 -0
- package/src/database/migrations/068_content_taxonomy_entry_groups.ts +61 -0
- package/src/database/migrations/069_collection_title_date_fields.ts +45 -0
- package/src/database/migrations/070_collection_routable.ts +18 -0
- package/src/database/migrations/policy.ts +70 -0
- package/src/database/migrations/runner.ts +71 -3
- package/src/database/repositories/content.ts +861 -96
- package/src/database/repositories/media-usage-work.ts +848 -0
- package/src/database/repositories/media-usage.ts +1502 -138
- package/src/database/repositories/revision.ts +17 -6
- package/src/database/repositories/taxonomy.ts +234 -103
- package/src/database/repositories/types.ts +51 -2
- package/src/database/types.ts +134 -16
- package/src/db/adapters.ts +78 -2
- package/src/db/index.ts +6 -1
- package/src/db/libsql-migrations.ts +72 -0
- package/src/db/postgres-migrations.ts +59 -0
- package/src/db/sqlite-migrations.ts +37 -0
- package/src/emdash-runtime.ts +271 -35
- package/src/fields/file.ts +7 -4
- package/src/fields/image.ts +8 -1
- package/src/fields/types.ts +18 -5
- package/src/i18n/config.ts +32 -0
- package/src/i18n/normalize.ts +31 -0
- package/src/i18n/repair-locale-casing.ts +0 -14
- package/src/i18n/taxonomy-locale-diagnostic.ts +47 -0
- package/src/import/wxr-taxonomies.ts +7 -47
- package/src/index.ts +32 -3
- package/src/loader.ts +119 -65
- package/src/mcp/server.ts +242 -34
- package/src/media/usage/activation.ts +626 -0
- package/src/media/usage/capture-triggers.ts +543 -0
- package/src/media/usage/cleanup.ts +305 -0
- package/src/media/usage/collection-deletion-processor.ts +356 -0
- package/src/media/usage/collection-deletion.ts +836 -0
- package/src/media/usage/content-fields.ts +40 -3
- package/src/media/usage/content-refresh.ts +356 -47
- package/src/media/usage/content-repair.ts +180 -61
- package/src/media/usage/content-snapshots.ts +85 -105
- package/src/media/usage/projection-fingerprint.ts +129 -0
- package/src/media/usage/reconciliation-processor.ts +372 -0
- package/src/media/usage/reconciliation.ts +1117 -0
- package/src/media/usage/source-key.ts +4 -0
- package/src/media/usage/types.ts +2 -0
- package/src/media/usage/work-processor.ts +248 -0
- package/src/menus/index.ts +246 -141
- package/src/migrations/config-loader.ts +205 -0
- package/src/migrations/direct-executor.ts +141 -0
- package/src/migrations/identity.ts +46 -0
- package/src/migrations/index.ts +19 -0
- package/src/migrations/integration-metadata.ts +67 -0
- package/src/migrations/manifest-builder.ts +55 -0
- package/src/migrations/manifest-writer.ts +63 -0
- package/src/migrations/manifest.ts +197 -0
- package/src/migrations/protocol.ts +59 -0
- package/src/migrations/target.ts +35 -0
- package/src/plugin-types.ts +8 -0
- package/src/plugins/adapt-sandbox-entry.ts +24 -5
- package/src/plugins/context.ts +24 -7
- package/src/plugins/index.ts +9 -0
- package/src/plugins/routes.ts +43 -1
- package/src/plugins/sandbox/index.ts +10 -1
- package/src/plugins/sandbox/types.ts +78 -1
- package/src/plugins/scheduler/node.ts +13 -1
- package/src/plugins/scheduler/types.ts +2 -0
- package/src/plugins/types.ts +39 -2
- package/src/query.ts +29 -37
- package/src/scheduler-health.ts +46 -0
- package/src/schema/registry.ts +777 -255
- package/src/schema/types.ts +50 -8
- package/src/schema/url-pattern.ts +33 -0
- package/src/schema/zod-generator.ts +77 -5
- package/src/search/fts-manager.ts +117 -76
- package/src/search/query.ts +32 -11
- package/src/search/types.ts +2 -0
- package/src/seed/apply.ts +68 -15
- package/src/seed/types.ts +11 -3
- package/src/seed/validate.ts +52 -2
- package/src/taxonomies/index.ts +77 -75
- package/src/taxonomies/term-counts.ts +21 -8
- package/src/utils/slugify.ts +1 -29
- package/src/virtual-modules.d.ts +24 -0
- package/dist/adapters-BMyNSSZi.d.mts.map +0 -1
- package/dist/api-D2hunekQ.mjs.map +0 -1
- package/dist/apply-kwNEJW2l.mjs.map +0 -1
- package/dist/config-DyF3OKg_.mjs.map +0 -1
- package/dist/content-CJ94NEx5.mjs.map +0 -1
- package/dist/content-refresh-Xw7aKmou.mjs +0 -1629
- package/dist/content-refresh-Xw7aKmou.mjs.map +0 -1
- package/dist/context-C_1nrqnW.mjs.map +0 -1
- package/dist/dashboard-DINnNVVU.mjs.map +0 -1
- package/dist/errors-BucQ8VYz.mjs.map +0 -1
- package/dist/fts-manager-BITakW_R.mjs.map +0 -1
- package/dist/index-M37iz29I.d.mts.map +0 -1
- package/dist/index-MGw47uWq.d.mts.map +0 -1
- package/dist/loader-CGugY7Zl.mjs.map +0 -1
- package/dist/media-OhYL-7Io.mjs.map +0 -1
- package/dist/media-allowlist-D-peH1H5.mjs.map +0 -1
- package/dist/media-usage-BlxfTkN0.mjs.map +0 -1
- package/dist/menus-Y54RDPIN.mjs.map +0 -1
- package/dist/options-CA4eVX6P.d.mts.map +0 -1
- package/dist/query-C5w7PsRQ.mjs.map +0 -1
- package/dist/redirects-G8wAhWAf.mjs.map +0 -1
- package/dist/registry-Dbodb4Uo.mjs +0 -840
- package/dist/registry-Dbodb4Uo.mjs.map +0 -1
- package/dist/relations-G2ta7GIl.d.mts.map +0 -1
- package/dist/runner-BFTrkYhu.mjs.map +0 -1
- package/dist/runner-BaADli8l.d.mts.map +0 -1
- package/dist/search-FZhx5dDU.mjs.map +0 -1
- package/dist/seo-CobNfOvb.mjs.map +0 -1
- package/dist/slugify-C_tqlU4G.mjs +0 -30
- package/dist/slugify-C_tqlU4G.mjs.map +0 -1
- package/dist/taxonomies-CKuaZER5.mjs.map +0 -1
- package/dist/taxonomies-CLN1N92E.mjs.map +0 -1
- package/dist/taxonomy-pOrB2kZe.mjs.map +0 -1
- package/dist/types-BGWPMiBO.d.mts.map +0 -1
- package/dist/types-BnFP1M3J.d.mts.map +0 -1
- package/dist/types-Cd8iuS1J.mjs.map +0 -1
- package/dist/types-Cz8hNch2.d.mts.map +0 -1
- package/dist/types-Dc4ntQjQ.d.mts.map +0 -1
- package/dist/types-NBI3rF-_.mjs.map +0 -1
- package/dist/validate-C3oSmA7F.d.mts.map +0 -1
- package/dist/validate-mKo3RxBM.mjs.map +0 -1
- package/dist/version-C4PnpmoV.mjs +0 -7
- package/dist/zod-generator-CG64Hnbh.mjs.map +0 -1
- /package/dist/{api-tokens-Dai9dND0.mjs → api-tokens-rIXC6LdE.mjs} +0 -0
- /package/dist/{ssrf-Cj568Dgs.mjs → ssrf-DpXgKsna.mjs} +0 -0
- /package/dist/{types-DKuWPYV5.mjs → types-CP1CflWf.mjs} +0 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { c as __exportAll } from "./runner-C1T11CfC.mjs";
|
|
2
|
+
import { t as imageSize } from "./dist-D_6CKR8z.mjs";
|
|
3
|
+
import { i as isDeprecatedCapability, n as capabilitiesToDeclaredAccess, t as CAPABILITY_RENAMES } from "./types-CP1CflWf.mjs";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { access, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
8
|
+
import { basename, extname, join, resolve } from "node:path";
|
|
9
|
+
import { createWriteStream } from "node:fs";
|
|
10
|
+
import { defineCommand } from "citty";
|
|
11
|
+
import consola from "consola";
|
|
12
|
+
import { pipeline } from "node:stream/promises";
|
|
13
|
+
import { packTar } from "modern-tar/fs";
|
|
14
|
+
|
|
15
|
+
//#region src/cli/commands/bundle-utils.ts
|
|
16
|
+
/**
|
|
17
|
+
* Bundle utility functions
|
|
18
|
+
*
|
|
19
|
+
* Shared logic extracted from the bundle command so it can be tested
|
|
20
|
+
* without the CLI harness and tsdown dependency.
|
|
21
|
+
*/
|
|
22
|
+
const MAX_BUNDLE_SIZE = 256 * 1024;
|
|
23
|
+
const MAX_FILE_SIZE = 128 * 1024;
|
|
24
|
+
const MAX_FILE_COUNT = 20;
|
|
25
|
+
const MAX_SCREENSHOTS = 5;
|
|
26
|
+
const MAX_SCREENSHOT_WIDTH = 1920;
|
|
27
|
+
const MAX_SCREENSHOT_HEIGHT = 1080;
|
|
28
|
+
const ICON_SIZE = 256;
|
|
29
|
+
const MCP_TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
30
|
+
/**
|
|
31
|
+
* Matches Node.js built-in imports in bundled output:
|
|
32
|
+
* - require("node:xxx") / require("xxx")
|
|
33
|
+
* - import("node:xxx") / import("xxx")
|
|
34
|
+
* - import X from "node:xxx" / import { X } from "node:xxx"
|
|
35
|
+
* - import * as X from "node:xxx"
|
|
36
|
+
* - export { X } from "node:xxx"
|
|
37
|
+
* Captures the base module name (e.g. "fs" from "node:fs/promises").
|
|
38
|
+
*/
|
|
39
|
+
const NODE_BUILTIN_IMPORT_RE = /(?:import|export|require)\s*(?:\(|[^(]*?\bfrom\s+)["'](?:node:)?([a-z_]+)(?:\/[^"']*)?\s*["']\)?/g;
|
|
40
|
+
const LEADING_DOT_SLASH_RE = /^\.\//;
|
|
41
|
+
const DIST_PREFIX_RE = /^dist\//;
|
|
42
|
+
const MJS_EXT_RE = /\.m?js$/;
|
|
43
|
+
const TS_TO_TSX_RE = /\.ts$/;
|
|
44
|
+
/** Node.js built-in modules that shouldn't appear in sandbox code */
|
|
45
|
+
const NODE_BUILTINS = new Set([
|
|
46
|
+
"assert",
|
|
47
|
+
"buffer",
|
|
48
|
+
"child_process",
|
|
49
|
+
"cluster",
|
|
50
|
+
"crypto",
|
|
51
|
+
"dgram",
|
|
52
|
+
"dns",
|
|
53
|
+
"domain",
|
|
54
|
+
"events",
|
|
55
|
+
"fs",
|
|
56
|
+
"http",
|
|
57
|
+
"http2",
|
|
58
|
+
"https",
|
|
59
|
+
"inspector",
|
|
60
|
+
"module",
|
|
61
|
+
"net",
|
|
62
|
+
"os",
|
|
63
|
+
"path",
|
|
64
|
+
"perf_hooks",
|
|
65
|
+
"process",
|
|
66
|
+
"punycode",
|
|
67
|
+
"querystring",
|
|
68
|
+
"readline",
|
|
69
|
+
"repl",
|
|
70
|
+
"stream",
|
|
71
|
+
"string_decoder",
|
|
72
|
+
"sys",
|
|
73
|
+
"timers",
|
|
74
|
+
"tls",
|
|
75
|
+
"trace_events",
|
|
76
|
+
"tty",
|
|
77
|
+
"url",
|
|
78
|
+
"util",
|
|
79
|
+
"v8",
|
|
80
|
+
"vm",
|
|
81
|
+
"wasi",
|
|
82
|
+
"worker_threads",
|
|
83
|
+
"zlib"
|
|
84
|
+
]);
|
|
85
|
+
async function fileExists(path) {
|
|
86
|
+
try {
|
|
87
|
+
await access(path);
|
|
88
|
+
return true;
|
|
89
|
+
} catch {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** Convert an absolute build artifact path into a portable ESM import specifier. */
|
|
94
|
+
function toFileImportSpecifier(path) {
|
|
95
|
+
return pathToFileURL(path).href;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Read image dimensions from a buffer.
|
|
99
|
+
* Returns [width, height] or null if the format is unrecognized.
|
|
100
|
+
*/
|
|
101
|
+
function readImageDimensions(buf) {
|
|
102
|
+
try {
|
|
103
|
+
const result = imageSize(buf);
|
|
104
|
+
if (result.width != null && result.height != null) return [result.width, result.height];
|
|
105
|
+
return null;
|
|
106
|
+
} catch {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Extract manifest metadata from a ResolvedPlugin.
|
|
112
|
+
* Strips functions (hooks, route handlers) and keeps only serializable metadata.
|
|
113
|
+
*/
|
|
114
|
+
function extractManifest(plugin) {
|
|
115
|
+
const hooks = [];
|
|
116
|
+
for (const [name, resolved] of Object.entries(plugin.hooks)) {
|
|
117
|
+
if (!resolved) continue;
|
|
118
|
+
if (resolved.exclusive || resolved.priority !== 100 || resolved.timeout !== 5e3) {
|
|
119
|
+
const entry = { name };
|
|
120
|
+
if (resolved.exclusive) entry.exclusive = true;
|
|
121
|
+
if (resolved.priority !== 100) entry.priority = resolved.priority;
|
|
122
|
+
if (resolved.timeout !== 5e3) entry.timeout = resolved.timeout;
|
|
123
|
+
hooks.push(entry);
|
|
124
|
+
} else hooks.push(name);
|
|
125
|
+
}
|
|
126
|
+
const routes = Object.entries(plugin.routes).map(([name, route]) => {
|
|
127
|
+
if (route.public === void 0 && route.permission === void 0 && route.cacheControl === void 0) return name;
|
|
128
|
+
const entry = { name };
|
|
129
|
+
if (route.public !== void 0) entry.public = route.public;
|
|
130
|
+
if (route.permission !== void 0) entry.permission = route.permission;
|
|
131
|
+
if (route.cacheControl !== void 0) entry.cacheControl = route.cacheControl;
|
|
132
|
+
return entry;
|
|
133
|
+
});
|
|
134
|
+
const tools = Object.entries(plugin.mcp?.tools ?? {}).map(([name, tool]) => {
|
|
135
|
+
if (!MCP_TOOL_NAME_PATTERN.test(name)) throw new Error(`Invalid MCP tool name "${name}"`);
|
|
136
|
+
const route = plugin.routes[tool.route];
|
|
137
|
+
if (!route?.permission || route.public) throw new Error(`MCP tool "${name}" must reference a private route with a permission`);
|
|
138
|
+
return {
|
|
139
|
+
name,
|
|
140
|
+
description: tool.description,
|
|
141
|
+
route: tool.route,
|
|
142
|
+
permission: route.permission,
|
|
143
|
+
destructive: tool.destructive ?? false,
|
|
144
|
+
inputSchema: z.toJSONSchema(tool.input, { target: "draft-7" }),
|
|
145
|
+
...tool.output ? { outputSchema: z.toJSONSchema(tool.output, { target: "draft-7" }) } : {}
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
return {
|
|
149
|
+
id: plugin.id,
|
|
150
|
+
version: plugin.version,
|
|
151
|
+
declaredAccess: capabilitiesToDeclaredAccess(plugin.capabilities, plugin.allowedHosts),
|
|
152
|
+
capabilities: plugin.capabilities,
|
|
153
|
+
allowedHosts: plugin.allowedHosts,
|
|
154
|
+
storage: plugin.storage,
|
|
155
|
+
hooks,
|
|
156
|
+
routes,
|
|
157
|
+
...tools.length > 0 ? { mcp: { tools } } : {},
|
|
158
|
+
admin: {
|
|
159
|
+
settingsSchema: plugin.admin.settingsSchema,
|
|
160
|
+
pages: plugin.admin.pages,
|
|
161
|
+
widgets: plugin.admin.widgets
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Scan bundled code for Node.js built-in imports.
|
|
167
|
+
* Matches require("node:xxx"), require("xxx"), import("node:xxx") — the patterns
|
|
168
|
+
* that appear in bundled ESM/CJS output (not source-level named imports).
|
|
169
|
+
* Returns deduplicated array of built-in module names found.
|
|
170
|
+
*/
|
|
171
|
+
function findNodeBuiltinImports(code) {
|
|
172
|
+
const found = [];
|
|
173
|
+
NODE_BUILTIN_IMPORT_RE.lastIndex = 0;
|
|
174
|
+
let match;
|
|
175
|
+
while ((match = NODE_BUILTIN_IMPORT_RE.exec(code)) !== null) {
|
|
176
|
+
const mod = match[1];
|
|
177
|
+
if (NODE_BUILTINS.has(mod)) found.push(mod);
|
|
178
|
+
}
|
|
179
|
+
return [...new Set(found)];
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Find a build output file by base name, checking common extensions.
|
|
183
|
+
* tsdown may output .mjs, .js, or .cjs depending on format and config.
|
|
184
|
+
*/
|
|
185
|
+
async function findBuildOutput(dir, baseName) {
|
|
186
|
+
for (const ext of [
|
|
187
|
+
".mjs",
|
|
188
|
+
".js",
|
|
189
|
+
".cjs"
|
|
190
|
+
]) {
|
|
191
|
+
const candidate = join(dir, `${baseName}${ext}`);
|
|
192
|
+
if (await fileExists(candidate)) return candidate;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Resolve a dist/built path back to its source .ts/.tsx equivalent.
|
|
197
|
+
* E.g., "./dist/index.mjs" → "src/index.ts"
|
|
198
|
+
*/
|
|
199
|
+
async function resolveSourceEntry(pluginDir, distPath) {
|
|
200
|
+
const cleaned = distPath.replace(LEADING_DOT_SLASH_RE, "");
|
|
201
|
+
const srcPath = cleaned.replace(DIST_PREFIX_RE, "src/").replace(MJS_EXT_RE, ".ts");
|
|
202
|
+
const srcFull = resolve(pluginDir, srcPath);
|
|
203
|
+
if (await fileExists(srcFull)) return srcFull;
|
|
204
|
+
const tsxFull = resolve(pluginDir, srcPath.replace(TS_TO_TSX_RE, ".tsx"));
|
|
205
|
+
if (await fileExists(tsxFull)) return tsxFull;
|
|
206
|
+
const direct = resolve(pluginDir, cleaned);
|
|
207
|
+
if (await fileExists(direct)) return direct;
|
|
208
|
+
}
|
|
209
|
+
const TS_SOURCE_EXPORT_RE = /\.(?:ts|tsx|mts|cts|jsx)$/;
|
|
210
|
+
/**
|
|
211
|
+
* Find package.json exports that point to source files instead of built output.
|
|
212
|
+
* Returns an array of `{ exportPath, resolvedPath }` for each offending export.
|
|
213
|
+
*/
|
|
214
|
+
function findSourceExports(exports) {
|
|
215
|
+
const issues = [];
|
|
216
|
+
for (const [exportPath, exportValue] of Object.entries(exports)) {
|
|
217
|
+
const resolved = typeof exportValue === "string" ? exportValue : exportValue && typeof exportValue === "object" && "import" in exportValue ? exportValue.import : null;
|
|
218
|
+
if (resolved && TS_SOURCE_EXPORT_RE.test(resolved)) issues.push({
|
|
219
|
+
exportPath,
|
|
220
|
+
resolvedPath: resolved
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return issues;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Recursively walk a staging directory and return a flat list of all files
|
|
227
|
+
* with sizes. Names are relative to `dir` so they match what would appear
|
|
228
|
+
* as the tarball entry name.
|
|
229
|
+
*/
|
|
230
|
+
async function collectBundleEntries(dir) {
|
|
231
|
+
const entries = [];
|
|
232
|
+
await walkBundle(dir, "", entries);
|
|
233
|
+
return entries;
|
|
234
|
+
}
|
|
235
|
+
async function walkBundle(dir, prefix, into) {
|
|
236
|
+
const items = await readdir(dir, { withFileTypes: true });
|
|
237
|
+
for (const item of items) {
|
|
238
|
+
const fullPath = join(dir, item.name);
|
|
239
|
+
const relPath = prefix ? `${prefix}/${item.name}` : item.name;
|
|
240
|
+
if (item.isFile()) {
|
|
241
|
+
const s = await stat(fullPath);
|
|
242
|
+
into.push({
|
|
243
|
+
name: relPath,
|
|
244
|
+
bytes: s.size
|
|
245
|
+
});
|
|
246
|
+
} else if (item.isDirectory()) await walkBundle(fullPath, relPath, into);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Sum the byte sizes of all entries.
|
|
251
|
+
*/
|
|
252
|
+
function totalBundleBytes(entries) {
|
|
253
|
+
let total = 0;
|
|
254
|
+
for (const e of entries) total += e.bytes;
|
|
255
|
+
return total;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Check a bundle against the three size caps from RFC 0001:
|
|
259
|
+
* - total decompressed ≤ MAX_BUNDLE_SIZE
|
|
260
|
+
* - per-file decompressed ≤ MAX_FILE_SIZE
|
|
261
|
+
* - file count ≤ MAX_FILE_COUNT
|
|
262
|
+
*
|
|
263
|
+
* Returns a list of violation messages (empty if the bundle is within all
|
|
264
|
+
* caps). Messages are deterministic per input — the total/count violations
|
|
265
|
+
* come first, then oversized files in alphabetical order — so the same
|
|
266
|
+
* bundle always produces the same error text.
|
|
267
|
+
*/
|
|
268
|
+
function validateBundleSize(entries) {
|
|
269
|
+
const violations = [];
|
|
270
|
+
const total = totalBundleBytes(entries);
|
|
271
|
+
if (total > MAX_BUNDLE_SIZE) violations.push(`Bundle size ${formatBytes(total)} exceeds maximum of ${formatBytes(MAX_BUNDLE_SIZE)}.`);
|
|
272
|
+
if (entries.length > MAX_FILE_COUNT) violations.push(`Bundle contains ${entries.length} files, exceeds maximum of ${MAX_FILE_COUNT}.`);
|
|
273
|
+
const oversized = entries.filter((e) => e.bytes > MAX_FILE_SIZE).toSorted((a, b) => a.name.localeCompare(b.name));
|
|
274
|
+
for (const e of oversized) violations.push(`File ${e.name} is ${formatBytes(e.bytes)}, exceeds per-file maximum of ${formatBytes(MAX_FILE_SIZE)}.`);
|
|
275
|
+
return violations;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Render a byte count as a human-friendly string (e.g. "256.0 KB").
|
|
279
|
+
*/
|
|
280
|
+
function formatBytes(n) {
|
|
281
|
+
if (n < 1024) return `${n} B`;
|
|
282
|
+
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
|
|
283
|
+
return `${(n / 1024 / 1024).toFixed(2)} MB`;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Create a gzipped tarball from a directory.
|
|
287
|
+
*/
|
|
288
|
+
async function createTarball(sourceDir, outputPath) {
|
|
289
|
+
const { createGzip } = await import("node:zlib");
|
|
290
|
+
await pipeline(packTar(sourceDir), createGzip({ level: 9 }), createWriteStream(outputPath));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/cli/commands/bundle.ts
|
|
295
|
+
/**
|
|
296
|
+
* emdash plugin bundle
|
|
297
|
+
*
|
|
298
|
+
* Produces a publishable plugin tarball from a plugin source directory.
|
|
299
|
+
*
|
|
300
|
+
* Steps:
|
|
301
|
+
* 1. Resolve plugin entrypoint (finds definePlugin() export)
|
|
302
|
+
* 2. Bundle backend code with tsdown → backend.js (single ES module, tree-shaken)
|
|
303
|
+
* 3. Bundle admin code if present → admin.js
|
|
304
|
+
* 4. Extract manifest from definePlugin() → manifest.json
|
|
305
|
+
* 5. Collect assets (README.md, icon.png, screenshots/)
|
|
306
|
+
* 6. Validate bundle (manifest schema, size limits, no Node.js builtins)
|
|
307
|
+
* 7. Create tarball ({id}-{version}.tar.gz)
|
|
308
|
+
*/
|
|
309
|
+
var bundle_exports = /* @__PURE__ */ __exportAll({ bundleCommand: () => bundleCommand });
|
|
310
|
+
const TS_EXT_RE = /\.(tsx?|[mc]?js)$/;
|
|
311
|
+
const SLASH_RE = /\//g;
|
|
312
|
+
const LEADING_AT_RE = /^@/;
|
|
313
|
+
const emdash_SCOPE_RE = /^@emdash-cms\//;
|
|
314
|
+
const bundleCommand = defineCommand({
|
|
315
|
+
meta: {
|
|
316
|
+
name: "bundle",
|
|
317
|
+
description: "Bundle a plugin for marketplace distribution"
|
|
318
|
+
},
|
|
319
|
+
args: {
|
|
320
|
+
dir: {
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "Plugin directory (default: current directory)",
|
|
323
|
+
default: process.cwd()
|
|
324
|
+
},
|
|
325
|
+
outDir: {
|
|
326
|
+
type: "string",
|
|
327
|
+
alias: "o",
|
|
328
|
+
description: "Output directory for the tarball (default: ./dist)",
|
|
329
|
+
default: "dist"
|
|
330
|
+
},
|
|
331
|
+
validateOnly: {
|
|
332
|
+
type: "boolean",
|
|
333
|
+
description: "Run validation only, skip tarball creation",
|
|
334
|
+
default: false
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
async run({ args }) {
|
|
338
|
+
const pluginDir = resolve(args.dir);
|
|
339
|
+
const outDir = resolve(pluginDir, args.outDir);
|
|
340
|
+
const validateOnly = args.validateOnly;
|
|
341
|
+
consola.start(validateOnly ? "Validating plugin..." : "Bundling plugin...");
|
|
342
|
+
const pkgPath = join(pluginDir, "package.json");
|
|
343
|
+
if (!await fileExists(pkgPath)) {
|
|
344
|
+
consola.error("No package.json found in", pluginDir);
|
|
345
|
+
process.exit(1);
|
|
346
|
+
}
|
|
347
|
+
const pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
|
|
348
|
+
let backendEntry;
|
|
349
|
+
let adminEntry;
|
|
350
|
+
if (pkg.exports) {
|
|
351
|
+
const sandboxExport = pkg.exports["./sandbox"];
|
|
352
|
+
if (typeof sandboxExport === "string") backendEntry = await resolveSourceEntry(pluginDir, sandboxExport);
|
|
353
|
+
else if (sandboxExport && typeof sandboxExport === "object" && "import" in sandboxExport) backendEntry = await resolveSourceEntry(pluginDir, sandboxExport.import);
|
|
354
|
+
const adminExport = pkg.exports["./admin"];
|
|
355
|
+
if (typeof adminExport === "string") adminEntry = await resolveSourceEntry(pluginDir, adminExport);
|
|
356
|
+
else if (adminExport && typeof adminExport === "object" && "import" in adminExport) adminEntry = await resolveSourceEntry(pluginDir, adminExport.import);
|
|
357
|
+
}
|
|
358
|
+
if (!backendEntry) {
|
|
359
|
+
const defaultSandbox = join(pluginDir, "src/sandbox-entry.ts");
|
|
360
|
+
if (await fileExists(defaultSandbox)) backendEntry = defaultSandbox;
|
|
361
|
+
}
|
|
362
|
+
let mainEntry;
|
|
363
|
+
if (pkg.exports?.["."] !== void 0) {
|
|
364
|
+
const mainExport = pkg.exports["."];
|
|
365
|
+
if (typeof mainExport === "string") mainEntry = await resolveSourceEntry(pluginDir, mainExport);
|
|
366
|
+
else if (mainExport && typeof mainExport === "object" && "import" in mainExport) mainEntry = await resolveSourceEntry(pluginDir, mainExport.import);
|
|
367
|
+
}
|
|
368
|
+
if (!mainEntry && pkg.main) mainEntry = await resolveSourceEntry(pluginDir, pkg.main);
|
|
369
|
+
if (!mainEntry) {
|
|
370
|
+
const defaultMain = join(pluginDir, "src/index.ts");
|
|
371
|
+
if (await fileExists(defaultMain)) mainEntry = defaultMain;
|
|
372
|
+
}
|
|
373
|
+
if (!mainEntry) {
|
|
374
|
+
consola.error("Cannot find plugin entrypoint. Expected src/index.ts or main/exports in package.json");
|
|
375
|
+
process.exit(1);
|
|
376
|
+
}
|
|
377
|
+
consola.info(`Main entry: ${mainEntry}`);
|
|
378
|
+
if (backendEntry) consola.info(`Backend entry: ${backendEntry}`);
|
|
379
|
+
if (adminEntry) consola.info(`Admin entry: ${adminEntry}`);
|
|
380
|
+
consola.start("Extracting plugin manifest...");
|
|
381
|
+
const { build } = await import("tsdown");
|
|
382
|
+
const tmpDir = join(pluginDir, ".emdash-bundle-tmp");
|
|
383
|
+
try {
|
|
384
|
+
await rm(tmpDir, {
|
|
385
|
+
recursive: true,
|
|
386
|
+
force: true
|
|
387
|
+
});
|
|
388
|
+
await mkdir(tmpDir, { recursive: true });
|
|
389
|
+
const mainOutDir = join(tmpDir, "main");
|
|
390
|
+
await build({
|
|
391
|
+
config: false,
|
|
392
|
+
entry: [mainEntry],
|
|
393
|
+
format: "esm",
|
|
394
|
+
outDir: mainOutDir,
|
|
395
|
+
dts: false,
|
|
396
|
+
platform: "node",
|
|
397
|
+
external: ["emdash", emdash_SCOPE_RE]
|
|
398
|
+
});
|
|
399
|
+
const pluginNodeModules = join(pluginDir, "node_modules");
|
|
400
|
+
const tmpNodeModules = join(mainOutDir, "node_modules");
|
|
401
|
+
if (await fileExists(pluginNodeModules)) await symlink(pluginNodeModules, tmpNodeModules, "junction");
|
|
402
|
+
const mainOutputPath = await findBuildOutput(mainOutDir, basename(mainEntry).replace(TS_EXT_RE, ""));
|
|
403
|
+
if (!mainOutputPath) {
|
|
404
|
+
consola.error("Failed to build main entry — no output found in", mainOutDir);
|
|
405
|
+
process.exit(1);
|
|
406
|
+
}
|
|
407
|
+
const pluginModule = await import(toFileImportSpecifier(mainOutputPath));
|
|
408
|
+
let resolvedPlugin;
|
|
409
|
+
if (typeof pluginModule.createPlugin === "function") resolvedPlugin = pluginModule.createPlugin();
|
|
410
|
+
else if (typeof pluginModule.default === "function") resolvedPlugin = pluginModule.default();
|
|
411
|
+
else if (typeof pluginModule.default === "object" && pluginModule.default !== null) {
|
|
412
|
+
const defaultExport = pluginModule.default;
|
|
413
|
+
if ("id" in defaultExport && "version" in defaultExport) resolvedPlugin = defaultExport;
|
|
414
|
+
}
|
|
415
|
+
if (!resolvedPlugin) for (const [key, value] of Object.entries(pluginModule)) {
|
|
416
|
+
if (key === "default" || typeof value !== "function") continue;
|
|
417
|
+
try {
|
|
418
|
+
const result = value();
|
|
419
|
+
if (result && typeof result === "object" && "id" in result && "version" in result) {
|
|
420
|
+
resolvedPlugin = {
|
|
421
|
+
id: result.id,
|
|
422
|
+
version: result.version,
|
|
423
|
+
capabilities: result.capabilities ?? [],
|
|
424
|
+
allowedHosts: result.allowedHosts ?? [],
|
|
425
|
+
storage: result.storage ?? {},
|
|
426
|
+
hooks: {},
|
|
427
|
+
routes: {},
|
|
428
|
+
admin: {
|
|
429
|
+
pages: result.adminPages,
|
|
430
|
+
widgets: result.adminWidgets
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
if (backendEntry) {
|
|
434
|
+
const backendProbeDir = join(tmpDir, "backend-probe");
|
|
435
|
+
const probeShimDir = join(tmpDir, "probe-shims");
|
|
436
|
+
await mkdir(probeShimDir, { recursive: true });
|
|
437
|
+
await writeFile(join(probeShimDir, "emdash.mjs"), "export const definePlugin = (d) => d;\n");
|
|
438
|
+
await build({
|
|
439
|
+
config: false,
|
|
440
|
+
entry: [backendEntry],
|
|
441
|
+
format: "esm",
|
|
442
|
+
outDir: backendProbeDir,
|
|
443
|
+
dts: false,
|
|
444
|
+
platform: "neutral",
|
|
445
|
+
external: [],
|
|
446
|
+
alias: { emdash: join(probeShimDir, "emdash.mjs") },
|
|
447
|
+
treeshake: true
|
|
448
|
+
});
|
|
449
|
+
const backendProbePath = await findBuildOutput(backendProbeDir, basename(backendEntry).replace(TS_EXT_RE, ""));
|
|
450
|
+
if (backendProbePath) {
|
|
451
|
+
const standardDef = (await import(toFileImportSpecifier(backendProbePath))).default ?? {};
|
|
452
|
+
const hooks = standardDef.hooks;
|
|
453
|
+
const routes = standardDef.routes;
|
|
454
|
+
if (hooks) for (const hookName of Object.keys(hooks)) {
|
|
455
|
+
const hookEntry = hooks[hookName];
|
|
456
|
+
const isConfig = typeof hookEntry === "object" && hookEntry !== null && "handler" in hookEntry;
|
|
457
|
+
const config = isConfig ? hookEntry : {};
|
|
458
|
+
resolvedPlugin.hooks[hookName] = {
|
|
459
|
+
handler: isConfig ? hookEntry.handler : hookEntry,
|
|
460
|
+
priority: config.priority ?? 100,
|
|
461
|
+
timeout: config.timeout ?? 5e3,
|
|
462
|
+
dependencies: config.dependencies ?? [],
|
|
463
|
+
errorPolicy: config.errorPolicy ?? "abort",
|
|
464
|
+
exclusive: config.exclusive ?? false,
|
|
465
|
+
pluginId: result.id
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
if (routes) for (const [name, route] of Object.entries(routes)) {
|
|
469
|
+
const routeObj = route;
|
|
470
|
+
resolvedPlugin.routes[name] = {
|
|
471
|
+
handler: routeObj.handler,
|
|
472
|
+
public: routeObj.public,
|
|
473
|
+
cacheControl: routeObj.cacheControl
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
} catch {}
|
|
481
|
+
}
|
|
482
|
+
if (!resolvedPlugin?.id || !resolvedPlugin?.version) {
|
|
483
|
+
consola.error("Could not extract plugin definition. Expected one of:\n - createPlugin() export (native format)\n - Descriptor factory function returning { id, version, ... } (standard format)");
|
|
484
|
+
process.exit(1);
|
|
485
|
+
}
|
|
486
|
+
const manifest = extractManifest(resolvedPlugin);
|
|
487
|
+
if (resolvedPlugin.admin?.entry) {
|
|
488
|
+
consola.error("Plugin declares adminEntry — React admin components require native/trusted mode. Use Block Kit for sandboxed admin pages, or remove adminEntry.");
|
|
489
|
+
process.exit(1);
|
|
490
|
+
}
|
|
491
|
+
if (resolvedPlugin.admin?.portableTextBlocks && resolvedPlugin.admin.portableTextBlocks.length > 0) {
|
|
492
|
+
consola.error("Plugin declares portableTextBlocks — these require native/trusted mode and cannot be bundled for the marketplace.");
|
|
493
|
+
process.exit(1);
|
|
494
|
+
}
|
|
495
|
+
consola.success(`Plugin: ${manifest.id}@${manifest.version}`);
|
|
496
|
+
consola.info(` Capabilities: ${manifest.capabilities.length > 0 ? manifest.capabilities.join(", ") : "(none)"}`);
|
|
497
|
+
consola.info(` Hooks: ${manifest.hooks.length > 0 ? manifest.hooks.map((h) => typeof h === "string" ? h : h.name).join(", ") : "(none)"}`);
|
|
498
|
+
consola.info(` Routes: ${manifest.routes.length > 0 ? manifest.routes.map((r) => typeof r === "string" ? r : r.name).join(", ") : "(none)"}`);
|
|
499
|
+
const bundleDir = join(tmpDir, "bundle");
|
|
500
|
+
await mkdir(bundleDir, { recursive: true });
|
|
501
|
+
if (backendEntry) {
|
|
502
|
+
consola.start("Bundling backend...");
|
|
503
|
+
const shimDir = join(tmpDir, "shims");
|
|
504
|
+
await mkdir(shimDir, { recursive: true });
|
|
505
|
+
await writeFile(join(shimDir, "emdash.mjs"), "export const definePlugin = (d) => d;\n");
|
|
506
|
+
await build({
|
|
507
|
+
config: false,
|
|
508
|
+
entry: [backendEntry],
|
|
509
|
+
format: "esm",
|
|
510
|
+
outDir: join(tmpDir, "backend"),
|
|
511
|
+
dts: false,
|
|
512
|
+
platform: "neutral",
|
|
513
|
+
external: [],
|
|
514
|
+
alias: { emdash: join(shimDir, "emdash.mjs") },
|
|
515
|
+
minify: true,
|
|
516
|
+
treeshake: true
|
|
517
|
+
});
|
|
518
|
+
const backendBaseName = basename(backendEntry).replace(TS_EXT_RE, "");
|
|
519
|
+
const backendOutputPath = await findBuildOutput(join(tmpDir, "backend"), backendBaseName);
|
|
520
|
+
if (backendOutputPath) {
|
|
521
|
+
await copyFile(backendOutputPath, join(bundleDir, "backend.js"));
|
|
522
|
+
consola.success("Built backend.js");
|
|
523
|
+
} else {
|
|
524
|
+
consola.error("Backend build produced no output");
|
|
525
|
+
process.exit(1);
|
|
526
|
+
}
|
|
527
|
+
} else {
|
|
528
|
+
consola.warn("No sandbox entry found — bundle will have no backend.js");
|
|
529
|
+
consola.warn(" Add a \"sandbox-entry.ts\" in src/ or a \"./sandbox\" export in package.json");
|
|
530
|
+
}
|
|
531
|
+
if (adminEntry) {
|
|
532
|
+
consola.start("Bundling admin...");
|
|
533
|
+
await build({
|
|
534
|
+
config: false,
|
|
535
|
+
entry: [adminEntry],
|
|
536
|
+
format: "esm",
|
|
537
|
+
outDir: join(tmpDir, "admin"),
|
|
538
|
+
dts: false,
|
|
539
|
+
platform: "neutral",
|
|
540
|
+
external: [],
|
|
541
|
+
minify: true,
|
|
542
|
+
treeshake: true
|
|
543
|
+
});
|
|
544
|
+
const adminBaseName = basename(adminEntry).replace(TS_EXT_RE, "");
|
|
545
|
+
const adminOutputPath = await findBuildOutput(join(tmpDir, "admin"), adminBaseName);
|
|
546
|
+
if (adminOutputPath) {
|
|
547
|
+
await copyFile(adminOutputPath, join(bundleDir, "admin.js"));
|
|
548
|
+
consola.success("Built admin.js");
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
await writeFile(join(bundleDir, "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
552
|
+
consola.start("Collecting assets...");
|
|
553
|
+
const readmePath = join(pluginDir, "README.md");
|
|
554
|
+
if (await fileExists(readmePath)) {
|
|
555
|
+
await copyFile(readmePath, join(bundleDir, "README.md"));
|
|
556
|
+
consola.success("Included README.md");
|
|
557
|
+
}
|
|
558
|
+
const iconPath = join(pluginDir, "icon.png");
|
|
559
|
+
if (await fileExists(iconPath)) {
|
|
560
|
+
const dims = readImageDimensions(await readFile(iconPath));
|
|
561
|
+
if (!dims) consola.warn("icon.png is not a valid PNG — skipping");
|
|
562
|
+
else if (dims[0] !== ICON_SIZE || dims[1] !== ICON_SIZE) {
|
|
563
|
+
consola.warn(`icon.png is ${dims[0]}x${dims[1]}, expected ${ICON_SIZE}x${ICON_SIZE} — including anyway`);
|
|
564
|
+
await copyFile(iconPath, join(bundleDir, "icon.png"));
|
|
565
|
+
} else {
|
|
566
|
+
await copyFile(iconPath, join(bundleDir, "icon.png"));
|
|
567
|
+
consola.success("Included icon.png");
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const screenshotsDir = join(pluginDir, "screenshots");
|
|
571
|
+
if (await fileExists(screenshotsDir)) {
|
|
572
|
+
const screenshotFiles = (await readdir(screenshotsDir)).filter((f) => {
|
|
573
|
+
const ext = extname(f).toLowerCase();
|
|
574
|
+
return ext === ".png" || ext === ".jpg" || ext === ".jpeg";
|
|
575
|
+
}).toSorted().slice(0, MAX_SCREENSHOTS);
|
|
576
|
+
if (screenshotFiles.length > 0) {
|
|
577
|
+
await mkdir(join(bundleDir, "screenshots"), { recursive: true });
|
|
578
|
+
for (const file of screenshotFiles) {
|
|
579
|
+
const filePath = join(screenshotsDir, file);
|
|
580
|
+
const dims = readImageDimensions(await readFile(filePath));
|
|
581
|
+
if (!dims) {
|
|
582
|
+
consola.warn(`screenshots/${file} — cannot read dimensions, skipping`);
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
if (dims[0] > MAX_SCREENSHOT_WIDTH || dims[1] > MAX_SCREENSHOT_HEIGHT) consola.warn(`screenshots/${file} is ${dims[0]}x${dims[1]}, max ${MAX_SCREENSHOT_WIDTH}x${MAX_SCREENSHOT_HEIGHT} — including anyway`);
|
|
586
|
+
await copyFile(filePath, join(bundleDir, "screenshots", file));
|
|
587
|
+
}
|
|
588
|
+
consola.success(`Included ${screenshotFiles.length} screenshot(s)`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
consola.start("Validating bundle...");
|
|
592
|
+
let hasErrors = false;
|
|
593
|
+
if (pkg.exports) for (const issue of findSourceExports(pkg.exports)) {
|
|
594
|
+
consola.error(`Export "${issue.exportPath}" points to source (${issue.resolvedPath}). Package exports must point to built files (e.g. dist/*.mjs). Add a build step and update the exports map.`);
|
|
595
|
+
hasErrors = true;
|
|
596
|
+
}
|
|
597
|
+
const backendPath = join(bundleDir, "backend.js");
|
|
598
|
+
if (await fileExists(backendPath)) {
|
|
599
|
+
const builtins = findNodeBuiltinImports(await readFile(backendPath, "utf-8"));
|
|
600
|
+
if (builtins.length > 0) {
|
|
601
|
+
consola.error(`backend.js imports Node.js built-in modules: ${builtins.join(", ")}`);
|
|
602
|
+
consola.error("Sandboxed plugins cannot use Node.js APIs");
|
|
603
|
+
hasErrors = true;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
const declaresUnrestricted = manifest.capabilities.includes("network:request:unrestricted") || manifest.capabilities.includes("network:fetch:any");
|
|
607
|
+
const declaresHostRestricted = manifest.capabilities.includes("network:request") || manifest.capabilities.includes("network:fetch");
|
|
608
|
+
if (declaresUnrestricted) consola.warn("Plugin declares unrestricted network access (network:request:unrestricted) — it can make requests to any host");
|
|
609
|
+
else if (declaresHostRestricted && manifest.allowedHosts.length === 0) consola.warn("Plugin declares network:request capability but no allowedHosts — all requests will be blocked");
|
|
610
|
+
const deprecatedCaps = manifest.capabilities.filter(isDeprecatedCapability);
|
|
611
|
+
if (deprecatedCaps.length > 0) {
|
|
612
|
+
consola.warn("Plugin uses deprecated capability names. Rename them before publishing:");
|
|
613
|
+
for (const cap of deprecatedCaps) {
|
|
614
|
+
const replacement = CAPABILITY_RENAMES[cap];
|
|
615
|
+
consola.warn(` ${cap} → ${replacement}`);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (resolvedPlugin.admin?.portableTextBlocks && resolvedPlugin.admin.portableTextBlocks.length > 0) consola.warn("Plugin declares portableTextBlocks — these require trusted mode and will be ignored in sandboxed plugins");
|
|
619
|
+
if (resolvedPlugin.admin?.entry) consola.warn("Plugin declares admin.entry — custom React components require trusted mode. Use Block Kit for sandboxed admin pages");
|
|
620
|
+
if (resolvedPlugin.hooks["page:fragments"]) consola.warn("Plugin declares page:fragments hook — this is trusted-only and will not work in sandboxed mode");
|
|
621
|
+
const hasAdminPages = (manifest.admin?.pages?.length ?? 0) > 0;
|
|
622
|
+
const hasAdminWidgets = (manifest.admin?.widgets?.length ?? 0) > 0;
|
|
623
|
+
if (hasAdminPages || hasAdminWidgets) {
|
|
624
|
+
if (!manifest.routes.map((r) => typeof r === "string" ? r : r.name).includes("admin")) {
|
|
625
|
+
consola.error(`Plugin declares ${hasAdminPages ? "adminPages" : ""}${hasAdminPages && hasAdminWidgets ? " and " : ""}${hasAdminWidgets ? "adminWidgets" : ""} but the sandbox entry has no "admin" route. Add an admin route handler to serve Block Kit pages.`);
|
|
626
|
+
hasErrors = true;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
const bundleEntries = await collectBundleEntries(bundleDir);
|
|
630
|
+
const sizeViolations = validateBundleSize(bundleEntries);
|
|
631
|
+
if (sizeViolations.length > 0) {
|
|
632
|
+
for (const v of sizeViolations) consola.error(v);
|
|
633
|
+
hasErrors = true;
|
|
634
|
+
} else consola.info(`Bundle size: ${formatBytes(totalBundleBytes(bundleEntries))} across ${bundleEntries.length} file${bundleEntries.length === 1 ? "" : "s"}`);
|
|
635
|
+
if (hasErrors) {
|
|
636
|
+
consola.error("Bundle validation failed");
|
|
637
|
+
process.exit(1);
|
|
638
|
+
}
|
|
639
|
+
consola.success("Validation passed");
|
|
640
|
+
if (validateOnly) return;
|
|
641
|
+
await mkdir(outDir, { recursive: true });
|
|
642
|
+
const tarballName = `${manifest.id.replace(SLASH_RE, "-").replace(LEADING_AT_RE, "")}-${manifest.version}.tar.gz`;
|
|
643
|
+
const tarballPath = join(outDir, tarballName);
|
|
644
|
+
consola.start("Creating tarball...");
|
|
645
|
+
await createTarball(bundleDir, tarballPath);
|
|
646
|
+
const tarballSizeKB = ((await stat(tarballPath)).size / 1024).toFixed(1);
|
|
647
|
+
const tarballBuf = await readFile(tarballPath);
|
|
648
|
+
const checksum = createHash("sha256").update(tarballBuf).digest("hex");
|
|
649
|
+
consola.success(`Created ${tarballName} (${tarballSizeKB}KB)`);
|
|
650
|
+
consola.info(` SHA-256: ${checksum}`);
|
|
651
|
+
consola.info(` Path: ${tarballPath}`);
|
|
652
|
+
} finally {
|
|
653
|
+
if (tmpDir.endsWith(".emdash-bundle-tmp")) await rm(tmpDir, {
|
|
654
|
+
recursive: true,
|
|
655
|
+
force: true
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
//#endregion
|
|
662
|
+
export { bundle_exports as n, fileExists as r, bundleCommand as t };
|
|
663
|
+
//# sourceMappingURL=bundle-vn56sLos.mjs.map
|