emdash 0.37.0 → 0.39.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-On1sot_c.mjs +26 -0
- package/dist/action-token-On1sot_c.mjs.map +1 -0
- package/dist/activation-CaMfdBt1.mjs +382 -0
- package/dist/activation-CaMfdBt1.mjs.map +1 -0
- package/dist/adapters-Cq10K4_c.d.mts +171 -0
- package/dist/adapters-Cq10K4_c.d.mts.map +1 -0
- package/dist/after-PcEvMY_6.mjs +96 -0
- package/dist/after-PcEvMY_6.mjs.map +1 -0
- package/dist/allowed-origins-1Sa-2wZK.mjs +116 -0
- package/dist/allowed-origins-1Sa-2wZK.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -3
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +45 -29
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +7 -6
- package/dist/api-DmjKxPCY.mjs +4831 -0
- package/dist/api-DmjKxPCY.mjs.map +1 -0
- package/dist/api-tokens-BIXItFKV.mjs +163 -0
- package/dist/api-tokens-BIXItFKV.mjs.map +1 -0
- package/dist/apply-drpfmqrR.mjs +1005 -0
- package/dist/apply-drpfmqrR.mjs.map +1 -0
- package/dist/artifact-fetch-COiMhVgk.mjs +813 -0
- package/dist/artifact-fetch-COiMhVgk.mjs.map +1 -0
- package/dist/astro/index.d.mts +14 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +123 -13
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +12 -10
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +20 -11
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
- package/dist/astro/middleware/redirect.mjs +11 -9
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts +1 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +154 -28
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +13 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +122 -3041
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +10 -9
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +10 -9
- 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 +13 -12
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +13 -12
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +13 -12
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +21 -54
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/bulk.mjs +15 -14
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/index.mjs +15 -14
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +17 -16
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +19 -18
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +19 -18
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +17 -17
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +21 -20
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +19 -18
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +19 -18
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -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 +9 -66
- 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 +9 -69
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +66 -59
- 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 +65 -59
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +70 -61
- 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 +87 -63
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +66 -59
- 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 +65 -59
- 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 +85 -63
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +65 -59
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +70 -61
- 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 +90 -66
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +9 -7
- 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 +77 -63
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +67 -61
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +66 -60
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts +8 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +27 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +65 -59
- 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 +65 -59
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -10
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
- package/dist/astro/routes/api/admin/users/index.mjs +10 -9
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/complete.mjs +15 -14
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +12 -11
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +14 -13
- 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 +14 -13
- 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 +11 -10
- 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 +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +10 -9
- 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 +16 -15
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +14 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +15 -14
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +15 -14
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +15 -14
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/request.mjs +14 -13
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +15 -211
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +18 -17
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +17 -11
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts +10 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +67 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +35 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +16 -15
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts +9 -2
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +28 -16
- 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 +27 -23
- 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 +27 -23
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +27 -12
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +23 -20
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +25 -12
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +27 -14
- 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 +18 -12
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +14 -12
- 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/health.d.mts +8 -0
- package/dist/astro/routes/api/health.d.mts.map +1 -0
- package/dist/astro/routes/api/health.mjs +21 -0
- package/dist/astro/routes/api/health.mjs.map +1 -0
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +25 -23
- 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 +13 -11
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +20 -19
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -10
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +15 -14
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +14 -13
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +18 -17
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +25 -23
- 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 +13 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -33
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +17 -9
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.d.mts.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +192 -110
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +15 -14
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/replace.mjs +12 -11
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.mjs +8 -8
- package/dist/astro/routes/api/media/_id_/usage.mjs +23 -22
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +22 -21
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts +8 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +52 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs.map +1 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs +3 -3
- package/dist/astro/routes/api/media/folders/_id_.mjs +12 -11
- package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/index.mjs +12 -11
- package/dist/astro/routes/api/media/folders/index.mjs.map +1 -1
- 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 +14 -13
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +26 -25
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +15 -14
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +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 +95 -24
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts +2 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +22 -40
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +18 -14
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +18 -14
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +20 -22
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +19 -19
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +27 -23
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +21 -18
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +27 -23
- 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 +65 -59
- 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 +65 -59
- 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 +65 -59
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +65 -59
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +65 -59
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +65 -59
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +16 -14
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +65 -59
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +65 -59
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +16 -14
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +17 -14
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +16 -14
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +10 -9
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +15 -13
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +15 -13
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +15 -13
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +9 -8
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +8 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/export.mjs +9 -8
- package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/index.mjs +10 -9
- package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +22 -20
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +16 -15
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +15 -14
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +42 -38
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +43 -38
- 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 +11 -10
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +22 -20
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +8 -8
- package/dist/astro/routes/api/typegen.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/action-token.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/action-token.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/action-token.mjs +25 -0
- package/dist/astro/routes/api/visual-editing/action-token.mjs.map +1 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +37 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +20 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +12 -11
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +16 -15
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +16 -15
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/index.mjs +16 -15
- 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 +13 -12
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +24 -19
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +14 -13
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +79 -26
- 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/authoritative-records-DbqshfKD.mjs +5172 -0
- package/dist/authoritative-records-DbqshfKD.mjs.map +1 -0
- package/dist/authorize-BXpfMpp0.mjs +40 -0
- package/dist/authorize-BXpfMpp0.mjs.map +1 -0
- package/dist/backup-BsPQdwnS.mjs +246 -0
- package/dist/backup-BsPQdwnS.mjs.map +1 -0
- package/dist/base64-DvnNgP7e.mjs +63 -0
- package/dist/base64-DvnNgP7e.mjs.map +1 -0
- package/dist/byline-Doh-wt99.mjs +906 -0
- package/dist/byline-Doh-wt99.mjs.map +1 -0
- package/dist/byline-fields-CsrdvaLV.mjs +123 -0
- package/dist/byline-fields-CsrdvaLV.mjs.map +1 -0
- package/dist/byline-registry-D6lWzXk6.mjs +406 -0
- package/dist/byline-registry-D6lWzXk6.mjs.map +1 -0
- package/dist/bylines-Cop0hkoy.mjs +214 -0
- package/dist/bylines-Cop0hkoy.mjs.map +1 -0
- package/dist/bylines-kpBzHPr8.mjs +232 -0
- package/dist/bylines-kpBzHPr8.mjs.map +1 -0
- package/dist/cache-B0pOlXdM.mjs +108 -0
- package/dist/cache-B0pOlXdM.mjs.map +1 -0
- package/dist/capture-triggers-gxQxnxrJ.mjs +362 -0
- package/dist/capture-triggers-gxQxnxrJ.mjs.map +1 -0
- package/dist/challenge-store-CkRdSdd8.mjs +51 -0
- package/dist/challenge-store-CkRdSdd8.mjs.map +1 -0
- package/dist/checksum-Bsi2D9M1.mjs +162 -0
- package/dist/checksum-Bsi2D9M1.mjs.map +1 -0
- package/dist/chrome-tags-D7LGB91U.mjs +24 -0
- package/dist/chrome-tags-D7LGB91U.mjs.map +1 -0
- package/dist/chunks-BmWyou79.mjs +25 -0
- package/dist/chunks-BmWyou79.mjs.map +1 -0
- package/dist/cli/index.mjs +921 -106
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +17 -7
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +17 -12
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-deletion-C3Xixmkx.mjs +436 -0
- package/dist/collection-deletion-C3Xixmkx.mjs.map +1 -0
- package/dist/collection-slugs-cache-D9auiKmI.mjs +85 -0
- package/dist/collection-slugs-cache-D9auiKmI.mjs.map +1 -0
- package/dist/comment-DcT8qdPK.mjs +313 -0
- package/dist/comment-DcT8qdPK.mjs.map +1 -0
- package/dist/comment-reaction-DY5-y8Y5.mjs +85 -0
- package/dist/comment-reaction-DY5-y8Y5.mjs.map +1 -0
- package/dist/comments-B67VRNGw.mjs +204 -0
- package/dist/comments-B67VRNGw.mjs.map +1 -0
- package/dist/comments-BVzzt6x5.mjs +99 -0
- package/dist/comments-BVzzt6x5.mjs.map +1 -0
- package/dist/components-DIl9Qzh6.mjs +108 -0
- package/dist/components-DIl9Qzh6.mjs.map +1 -0
- package/dist/config-B2acLeC5.mjs +242 -0
- package/dist/config-B2acLeC5.mjs.map +1 -0
- package/dist/config-CGVeT8Hc.mjs +73 -0
- package/dist/config-CGVeT8Hc.mjs.map +1 -0
- package/dist/config-D3HhLON3.d.mts +39 -0
- package/dist/config-D3HhLON3.d.mts.map +1 -0
- package/dist/config-DS7e4EZ9.d.mts +6387 -0
- package/dist/config-DS7e4EZ9.d.mts.map +1 -0
- package/dist/content-DZ3B5qtA.mjs +2216 -0
- package/dist/content-DZ3B5qtA.mjs.map +1 -0
- package/dist/content-list-query-CbPdzsna.d.mts +26 -0
- package/dist/content-list-query-CbPdzsna.d.mts.map +1 -0
- package/dist/content-policy-CM4skrNi.mjs +46 -0
- package/dist/content-policy-CM4skrNi.mjs.map +1 -0
- package/dist/content-refresh-BHLHJgyt.mjs +3599 -0
- package/dist/content-refresh-BHLHJgyt.mjs.map +1 -0
- package/dist/content-repair-BVll5WNl.mjs +440 -0
- package/dist/content-repair-BVll5WNl.mjs.map +1 -0
- package/dist/context-B195kjqZ.mjs +1835 -0
- package/dist/context-B195kjqZ.mjs.map +1 -0
- package/dist/cron-BcR3RN4K.mjs +282 -0
- package/dist/cron-BcR3RN4K.mjs.map +1 -0
- package/dist/dashboard-CZD4G7k_.mjs +151 -0
- package/dist/dashboard-CZD4G7k_.mjs.map +1 -0
- package/dist/database/migration-lock.d.mts +37 -0
- package/dist/database/migration-lock.d.mts.map +1 -0
- package/dist/database/migration-lock.mjs +76 -0
- package/dist/database/migration-lock.mjs.map +1 -0
- package/dist/database/pg-migration-lock.d.mts +1 -1
- package/dist/database/pg-migration-lock.mjs +1 -1
- package/dist/database/pg-migration-lock.mjs.map +1 -1
- package/dist/datetime-normalization-PeiEdcRY.mjs +187 -0
- package/dist/datetime-normalization-PeiEdcRY.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +4 -3
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +7 -6
- package/dist/db/libsql-migrations.mjs.map +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +7 -6
- package/dist/db/postgres-migrations.mjs.map +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +7 -6
- package/dist/db/sqlite-migrations.mjs.map +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/db-errors-CBD5yMro.mjs +55 -0
- package/dist/db-errors-CBD5yMro.mjs.map +1 -0
- package/dist/default-BtlxWgh9.mjs +81 -0
- package/dist/default-BtlxWgh9.mjs.map +1 -0
- package/dist/deferred-tasks-Ba9fphlE.d.mts +9 -0
- package/dist/deferred-tasks-Ba9fphlE.d.mts.map +1 -0
- package/dist/dev-typegen-CZaPLl3V.mjs +29 -0
- package/dist/dev-typegen-CZaPLl3V.mjs.map +1 -0
- package/dist/device-flow-3E5l0fpH.mjs +466 -0
- package/dist/device-flow-3E5l0fpH.mjs.map +1 -0
- package/dist/dialect-helpers-CtYdsX4W.mjs +307 -0
- package/dist/dialect-helpers-CtYdsX4W.mjs.map +1 -0
- package/dist/direct-executor-ZI8E01Yt.mjs +104 -0
- package/dist/direct-executor-ZI8E01Yt.mjs.map +1 -0
- package/dist/dist-2hDLsLeq.mjs +810 -0
- package/dist/dist-2hDLsLeq.mjs.map +1 -0
- package/dist/email-console-gc-E3Eqj.mjs +50 -0
- package/dist/email-console-gc-E3Eqj.mjs.map +1 -0
- package/dist/emdash-runtime-DZGinqTL.mjs +4041 -0
- package/dist/emdash-runtime-DZGinqTL.mjs.map +1 -0
- package/dist/enrich-C2Mk0lwE.mjs +194 -0
- package/dist/enrich-C2Mk0lwE.mjs.map +1 -0
- package/dist/entry-lock-D3C99MXS.mjs +1520 -0
- package/dist/entry-lock-D3C99MXS.mjs.map +1 -0
- package/dist/entry-lock-D9rnj2Lu.mjs +163 -0
- package/dist/entry-lock-D9rnj2Lu.mjs.map +1 -0
- package/dist/entry-lock-DX7QkqEg.d.mts +3503 -0
- package/dist/entry-lock-DX7QkqEg.d.mts.map +1 -0
- package/dist/entry-locks-CO_KaoU5.mjs +167 -0
- package/dist/entry-locks-CO_KaoU5.mjs.map +1 -0
- package/dist/error-CCTCskie.mjs +90 -0
- package/dist/error-CCTCskie.mjs.map +1 -0
- package/dist/errors-W3PA8HqB.mjs +447 -0
- package/dist/errors-W3PA8HqB.mjs.map +1 -0
- package/dist/escape-DN4Qmjsl.mjs +9 -0
- package/dist/escape-DN4Qmjsl.mjs.map +1 -0
- package/dist/field-defs-cache-B337z8UJ.mjs +77 -0
- package/dist/field-defs-cache-B337z8UJ.mjs.map +1 -0
- package/dist/focal-point-Gr34o-4o.mjs +23 -0
- package/dist/focal-point-Gr34o-4o.mjs.map +1 -0
- package/dist/fts-manager-DMb0sbIQ.mjs +413 -0
- package/dist/fts-manager-DMb0sbIQ.mjs.map +1 -0
- package/dist/hash-CLVFzWvx.mjs +37 -0
- package/dist/hash-CLVFzWvx.mjs.map +1 -0
- package/dist/hook-result-KY1jq21o.d.mts +31 -0
- package/dist/hook-result-KY1jq21o.d.mts.map +1 -0
- package/dist/hreflang-BgS2FqhH.d.mts +50 -0
- package/dist/hreflang-BgS2FqhH.d.mts.map +1 -0
- package/dist/hreflang-CrJwqoeb.mjs +105 -0
- package/dist/hreflang-CrJwqoeb.mjs.map +1 -0
- package/dist/http-route-dispatch-DAKlanXb.mjs +339 -0
- package/dist/http-route-dispatch-DAKlanXb.mjs.map +1 -0
- package/dist/identity-DRGSHEEr.mjs +35 -0
- package/dist/identity-DRGSHEEr.mjs.map +1 -0
- package/dist/import-DFr5B_hC.mjs +2020 -0
- package/dist/import-DFr5B_hC.mjs.map +1 -0
- package/dist/index-CDwKDkTq.d.mts +623 -0
- package/dist/index-CDwKDkTq.d.mts.map +1 -0
- package/dist/index.d.mts +27 -22
- package/dist/index.mjs +101 -86
- package/dist/init-lock-4eRRB4Le.mjs +56 -0
- package/dist/init-lock-4eRRB4Le.mjs.map +1 -0
- package/dist/install-finalization-5Os-QZ-2.mjs +58 -0
- package/dist/install-finalization-5Os-QZ-2.mjs.map +1 -0
- package/dist/lifecycle-7e-Lt_kX.mjs +25 -0
- package/dist/lifecycle-7e-Lt_kX.mjs.map +1 -0
- package/dist/load-Cu5bvCZh.mjs +28 -0
- package/dist/load-Cu5bvCZh.mjs.map +1 -0
- package/dist/loader-t4TxaFiQ.mjs +1004 -0
- package/dist/loader-t4TxaFiQ.mjs.map +1 -0
- package/dist/manifest-builder-D31UoJCu.mjs +189 -0
- package/dist/manifest-builder-D31UoJCu.mjs.map +1 -0
- package/dist/manifest-schema-Bkh8SeHd.mjs +491 -0
- package/dist/manifest-schema-Bkh8SeHd.mjs.map +1 -0
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +4 -4
- package/dist/media/local-runtime.d.mts +14 -12
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +12 -11
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media-TBlKCwo7.mjs +334 -0
- package/dist/media-TBlKCwo7.mjs.map +1 -0
- package/dist/media-allowlist-s60eAIf6.mjs +44 -0
- package/dist/media-allowlist-s60eAIf6.mjs.map +1 -0
- package/dist/media-folders-ClIRLUQv.mjs +210 -0
- package/dist/media-folders-ClIRLUQv.mjs.map +1 -0
- package/dist/media-url-DY_ijO3B.mjs +43 -0
- package/dist/media-url-DY_ijO3B.mjs.map +1 -0
- package/dist/media-usage-C4NolTpQ.mjs +1833 -0
- package/dist/media-usage-C4NolTpQ.mjs.map +1 -0
- package/dist/media-usage-activation-CAhmb14O.mjs +78 -0
- package/dist/media-usage-activation-CAhmb14O.mjs.map +1 -0
- package/dist/media-usage-work-Cu5DqewW.mjs +586 -0
- package/dist/media-usage-work-Cu5DqewW.mjs.map +1 -0
- package/dist/media-usage-work-DJr3rOEN.mjs +152 -0
- package/dist/media-usage-work-DJr3rOEN.mjs.map +1 -0
- package/dist/media-usage-write-fence-DW5oHT7q.mjs +42 -0
- package/dist/media-usage-write-fence-DW5oHT7q.mjs.map +1 -0
- package/dist/menus-DbgU9z5Q.mjs +3732 -0
- package/dist/menus-DbgU9z5Q.mjs.map +1 -0
- package/dist/menus-Wy8m5NcH.mjs +753 -0
- package/dist/menus-Wy8m5NcH.mjs.map +1 -0
- package/dist/migrations/index.d.mts +2 -2
- package/dist/migrations/index.d.mts.map +1 -1
- package/dist/migrations/index.mjs +6 -5
- package/dist/mime-CCYRC4r1.mjs +36 -0
- package/dist/mime-CCYRC4r1.mjs.map +1 -0
- package/dist/mode-CkmOhFqj.mjs +23 -0
- package/dist/mode-CkmOhFqj.mjs.map +1 -0
- package/dist/node-sqlite-compat-vpVaILnb.mjs +46 -0
- package/dist/node-sqlite-compat-vpVaILnb.mjs.map +1 -0
- package/dist/normalize-dChXQjwS.mjs +191 -0
- package/dist/normalize-dChXQjwS.mjs.map +1 -0
- package/dist/oauth-authorization-DZ-R-hmx.mjs +274 -0
- package/dist/oauth-authorization-DZ-R-hmx.mjs.map +1 -0
- package/dist/oauth-clients-BMPA8vjl.mjs +266 -0
- package/dist/oauth-clients-BMPA8vjl.mjs.map +1 -0
- package/dist/oauth-state-store-0gIdb48-.mjs +50 -0
- package/dist/oauth-state-store-0gIdb48-.mjs.map +1 -0
- package/dist/oauth-user-lookup-ChVW4UWu.mjs +26 -0
- package/dist/oauth-user-lookup-ChVW4UWu.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/object-cache-DlSVbn5Y.mjs +534 -0
- package/dist/object-cache-DlSVbn5Y.mjs.map +1 -0
- package/dist/options-D5WcorD5.mjs +200 -0
- package/dist/options-D5WcorD5.mjs.map +1 -0
- package/dist/options-DAknChnw.d.mts +77 -0
- package/dist/options-DAknChnw.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.d.mts.map +1 -1
- package/dist/page/index.mjs +13 -0
- package/dist/page/index.mjs.map +1 -1
- package/dist/parse-Cr379Av9.mjs +81 -0
- package/dist/parse-Cr379Av9.mjs.map +1 -0
- package/dist/parse-tj9XLNO_.d.mts +165 -0
- package/dist/parse-tj9XLNO_.d.mts.map +1 -0
- package/dist/passkey-config-BD-wMaCf.mjs +46 -0
- package/dist/passkey-config-BD-wMaCf.mjs.map +1 -0
- package/dist/patterns-Do3iqi7N.mjs +145 -0
- package/dist/patterns-Do3iqi7N.mjs.map +1 -0
- package/dist/placeholder-CubPFn_L.d.mts +306 -0
- package/dist/placeholder-CubPFn_L.d.mts.map +1 -0
- package/dist/plugin-test-runtime.d.mts +97 -0
- package/dist/plugin-test-runtime.d.mts.map +1 -0
- package/dist/plugin-test-runtime.mjs +105 -0
- package/dist/plugin-types.d.mts +53 -15
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-types.mjs +18 -1
- package/dist/plugin-types.mjs.map +1 -0
- package/dist/plugin-utils.d.mts +12 -10
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +12 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +18 -13
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/plugins/host.d.mts +7 -0
- package/dist/plugins/host.mjs +45 -0
- package/dist/plugins/http-wire.d.mts +25 -0
- package/dist/plugins/http-wire.d.mts.map +1 -0
- package/dist/plugins/http-wire.mjs +148 -0
- package/dist/plugins/http-wire.mjs.map +1 -0
- package/dist/plugins/secret-redactor.d.mts +9 -0
- package/dist/plugins/secret-redactor.d.mts.map +1 -0
- package/dist/plugins/secret-redactor.mjs +51 -0
- package/dist/plugins/secret-redactor.mjs.map +1 -0
- package/dist/plugins-DHurtdXQ.mjs +277 -0
- package/dist/plugins-DHurtdXQ.mjs.map +1 -0
- package/dist/policy-lyZnjpwz.mjs +45 -0
- package/dist/policy-lyZnjpwz.mjs.map +1 -0
- package/dist/portable-text-oAwodbPS.mjs +286 -0
- package/dist/portable-text-oAwodbPS.mjs.map +1 -0
- package/dist/preview-Cup2bj8c.mjs +107 -0
- package/dist/preview-Cup2bj8c.mjs.map +1 -0
- package/dist/protocol-C1CNiKX4.d.mts +61 -0
- package/dist/protocol-C1CNiKX4.d.mts.map +1 -0
- package/dist/public-submission-Cs-pFMQK.mjs +245 -0
- package/dist/public-submission-Cs-pFMQK.mjs.map +1 -0
- package/dist/public-url-BWVHsfQv.mjs +101 -0
- package/dist/public-url-BWVHsfQv.mjs.map +1 -0
- package/dist/query-D-lxiOgn.mjs +890 -0
- package/dist/query-D-lxiOgn.mjs.map +1 -0
- package/dist/query-D7kHKOws.mjs +41 -0
- package/dist/query-D7kHKOws.mjs.map +1 -0
- package/dist/rate-limit-CqJn-w4h.mjs +120 -0
- package/dist/rate-limit-CqJn-w4h.mjs.map +1 -0
- package/dist/redirect-BrChFPIu.mjs +17 -0
- package/dist/redirect-BrChFPIu.mjs.map +1 -0
- package/dist/redirect-D2Yo-b6S.mjs +415 -0
- package/dist/redirect-D2Yo-b6S.mjs.map +1 -0
- package/dist/redirects-BCiTaIQ-.mjs +146 -0
- package/dist/redirects-BCiTaIQ-.mjs.map +1 -0
- package/dist/redirects-ByItliuu.mjs +644 -0
- package/dist/redirects-ByItliuu.mjs.map +1 -0
- package/dist/registry/testing.d.mts +14 -0
- package/dist/registry/testing.d.mts.map +1 -0
- package/dist/registry/testing.mjs +255 -0
- package/dist/registry/testing.mjs.map +1 -0
- package/dist/registry-CkuPoZs7.mjs +1222 -0
- package/dist/registry-CkuPoZs7.mjs.map +1 -0
- package/dist/relation-XTAtOpJO.mjs +334 -0
- package/dist/relation-XTAtOpJO.mjs.map +1 -0
- package/dist/relations-B4w-G5U9.mjs +309 -0
- package/dist/relations-B4w-G5U9.mjs.map +1 -0
- package/dist/relations-O63JWBRj.mjs +403 -0
- package/dist/relations-O63JWBRj.mjs.map +1 -0
- package/dist/request-cache-DaMhSQdx.mjs +104 -0
- package/dist/request-cache-DaMhSQdx.mjs.map +1 -0
- package/dist/request-context.d.mts +1 -1
- package/dist/request-meta-C8yl_sIs.mjs +141 -0
- package/dist/request-meta-C8yl_sIs.mjs.map +1 -0
- package/dist/resolve-BJIS8wKr.mjs +199 -0
- package/dist/resolve-BJIS8wKr.mjs.map +1 -0
- package/dist/route-wire-D66L2oaZ.mjs +197 -0
- package/dist/route-wire-D66L2oaZ.mjs.map +1 -0
- package/dist/routes-DYsTe-oR.mjs +321 -0
- package/dist/routes-DYsTe-oR.mjs.map +1 -0
- package/dist/runner-3gfxRsJG.d.mts +68 -0
- package/dist/runner-3gfxRsJG.d.mts.map +1 -0
- package/dist/runner-ClrleR8A.mjs +5502 -0
- package/dist/runner-ClrleR8A.mjs.map +1 -0
- package/dist/runtime.d.mts +13 -11
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +6 -5
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema-CPhPM9Do.mjs +420 -0
- package/dist/schema-CPhPM9Do.mjs.map +1 -0
- package/dist/schema-DEERRrKS.mjs +9 -0
- package/dist/schema-DEERRrKS.mjs.map +1 -0
- package/dist/scopes-Bn8_rCSt.mjs +27 -0
- package/dist/scopes-Bn8_rCSt.mjs.map +1 -0
- package/dist/search-lami_Ota.mjs +448 -0
- package/dist/search-lami_Ota.mjs.map +1 -0
- package/dist/secrets-DNgVgz_e.mjs +341 -0
- package/dist/secrets-DNgVgz_e.mjs.map +1 -0
- package/dist/sections-BIpd4Cxf.mjs +346 -0
- package/dist/sections-BIpd4Cxf.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +35 -31
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +27 -26
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-BtU70b7l.mjs +114 -0
- package/dist/seo-BtU70b7l.mjs.map +1 -0
- package/dist/seo-_4qmazxz.mjs +133 -0
- package/dist/seo-_4qmazxz.mjs.map +1 -0
- package/dist/service-Bpy5iTX0.mjs +150 -0
- package/dist/service-Bpy5iTX0.mjs.map +1 -0
- package/dist/session-user-BQeS2Mrb.mjs +51 -0
- package/dist/session-user-BQeS2Mrb.mjs.map +1 -0
- package/dist/settings-DmroR53o.mjs +420 -0
- package/dist/settings-DmroR53o.mjs.map +1 -0
- package/dist/settings-g2F2a3Ub.mjs +51 -0
- package/dist/settings-g2F2a3Ub.mjs.map +1 -0
- package/dist/setup-complete-BrZaXpVV.mjs +26 -0
- package/dist/setup-complete-BrZaXpVV.mjs.map +1 -0
- package/dist/setup-nonce-Cb9-884O.mjs +25 -0
- package/dist/setup-nonce-Cb9-884O.mjs.map +1 -0
- package/dist/single-flight-cache-B5O2qhO1.mjs +104 -0
- package/dist/single-flight-cache-B5O2qhO1.mjs.map +1 -0
- package/dist/site-url-DjhYCaep.mjs +16 -0
- package/dist/site-url-DjhYCaep.mjs.map +1 -0
- package/dist/slugify-T5GHH42D.mjs +17 -0
- package/dist/slugify-T5GHH42D.mjs.map +1 -0
- package/dist/snapshot-C32Xuv3o.mjs +233 -0
- package/dist/snapshot-C32Xuv3o.mjs.map +1 -0
- package/dist/ssrf-Co1GGFZz.mjs +406 -0
- package/dist/ssrf-Co1GGFZz.mjs.map +1 -0
- package/dist/state-C7gCoiHr.mjs +153 -0
- package/dist/state-C7gCoiHr.mjs.map +1 -0
- package/dist/status-DLoBmcDz.mjs +30 -0
- package/dist/status-DLoBmcDz.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-CPctdMKX.d.mts +1519 -0
- package/dist/storage-query-CPctdMKX.d.mts.map +1 -0
- package/dist/target-CUKlGrXb.mjs +27 -0
- package/dist/target-CUKlGrXb.mjs.map +1 -0
- package/dist/taxonomies-BpqpXJUE.mjs +707 -0
- package/dist/taxonomies-BpqpXJUE.mjs.map +1 -0
- package/dist/taxonomies-ClCo4IGO.mjs +899 -0
- package/dist/taxonomies-ClCo4IGO.mjs.map +1 -0
- package/dist/taxonomy-Dj1vpw5E.mjs +508 -0
- package/dist/taxonomy-Dj1vpw5E.mjs.map +1 -0
- package/dist/tokens-Ns02GAma.mjs +171 -0
- package/dist/tokens-Ns02GAma.mjs.map +1 -0
- package/dist/transaction-BcJO4Tmc.mjs +29 -0
- package/dist/transaction-BcJO4Tmc.mjs.map +1 -0
- package/dist/transport-B8P1xsqk.mjs +136 -0
- package/dist/transport-B8P1xsqk.mjs.map +1 -0
- package/dist/transport-BLHZZcD_.d.mts +42 -0
- package/dist/transport-BLHZZcD_.d.mts.map +1 -0
- package/dist/trusted-proxy-Cg7SuD15.mjs +51 -0
- package/dist/trusted-proxy-Cg7SuD15.mjs.map +1 -0
- package/dist/turnstile-DWCSh_Qc.mjs +53 -0
- package/dist/turnstile-DWCSh_Qc.mjs.map +1 -0
- package/dist/types-B3RkqvDW.mjs +156 -0
- package/dist/types-B3RkqvDW.mjs.map +1 -0
- package/dist/types-BkUg2yHx.mjs +92 -0
- package/dist/types-BkUg2yHx.mjs.map +1 -0
- package/dist/types-BtuppOTV.mjs +16 -0
- package/dist/types-BtuppOTV.mjs.map +1 -0
- package/dist/types-CCR3ivXE.d.mts +363 -0
- package/dist/types-CCR3ivXE.d.mts.map +1 -0
- package/dist/types-CSHgU_-_.mjs +18 -0
- package/dist/types-CSHgU_-_.mjs.map +1 -0
- package/dist/types-CbwqGOXm.d.mts +766 -0
- package/dist/types-CbwqGOXm.d.mts.map +1 -0
- package/dist/types-D4RGIc2I.d.mts +198 -0
- package/dist/types-D4RGIc2I.d.mts.map +1 -0
- package/dist/types-DEHidMEk.d.mts +1637 -0
- package/dist/types-DEHidMEk.d.mts.map +1 -0
- package/dist/types-DQeU2SR7.d.mts +279 -0
- package/dist/types-DQeU2SR7.d.mts.map +1 -0
- package/dist/types-DxQWoQLA.d.mts +264 -0
- package/dist/types-DxQWoQLA.d.mts.map +1 -0
- package/dist/types-FBBnGZ2Y.d.mts +198 -0
- package/dist/types-FBBnGZ2Y.d.mts.map +1 -0
- package/dist/types-ZCnlropY.mjs +69 -0
- package/dist/types-ZCnlropY.mjs.map +1 -0
- package/dist/types-_Qtyawiy.d.mts +124 -0
- package/dist/types-_Qtyawiy.d.mts.map +1 -0
- package/dist/types-gC6FAoa_.d.mts +75 -0
- package/dist/types-gC6FAoa_.d.mts.map +1 -0
- package/dist/types-k--LneIF.mjs +22 -0
- package/dist/types-k--LneIF.mjs.map +1 -0
- package/dist/upload-attempts-2xdnoKGe.mjs +27 -0
- package/dist/upload-attempts-2xdnoKGe.mjs.map +1 -0
- package/dist/url-pattern-3m3reMzr.mjs +33 -0
- package/dist/url-pattern-3m3reMzr.mjs.map +1 -0
- package/dist/user-DroRntkx.mjs +171 -0
- package/dist/user-DroRntkx.mjs.map +1 -0
- package/dist/utils-CC2oNGV8.mjs +435 -0
- package/dist/utils-CC2oNGV8.mjs.map +1 -0
- package/dist/validate-BCP9HNDn.mjs +384 -0
- package/dist/validate-BCP9HNDn.mjs.map +1 -0
- package/dist/validate-CyQ7I3xF.d.mts +410 -0
- package/dist/validate-CyQ7I3xF.d.mts.map +1 -0
- package/dist/validate-DANX1-Qi.mjs +120 -0
- package/dist/validate-DANX1-Qi.mjs.map +1 -0
- package/dist/validation-DBy6WF94.mjs +216 -0
- package/dist/validation-DBy6WF94.mjs.map +1 -0
- package/dist/version-B57E4Uo7.mjs +7 -0
- package/dist/version-B57E4Uo7.mjs.map +1 -0
- package/dist/widgets-wQ7Xcgq8.mjs +126 -0
- package/dist/widgets-wQ7Xcgq8.mjs.map +1 -0
- package/dist/wxr-taxonomies-DIHfvEDt.mjs +406 -0
- package/dist/wxr-taxonomies-DIHfvEDt.mjs.map +1 -0
- package/dist/wxr-taxonomies-DU2ZSiGc.d.mts +34 -0
- package/dist/wxr-taxonomies-DU2ZSiGc.d.mts.map +1 -0
- package/dist/zod-generator-D_yHIWfs.mjs +329 -0
- package/dist/zod-generator-D_yHIWfs.mjs.map +1 -0
- package/package.json +39 -12
- package/src/api/errors.ts +23 -0
- package/src/api/handlers/backup.ts +11 -5
- package/src/api/handlers/content.ts +226 -85
- package/src/api/handlers/dashboard.ts +31 -1
- package/src/api/handlers/entry-lock.ts +206 -0
- package/src/api/handlers/index.ts +3 -0
- package/src/api/handlers/manifest.ts +5 -6
- package/src/api/handlers/marketplace.ts +126 -34
- package/src/api/handlers/media-upload.ts +31 -4
- package/src/api/handlers/menus.ts +9 -0
- package/src/api/handlers/plugin-settings.ts +35 -3
- package/src/api/handlers/redirects.ts +221 -138
- package/src/api/handlers/registry.ts +75 -29
- package/src/api/handlers/revision.ts +16 -27
- package/src/api/handlers/seo.ts +10 -1
- package/src/api/handlers/snapshot.ts +87 -72
- package/src/api/handlers/taxonomies.ts +79 -5
- package/src/api/handlers/validation.ts +120 -19
- package/src/api/openapi/document.ts +133 -11
- package/src/api/schemas/content.ts +32 -12
- package/src/api/schemas/entry-lock.ts +57 -0
- package/src/api/schemas/index.ts +1 -0
- package/src/api/schemas/schema.ts +10 -1
- package/src/api/schemas/search.ts +4 -0
- package/src/api/types.ts +4 -0
- package/src/astro/integration/index.ts +22 -6
- package/src/astro/integration/routes.ts +89 -0
- package/src/astro/integration/runtime.ts +40 -24
- package/src/astro/integration/virtual-modules.ts +4 -0
- package/src/astro/integration/vite-config.ts +31 -0
- package/src/astro/middleware/auth.ts +25 -4
- package/src/astro/middleware/request-context.ts +28 -10
- package/src/astro/middleware.ts +33 -1
- package/src/astro/prefetch.ts +2 -2
- package/src/astro/routes/api/admin/comments/[id]/status.ts +22 -58
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +2 -15
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +2 -25
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +1 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +23 -4
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +12 -2
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +1 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +29 -10
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +8 -2
- package/src/astro/routes/api/admin/plugins/registry/install.ts +15 -4
- package/src/astro/routes/api/admin/plugins/registry/verify.ts +2 -1
- package/src/astro/routes/api/admin/plugins/updates.ts +6 -1
- package/src/astro/routes/api/admin/scheduled-policy-rejections/[collection]/[id].ts +34 -0
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +4 -259
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +10 -0
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +133 -0
- package/src/astro/routes/api/content/[collection]/[id]/plugin-extensions/[pluginId]/[kind]/[extensionId].ts +29 -0
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +21 -4
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +30 -1
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +15 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +27 -2
- package/src/astro/routes/api/content/[collection]/index.ts +3 -0
- package/src/astro/routes/api/health.ts +23 -0
- package/src/astro/routes/api/manifest.ts +14 -4
- package/src/astro/routes/api/mcp.ts +2 -1
- package/src/astro/routes/api/media/asset/[id]/[filename].ts +50 -0
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +13 -81
- package/src/astro/routes/api/redirects/[id].ts +0 -3
- package/src/astro/routes/api/redirects/index.ts +0 -2
- package/src/astro/routes/api/search/index.ts +1 -0
- package/src/astro/routes/api/visual-editing/action-token.ts +36 -0
- package/src/astro/routes/api/visual-editing/content/[collection]/[id]/publish.ts +32 -0
- package/src/astro/routes/api/visual-editing/toolbar-labels.ts +16 -0
- package/src/astro/routes/sitemap-[collection].xml.ts +11 -4
- package/src/astro/types.ts +83 -12
- package/src/cli/commands/bundle-utils.ts +19 -19
- package/src/cli/commands/bundle.ts +9 -6
- package/src/cli/commands/content.ts +32 -6
- package/src/cli/commands/doctor.ts +25 -0
- package/src/cli/commands/export-seed.ts +195 -56
- package/src/cli/commands/migrate.ts +71 -23
- package/src/cli/commands/publish.ts +2 -2
- package/src/client/index.ts +34 -7
- package/src/comments/public-submission.ts +246 -0
- package/src/comments/service.ts +59 -12
- package/src/components/EmDashBodyEnd.astro +4 -1
- package/src/components/EmDashBodyStart.astro +4 -1
- package/src/components/EmDashHead.astro +36 -16
- package/src/components/Gallery.astro +18 -4
- package/src/components/InlineEditor.astro +3 -1
- package/src/components/InlinePortableTextEditor.tsx +106 -11
- package/src/components/PortableText.astro +4 -0
- package/src/components/Table.astro +147 -62
- package/src/components/widgets/Archives.astro +6 -5
- package/src/config/errors.ts +13 -0
- package/src/config/secrets.ts +25 -11
- package/src/content/converters/portable-text-to-prosemirror.ts +26 -2
- package/src/content/converters/prosemirror-to-portable-text.ts +35 -6
- package/src/content/converters/types.ts +10 -0
- package/src/content/known-fields.ts +44 -0
- package/src/database/connection.ts +5 -1
- package/src/database/content-datetime.ts +123 -0
- package/src/database/datetime-storage.ts +452 -0
- package/src/database/dialect-helpers.ts +161 -1
- package/src/database/migration-lock.ts +140 -0
- package/src/database/migrations/075_entry_edit_locks.ts +44 -0
- package/src/database/migrations/076_collection_nav_group.ts +22 -0
- package/src/database/migrations/077_plugin_storage_revisions.ts +89 -0
- package/src/database/migrations/078_menu_item_translation_groups.ts +15 -0
- package/src/database/migrations/079_datetime_normalization.ts +13 -0
- package/src/database/migrations/080_content_translation_locale_unique.ts +88 -0
- package/src/database/migrations/081_redirect_write_guards.ts +257 -0
- package/src/database/migrations/082_taxonomy_translation_locale_unique.ts +49 -0
- package/src/database/migrations/runner.ts +63 -15
- package/src/database/pg-migration-lock.ts +2 -2
- package/src/database/repositories/byline.ts +9 -0
- package/src/database/repositories/comment.ts +86 -0
- package/src/database/repositories/content.ts +560 -69
- package/src/database/repositories/entry-locks.ts +257 -0
- package/src/database/repositories/media.ts +35 -4
- package/src/database/repositories/menu.ts +1 -0
- package/src/database/repositories/options.ts +113 -7
- package/src/database/repositories/plugin-storage.ts +159 -0
- package/src/database/repositories/redirect.ts +262 -56
- package/src/database/repositories/revision.ts +116 -17
- package/src/database/repositories/taxonomy.ts +42 -0
- package/src/database/repositories/types.ts +5 -0
- package/src/database/types.ts +26 -1
- package/src/datetime-normalization.ts +311 -0
- package/src/db/node-sqlite-compat.ts +3 -2
- package/src/emdash-runtime.ts +1994 -424
- package/src/fields/image.ts +2 -0
- package/src/i18n/config.ts +6 -6
- package/src/i18n/resolve.ts +98 -15
- package/src/index.ts +101 -0
- package/src/loader.ts +49 -4
- package/src/mcp/server.ts +216 -68
- package/src/media/responsive.ts +23 -0
- package/src/media/usage/content-refresh.ts +2 -1
- package/src/media/usage/extractor.ts +50 -15
- package/src/media/usage/types.ts +1 -1
- package/src/menus/index.ts +64 -35
- package/src/migrations/direct-executor.ts +40 -2
- package/src/migrations/index.ts +1 -0
- package/src/migrations/protocol.ts +11 -1
- package/src/page/seo-contributions.ts +78 -1
- package/src/page/seo-panel.ts +47 -0
- package/src/plugin-test-runtime.ts +17 -0
- package/src/plugin-types.ts +128 -21
- package/src/plugins/adapt-sandbox-entry.ts +34 -27
- package/src/plugins/conditional-storage.ts +30 -0
- package/src/plugins/content-access.ts +170 -0
- package/src/plugins/content-policy.ts +74 -0
- package/src/plugins/context.ts +790 -166
- package/src/plugins/cron.ts +18 -10
- package/src/plugins/define-plugin.ts +55 -54
- package/src/plugins/editor-draft.ts +257 -0
- package/src/plugins/hooks.ts +136 -3
- package/src/plugins/host.ts +29 -0
- package/src/plugins/http-route-dispatch.ts +389 -0
- package/src/plugins/http-wire.ts +180 -0
- package/src/plugins/index.ts +97 -3
- package/src/plugins/install-finalization.ts +77 -0
- package/src/plugins/lifecycle.ts +47 -0
- package/src/plugins/manager.ts +5 -2
- package/src/plugins/manifest-schema.ts +314 -58
- package/src/plugins/media.ts +166 -0
- package/src/plugins/request-meta.ts +12 -2
- package/src/plugins/route-wire.ts +304 -0
- package/src/plugins/routes.ts +38 -5
- package/src/plugins/sandbox/index.ts +4 -0
- package/src/plugins/sandbox/proxy.ts +129 -0
- package/src/plugins/sandbox/types.ts +83 -7
- package/src/plugins/secret-redactor.ts +65 -0
- package/src/plugins/settings.ts +303 -0
- package/src/plugins/state.ts +26 -0
- package/src/plugins/storage-query.ts +45 -0
- package/src/plugins/storage-update.ts +96 -0
- package/src/plugins/types.ts +602 -15
- package/src/query.ts +84 -4
- package/src/registry/authoritative-records.ts +26 -0
- package/src/registry/config.ts +182 -31
- package/src/registry/testing.ts +100 -0
- package/src/registry/types.ts +12 -70
- package/src/scheduled-publish.ts +70 -3
- package/src/schema/collection-slugs-cache.ts +157 -0
- package/src/schema/index.ts +1 -0
- package/src/schema/registry.ts +64 -1
- package/src/schema/types.ts +32 -6
- package/src/schema/zod-generator.ts +5 -13
- package/src/search/fts-manager.ts +3 -3
- package/src/search/query.ts +32 -5
- package/src/search/types.ts +8 -0
- package/src/security/ssrf.ts +167 -141
- package/src/seed/apply.ts +41 -3
- package/src/seed/types.ts +13 -3
- package/src/seed/validate.ts +18 -1
- package/src/seo/hreflang.ts +10 -6
- package/src/seo/index.ts +5 -10
- package/src/seo/media-url.ts +26 -0
- package/src/settings/index.ts +53 -11
- package/src/taxonomies/term-counts.ts +22 -5
- package/src/visual-editing/action-token.ts +31 -0
- package/src/visual-editing/toolbar-bootstrap.ts +31 -6
- package/src/visual-editing/toolbar.ts +103 -12
- package/src/widgets/archives.ts +10 -9
- package/src/widgets/index.ts +11 -1
- package/dist/activation-K0kGBWuJ.mjs +0 -382
- package/dist/activation-K0kGBWuJ.mjs.map +0 -1
- package/dist/adapters-BDQwg236.d.mts +0 -171
- package/dist/adapters-BDQwg236.d.mts.map +0 -1
- package/dist/after-CBU2vkoO.mjs +0 -96
- package/dist/after-CBU2vkoO.mjs.map +0 -1
- package/dist/allowed-origins-BGglilcs.mjs +0 -116
- package/dist/allowed-origins-BGglilcs.mjs.map +0 -1
- package/dist/api-Dz6rgoa3.mjs +0 -10040
- package/dist/api-Dz6rgoa3.mjs.map +0 -1
- package/dist/api-tokens-BSsQACNe.mjs +0 -163
- package/dist/api-tokens-BSsQACNe.mjs.map +0 -1
- package/dist/apply-B4SIOxR1.mjs +0 -980
- package/dist/apply-B4SIOxR1.mjs.map +0 -1
- package/dist/authorize-Bkf_UHhD.mjs +0 -40
- package/dist/authorize-Bkf_UHhD.mjs.map +0 -1
- package/dist/backup-rwVAl9NI.mjs +0 -241
- package/dist/backup-rwVAl9NI.mjs.map +0 -1
- package/dist/base64-CvLhUKQv.mjs +0 -63
- package/dist/base64-CvLhUKQv.mjs.map +0 -1
- package/dist/bundle-C8S2Zl6U.mjs +0 -663
- package/dist/bundle-C8S2Zl6U.mjs.map +0 -1
- package/dist/byline-DuhF7NWl.mjs +0 -902
- package/dist/byline-DuhF7NWl.mjs.map +0 -1
- package/dist/byline-fields-BovY4KYM.mjs +0 -123
- package/dist/byline-fields-BovY4KYM.mjs.map +0 -1
- package/dist/byline-registry-Bpu9-MVs.mjs +0 -406
- package/dist/byline-registry-Bpu9-MVs.mjs.map +0 -1
- package/dist/bylines-CJ5nd6Lw.mjs +0 -232
- package/dist/bylines-CJ5nd6Lw.mjs.map +0 -1
- package/dist/bylines-RwBAeOF1.mjs +0 -214
- package/dist/bylines-RwBAeOF1.mjs.map +0 -1
- package/dist/cache-BF5Kvn59.mjs +0 -108
- package/dist/cache-BF5Kvn59.mjs.map +0 -1
- package/dist/capture-triggers-CNW1q3HK.mjs +0 -362
- package/dist/capture-triggers-CNW1q3HK.mjs.map +0 -1
- package/dist/challenge-store-DQN_Yrck.mjs +0 -51
- package/dist/challenge-store-DQN_Yrck.mjs.map +0 -1
- package/dist/chrome-tags-D8fiZG94.mjs +0 -24
- package/dist/chrome-tags-D8fiZG94.mjs.map +0 -1
- package/dist/chunks-C4szrD8o.mjs +0 -25
- package/dist/chunks-C4szrD8o.mjs.map +0 -1
- package/dist/collection-deletion-Bj07NHbj.mjs +0 -436
- package/dist/collection-deletion-Bj07NHbj.mjs.map +0 -1
- package/dist/comment-reaction-BhrvSHml.mjs +0 -85
- package/dist/comment-reaction-BhrvSHml.mjs.map +0 -1
- package/dist/comment-vxOzWbZN.mjs +0 -255
- package/dist/comment-vxOzWbZN.mjs.map +0 -1
- package/dist/comments-Ct4ensnf.mjs +0 -204
- package/dist/comments-Ct4ensnf.mjs.map +0 -1
- package/dist/components-DJbo1z0S.mjs +0 -108
- package/dist/components-DJbo1z0S.mjs.map +0 -1
- package/dist/config-B9eZ340f.d.mts +0 -34
- package/dist/config-B9eZ340f.d.mts.map +0 -1
- package/dist/config-C3EBstHi.mjs +0 -72
- package/dist/config-C3EBstHi.mjs.map +0 -1
- package/dist/config-it29yDLA.mjs +0 -1163
- package/dist/config-it29yDLA.mjs.map +0 -1
- package/dist/content-DjvM0T92.mjs +0 -1725
- package/dist/content-DjvM0T92.mjs.map +0 -1
- package/dist/content-list-query-Btqd4uV2.d.mts +0 -26
- package/dist/content-list-query-Btqd4uV2.d.mts.map +0 -1
- package/dist/content-refresh-Bwp-8yGy.mjs +0 -3588
- package/dist/content-refresh-Bwp-8yGy.mjs.map +0 -1
- package/dist/content-repair-Czdp7jz5.mjs +0 -440
- package/dist/content-repair-Czdp7jz5.mjs.map +0 -1
- package/dist/context-CX6gxOLW.mjs +0 -1068
- package/dist/context-CX6gxOLW.mjs.map +0 -1
- package/dist/cron-C6o7VppJ.mjs +0 -277
- package/dist/cron-C6o7VppJ.mjs.map +0 -1
- package/dist/dashboard-C2kTeeRI.mjs +0 -140
- package/dist/dashboard-C2kTeeRI.mjs.map +0 -1
- package/dist/db-errors-Cl-sKYTm.mjs +0 -55
- package/dist/db-errors-Cl-sKYTm.mjs.map +0 -1
- package/dist/default-Clra32mw.mjs +0 -81
- package/dist/default-Clra32mw.mjs.map +0 -1
- package/dist/deferred-tasks-CvDETTJO.d.mts +0 -9
- package/dist/deferred-tasks-CvDETTJO.d.mts.map +0 -1
- package/dist/dev-typegen-DzOPfsNj.mjs +0 -29
- package/dist/dev-typegen-DzOPfsNj.mjs.map +0 -1
- package/dist/device-flow-D2oCWvLJ.mjs +0 -466
- package/dist/device-flow-D2oCWvLJ.mjs.map +0 -1
- package/dist/dialect-helpers-BSbfaO3F.mjs +0 -202
- package/dist/dialect-helpers-BSbfaO3F.mjs.map +0 -1
- package/dist/direct-executor-Bfa5_ToE.mjs +0 -85
- package/dist/direct-executor-Bfa5_ToE.mjs.map +0 -1
- package/dist/dist-89xCrGqi.mjs +0 -810
- package/dist/dist-89xCrGqi.mjs.map +0 -1
- package/dist/email-console-Dzb6uGYa.mjs +0 -50
- package/dist/email-console-Dzb6uGYa.mjs.map +0 -1
- package/dist/enrich-BX0IDp4z.mjs +0 -194
- package/dist/enrich-BX0IDp4z.mjs.map +0 -1
- package/dist/error-DFrQjppn.mjs +0 -90
- package/dist/error-DFrQjppn.mjs.map +0 -1
- package/dist/errors-DsVoDUjJ.mjs +0 -427
- package/dist/errors-DsVoDUjJ.mjs.map +0 -1
- package/dist/escape-HmHTC1Is.mjs +0 -9
- package/dist/escape-HmHTC1Is.mjs.map +0 -1
- package/dist/field-defs-cache-BM4SIRqH.mjs +0 -77
- package/dist/field-defs-cache-BM4SIRqH.mjs.map +0 -1
- package/dist/focal-point-BeWFo6Xx.mjs +0 -23
- package/dist/focal-point-BeWFo6Xx.mjs.map +0 -1
- package/dist/fts-manager-Do1BlW2r.mjs +0 -413
- package/dist/fts-manager-Do1BlW2r.mjs.map +0 -1
- package/dist/hash-3JJPlHF2.mjs +0 -37
- package/dist/hash-3JJPlHF2.mjs.map +0 -1
- package/dist/hook-result-DCh2WUpe.d.mts +0 -31
- package/dist/hook-result-DCh2WUpe.d.mts.map +0 -1
- package/dist/hreflang-B6hbAuuO.d.mts +0 -48
- package/dist/hreflang-B6hbAuuO.d.mts.map +0 -1
- package/dist/hreflang-DQbPZliA.mjs +0 -102
- package/dist/hreflang-DQbPZliA.mjs.map +0 -1
- package/dist/identity-DksvEazf.mjs +0 -35
- package/dist/identity-DksvEazf.mjs.map +0 -1
- package/dist/import-CJpaBBBT.mjs +0 -2020
- package/dist/import-CJpaBBBT.mjs.map +0 -1
- package/dist/index-BJNMCWmu.d.mts +0 -6562
- package/dist/index-BJNMCWmu.d.mts.map +0 -1
- package/dist/index-Du8K7bWa.d.mts +0 -278
- package/dist/index-Du8K7bWa.d.mts.map +0 -1
- package/dist/init-lock-DJkX6Hto.mjs +0 -56
- package/dist/init-lock-DJkX6Hto.mjs.map +0 -1
- package/dist/load-CawHjTOH.mjs +0 -28
- package/dist/load-CawHjTOH.mjs.map +0 -1
- package/dist/loader-Z8vl7zTq.mjs +0 -966
- package/dist/loader-Z8vl7zTq.mjs.map +0 -1
- package/dist/manifest-builder-COtzuca2.mjs +0 -189
- package/dist/manifest-builder-COtzuca2.mjs.map +0 -1
- package/dist/manifest-schema-BNWwR8Vd.mjs +0 -301
- package/dist/manifest-schema-BNWwR8Vd.mjs.map +0 -1
- package/dist/media-BBm8Wg3f.mjs +0 -318
- package/dist/media-BBm8Wg3f.mjs.map +0 -1
- package/dist/media-BHjus86Y.mjs +0 -464
- package/dist/media-BHjus86Y.mjs.map +0 -1
- package/dist/media-allowlist-CoTBWoDp.mjs +0 -44
- package/dist/media-allowlist-CoTBWoDp.mjs.map +0 -1
- package/dist/media-folders-BGkATs8n.mjs +0 -210
- package/dist/media-folders-BGkATs8n.mjs.map +0 -1
- package/dist/media-upload-BCidR-EY.mjs +0 -147
- package/dist/media-upload-BCidR-EY.mjs.map +0 -1
- package/dist/media-url-DHoPr0hq.mjs +0 -26
- package/dist/media-url-DHoPr0hq.mjs.map +0 -1
- package/dist/media-usage-CdY5jhSR.mjs +0 -1833
- package/dist/media-usage-CdY5jhSR.mjs.map +0 -1
- package/dist/media-usage-activation-BgeMtK5C.mjs +0 -78
- package/dist/media-usage-activation-BgeMtK5C.mjs.map +0 -1
- package/dist/media-usage-work-CnGCdHxx.mjs +0 -152
- package/dist/media-usage-work-CnGCdHxx.mjs.map +0 -1
- package/dist/media-usage-work-D6D9sMCA.mjs +0 -586
- package/dist/media-usage-work-D6D9sMCA.mjs.map +0 -1
- package/dist/media-usage-write-fence-hjeD4u7s.mjs +0 -42
- package/dist/media-usage-write-fence-hjeD4u7s.mjs.map +0 -1
- package/dist/menus-6qSwTNxG.mjs +0 -4010
- package/dist/menus-6qSwTNxG.mjs.map +0 -1
- package/dist/menus-uvPLXMZf.mjs +0 -744
- package/dist/menus-uvPLXMZf.mjs.map +0 -1
- package/dist/mime-CUIG6x84.mjs +0 -36
- package/dist/mime-CUIG6x84.mjs.map +0 -1
- package/dist/mode-DN_WneRx.mjs +0 -23
- package/dist/mode-DN_WneRx.mjs.map +0 -1
- package/dist/node-sqlite-compat-BuJXIeMz.mjs +0 -46
- package/dist/node-sqlite-compat-BuJXIeMz.mjs.map +0 -1
- package/dist/normalize-C2xNjTSG.mjs +0 -191
- package/dist/normalize-C2xNjTSG.mjs.map +0 -1
- package/dist/oauth-authorization-Dj6Kwc21.mjs +0 -274
- package/dist/oauth-authorization-Dj6Kwc21.mjs.map +0 -1
- package/dist/oauth-clients-FD7I0J8m.mjs +0 -266
- package/dist/oauth-clients-FD7I0J8m.mjs.map +0 -1
- package/dist/oauth-state-store-DkmDOmHs.mjs +0 -50
- package/dist/oauth-state-store-DkmDOmHs.mjs.map +0 -1
- package/dist/oauth-user-lookup-CvIwGpYd.mjs +0 -26
- package/dist/oauth-user-lookup-CvIwGpYd.mjs.map +0 -1
- package/dist/object-cache-DVKnyOfy.mjs +0 -534
- package/dist/object-cache-DVKnyOfy.mjs.map +0 -1
- package/dist/options-BHPeIbBd.mjs +0 -117
- package/dist/options-BHPeIbBd.mjs.map +0 -1
- package/dist/options-CYb4y7hM.d.mts +0 -221
- package/dist/options-CYb4y7hM.d.mts.map +0 -1
- package/dist/parse-Ckpg-Qfp.mjs +0 -81
- package/dist/parse-Ckpg-Qfp.mjs.map +0 -1
- package/dist/passkey-config-O_lj3y0k.mjs +0 -46
- package/dist/passkey-config-O_lj3y0k.mjs.map +0 -1
- package/dist/patterns-D9iDO3j8.mjs +0 -145
- package/dist/patterns-D9iDO3j8.mjs.map +0 -1
- package/dist/placeholder-4X9BrRrp.d.mts +0 -306
- package/dist/placeholder-4X9BrRrp.d.mts.map +0 -1
- package/dist/policy-Dhtwntrt.mjs +0 -45
- package/dist/policy-Dhtwntrt.mjs.map +0 -1
- package/dist/portable-text-U85hOafW.mjs +0 -286
- package/dist/portable-text-U85hOafW.mjs.map +0 -1
- package/dist/preview-B_vJLvf8.mjs +0 -107
- package/dist/preview-B_vJLvf8.mjs.map +0 -1
- package/dist/protocol-JdD2YhY9.d.mts +0 -52
- package/dist/protocol-JdD2YhY9.d.mts.map +0 -1
- package/dist/public-url-CarhZJgf.mjs +0 -101
- package/dist/public-url-CarhZJgf.mjs.map +0 -1
- package/dist/query-BZKZcG5b.mjs +0 -881
- package/dist/query-BZKZcG5b.mjs.map +0 -1
- package/dist/query-BndaFxxp.mjs +0 -41
- package/dist/query-BndaFxxp.mjs.map +0 -1
- package/dist/rate-limit-BZmATC6W.mjs +0 -120
- package/dist/rate-limit-BZmATC6W.mjs.map +0 -1
- package/dist/redirect-CZkbozu9.mjs +0 -313
- package/dist/redirect-CZkbozu9.mjs.map +0 -1
- package/dist/redirect-CzqnLxK-.mjs +0 -17
- package/dist/redirect-CzqnLxK-.mjs.map +0 -1
- package/dist/redirects-BLNOWQTn.mjs +0 -1238
- package/dist/redirects-BLNOWQTn.mjs.map +0 -1
- package/dist/redirects-CqzNM0KM.mjs +0 -579
- package/dist/redirects-CqzNM0KM.mjs.map +0 -1
- package/dist/registry-AZAsRsor.mjs +0 -1179
- package/dist/registry-AZAsRsor.mjs.map +0 -1
- package/dist/relation-04DfKRTO.mjs +0 -334
- package/dist/relation-04DfKRTO.mjs.map +0 -1
- package/dist/relations-C4htk5sb.mjs +0 -309
- package/dist/relations-C4htk5sb.mjs.map +0 -1
- package/dist/relations-CcFwDJdJ.mjs +0 -403
- package/dist/relations-CcFwDJdJ.mjs.map +0 -1
- package/dist/relations-DnRK4YIT.d.mts +0 -3354
- package/dist/relations-DnRK4YIT.d.mts.map +0 -1
- package/dist/request-cache-DH9zdCOD.mjs +0 -104
- package/dist/request-cache-DH9zdCOD.mjs.map +0 -1
- package/dist/request-meta-DYxLlnmz.mjs +0 -140
- package/dist/request-meta-DYxLlnmz.mjs.map +0 -1
- package/dist/resolve-prZ3mP7l.mjs +0 -143
- package/dist/resolve-prZ3mP7l.mjs.map +0 -1
- package/dist/runner-BLIDKpmA.mjs +0 -4676
- package/dist/runner-BLIDKpmA.mjs.map +0 -1
- package/dist/runner-YKfIMnaF.d.mts +0 -67
- package/dist/runner-YKfIMnaF.d.mts.map +0 -1
- package/dist/schema-CGnBeLiW.mjs +0 -9
- package/dist/schema-CGnBeLiW.mjs.map +0 -1
- package/dist/schema-DYr-Vd-L.mjs +0 -420
- package/dist/schema-DYr-Vd-L.mjs.map +0 -1
- package/dist/scopes-BhWvBavj.mjs +0 -27
- package/dist/scopes-BhWvBavj.mjs.map +0 -1
- package/dist/search-C-qDk4kx.mjs +0 -439
- package/dist/search-C-qDk4kx.mjs.map +0 -1
- package/dist/secrets-rEtHt-6z.mjs +0 -330
- package/dist/secrets-rEtHt-6z.mjs.map +0 -1
- package/dist/sections-B_nYvlwn.mjs +0 -346
- package/dist/sections-B_nYvlwn.mjs.map +0 -1
- package/dist/seo-926NRIgt.mjs +0 -133
- package/dist/seo-926NRIgt.mjs.map +0 -1
- package/dist/seo-CVWkdv6x.mjs +0 -113
- package/dist/seo-CVWkdv6x.mjs.map +0 -1
- package/dist/service-CJl3ZAYs.mjs +0 -195
- package/dist/service-CJl3ZAYs.mjs.map +0 -1
- package/dist/session-user-BlMgqCHS.mjs +0 -51
- package/dist/session-user-BlMgqCHS.mjs.map +0 -1
- package/dist/settings--wobrkkC.mjs +0 -258
- package/dist/settings--wobrkkC.mjs.map +0 -1
- package/dist/settings-Cwm6o2jY.mjs +0 -51
- package/dist/settings-Cwm6o2jY.mjs.map +0 -1
- package/dist/setup-complete-DQbClIN2.mjs +0 -26
- package/dist/setup-complete-DQbClIN2.mjs.map +0 -1
- package/dist/setup-nonce-DZCFS2sn.mjs +0 -25
- package/dist/setup-nonce-DZCFS2sn.mjs.map +0 -1
- package/dist/single-flight-cache-BPuGPdcN.mjs +0 -104
- package/dist/single-flight-cache-BPuGPdcN.mjs.map +0 -1
- package/dist/site-url-BrxA_E9H.mjs +0 -16
- package/dist/site-url-BrxA_E9H.mjs.map +0 -1
- package/dist/slugify-B994zkXC.mjs +0 -17
- package/dist/slugify-B994zkXC.mjs.map +0 -1
- package/dist/snapshot--OCDTqdb.mjs +0 -216
- package/dist/snapshot--OCDTqdb.mjs.map +0 -1
- package/dist/ssrf-5sIM5jzl.mjs +0 -349
- package/dist/ssrf-5sIM5jzl.mjs.map +0 -1
- package/dist/state-BpFVsJZB.mjs +0 -136
- package/dist/state-BpFVsJZB.mjs.map +0 -1
- package/dist/status-B777-dXz.mjs +0 -30
- package/dist/status-B777-dXz.mjs.map +0 -1
- package/dist/target-BmR0iTwz.mjs +0 -27
- package/dist/target-BmR0iTwz.mjs.map +0 -1
- package/dist/taxonomies-DkAkMupr.mjs +0 -837
- package/dist/taxonomies-DkAkMupr.mjs.map +0 -1
- package/dist/taxonomies-Wfy_Lg12.mjs +0 -698
- package/dist/taxonomies-Wfy_Lg12.mjs.map +0 -1
- package/dist/taxonomy-tJepplLL.mjs +0 -484
- package/dist/taxonomy-tJepplLL.mjs.map +0 -1
- package/dist/tokens-BCO1oruF.mjs +0 -171
- package/dist/tokens-BCO1oruF.mjs.map +0 -1
- package/dist/transaction-0KOpOyMu.mjs +0 -29
- package/dist/transaction-0KOpOyMu.mjs.map +0 -1
- package/dist/transport-Dr3qtwXC.mjs +0 -136
- package/dist/transport-Dr3qtwXC.mjs.map +0 -1
- package/dist/transport-xh6YKW2G.d.mts +0 -42
- package/dist/transport-xh6YKW2G.d.mts.map +0 -1
- package/dist/trusted-proxy-BR5F1Otp.mjs +0 -51
- package/dist/trusted-proxy-BR5F1Otp.mjs.map +0 -1
- package/dist/types-3qNFPlci.mjs +0 -16
- package/dist/types-3qNFPlci.mjs.map +0 -1
- package/dist/types-75KIqzL9.mjs +0 -142
- package/dist/types-75KIqzL9.mjs.map +0 -1
- package/dist/types-B6GrPic4.d.mts +0 -1335
- package/dist/types-B6GrPic4.d.mts.map +0 -1
- package/dist/types-BuHW4xDE.d.mts +0 -259
- package/dist/types-BuHW4xDE.d.mts.map +0 -1
- package/dist/types-C00oyCZp.d.mts +0 -198
- package/dist/types-C00oyCZp.d.mts.map +0 -1
- package/dist/types-CDtkNSFQ.d.mts +0 -75
- package/dist/types-CDtkNSFQ.d.mts.map +0 -1
- package/dist/types-CPeXo1wF.d.mts +0 -124
- package/dist/types-CPeXo1wF.d.mts.map +0 -1
- package/dist/types-CQPWhPxE.mjs +0 -92
- package/dist/types-CQPWhPxE.mjs.map +0 -1
- package/dist/types-CXFkwEGC.d.mts +0 -198
- package/dist/types-CXFkwEGC.d.mts.map +0 -1
- package/dist/types-DM3vioBY.mjs +0 -18
- package/dist/types-DM3vioBY.mjs.map +0 -1
- package/dist/types-DczELMop.d.mts +0 -363
- package/dist/types-DczELMop.d.mts.map +0 -1
- package/dist/types-DfuTR6dL.mjs +0 -3
- package/dist/types-FV23hEoW.d.mts +0 -743
- package/dist/types-FV23hEoW.d.mts.map +0 -1
- package/dist/types-xDMtUFnO.d.mts +0 -257
- package/dist/types-xDMtUFnO.d.mts.map +0 -1
- package/dist/upload-attempts-BsqoQ1fn.mjs +0 -27
- package/dist/upload-attempts-BsqoQ1fn.mjs.map +0 -1
- package/dist/url-pattern-D4c2czpJ.mjs +0 -33
- package/dist/url-pattern-D4c2czpJ.mjs.map +0 -1
- package/dist/user-BTZ40aq6.mjs +0 -171
- package/dist/user-BTZ40aq6.mjs.map +0 -1
- package/dist/utils-BKvNjjhY.mjs +0 -435
- package/dist/utils-BKvNjjhY.mjs.map +0 -1
- package/dist/validate-BpwoDOgt.mjs +0 -120
- package/dist/validate-BpwoDOgt.mjs.map +0 -1
- package/dist/validate-DE_LRwo9.mjs +0 -379
- package/dist/validate-DE_LRwo9.mjs.map +0 -1
- package/dist/validate-DUP27OYD.d.mts +0 -400
- package/dist/validate-DUP27OYD.d.mts.map +0 -1
- package/dist/validation-BMImFJ11.mjs +0 -153
- package/dist/validation-BMImFJ11.mjs.map +0 -1
- package/dist/version-Bii3suaO.mjs +0 -7
- package/dist/version-Bii3suaO.mjs.map +0 -1
- package/dist/widgets-D3gJ10xU.mjs +0 -122
- package/dist/widgets-D3gJ10xU.mjs.map +0 -1
- package/dist/wxr-taxonomies-B2Og_6rU.d.mts +0 -34
- package/dist/wxr-taxonomies-B2Og_6rU.d.mts.map +0 -1
- package/dist/wxr-taxonomies-Cxngsjwo.mjs +0 -406
- package/dist/wxr-taxonomies-Cxngsjwo.mjs.map +0 -1
- package/dist/zod-generator-BuYSQJB7.mjs +0 -331
- package/dist/zod-generator-BuYSQJB7.mjs.map +0 -1
- /package/dist/{api-tokens-BfYts-sq.mjs → api-tokens-DS1VzN7_.mjs} +0 -0
- /package/dist/{ssrf-Dg3cIT-b.mjs → ssrf-BRpTDMV6.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -1,56 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as getMigrationStatus, c as
|
|
2
|
+
import { a as getMigrationStatus, c as formatDatetimeStorageReport, i as getExactMigrationStatus, l as scanDatetimeStorage, s as runMigrations, u as __exportAll } from "../runner-ClrleR8A.mjs";
|
|
3
3
|
import { t as EmDashDatabaseError } from "../errors-9P_FDrJ_.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { a as encodeBase64url } from "../base64-
|
|
13
|
-
import "../
|
|
14
|
-
import { t as
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
4
|
+
import { n as isMissingTableError } from "../db-errors-CBD5yMro.mjs";
|
|
5
|
+
import { busyLockHeldSince, migrationLockHeldMessage } from "../database/migration-lock.mjs";
|
|
6
|
+
import { t as validateIdentifier } from "../validate-DANX1-Qi.mjs";
|
|
7
|
+
import { p as listTablesLike } from "../dialect-helpers-CtYdsX4W.mjs";
|
|
8
|
+
import { i as isI18nEnabled, r as getI18nConfig } from "../config-CGVeT8Hc.mjs";
|
|
9
|
+
import "../datetime-normalization-PeiEdcRY.mjs";
|
|
10
|
+
import "../after-PcEvMY_6.mjs";
|
|
11
|
+
import { t as OptionsRepository } from "../options-D5WcorD5.mjs";
|
|
12
|
+
import { a as encodeBase64url } from "../base64-DvnNgP7e.mjs";
|
|
13
|
+
import { n as fingerprintKey, r as generateEncryptionKey, t as EmDashSecretsError } from "../secrets-DNgVgz_e.mjs";
|
|
14
|
+
import { t as ContentRepository } from "../content-DZ3B5qtA.mjs";
|
|
15
|
+
import "../object-cache-DlSVbn5Y.mjs";
|
|
16
|
+
import { n as slugify } from "../slugify-T5GHH42D.mjs";
|
|
17
|
+
import "../types-BkUg2yHx.mjs";
|
|
18
|
+
import { t as MediaRepository } from "../media-TBlKCwo7.mjs";
|
|
19
|
+
import { t as TaxonomyRepository } from "../taxonomy-Dj1vpw5E.mjs";
|
|
20
|
+
import "../resolve-BJIS8wKr.mjs";
|
|
21
|
+
import "../redirect-D2Yo-b6S.mjs";
|
|
22
|
+
import "../request-cache-DaMhSQdx.mjs";
|
|
23
|
+
import "../byline-registry-D6lWzXk6.mjs";
|
|
24
|
+
import "../field-defs-cache-B337z8UJ.mjs";
|
|
25
|
+
import { t as BylineRepository } from "../byline-Doh-wt99.mjs";
|
|
26
|
+
import { t as imageSize } from "../dist-2hDLsLeq.mjs";
|
|
27
|
+
import "../fts-manager-DMb0sbIQ.mjs";
|
|
24
28
|
import { kyselyLogOption } from "../database/instrumentation.mjs";
|
|
25
|
-
import "../loader-
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import
|
|
31
|
-
import "../
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import "../
|
|
35
|
-
import "../ssrf-
|
|
36
|
-
import
|
|
37
|
-
import { t as
|
|
38
|
-
import {
|
|
39
|
-
import "../
|
|
40
|
-
import
|
|
41
|
-
import { t as openNodeSqliteDatabase } from "../node-sqlite-compat-
|
|
29
|
+
import "../loader-t4TxaFiQ.mjs";
|
|
30
|
+
import "../collection-slugs-cache-D9auiKmI.mjs";
|
|
31
|
+
import "../capture-triggers-gxQxnxrJ.mjs";
|
|
32
|
+
import "../activation-CaMfdBt1.mjs";
|
|
33
|
+
import "../collection-deletion-C3Xixmkx.mjs";
|
|
34
|
+
import "../content-refresh-BHLHJgyt.mjs";
|
|
35
|
+
import { n as SchemaRegistry } from "../registry-CkuPoZs7.mjs";
|
|
36
|
+
import "../settings-DmroR53o.mjs";
|
|
37
|
+
import { a as pluginManifestBaseSchema } from "../manifest-schema-Bkh8SeHd.mjs";
|
|
38
|
+
import { i as isDeprecatedCapability, n as capabilitiesToDeclaredAccess$1, r as declaredAccessToCapabilities$1, t as CAPABILITY_RENAMES } from "../types-k--LneIF.mjs";
|
|
39
|
+
import "../ssrf-Co1GGFZz.mjs";
|
|
40
|
+
import "../ssrf-BRpTDMV6.mjs";
|
|
41
|
+
import { t as validateSeed } from "../validate-BCP9HNDn.mjs";
|
|
42
|
+
import { t as applySeed } from "../apply-drpfmqrR.mjs";
|
|
43
|
+
import { a as MigrationManifestValidationError, c as normalizeAstroI18n, i as getMigrationIntegrationMetadata, n as MIGRATION_CONFIG_SYMBOL, s as validateMigrationManifest, t as buildMigrationManifest } from "../manifest-builder-D31UoJCu.mjs";
|
|
44
|
+
import "../identity-DRGSHEEr.mjs";
|
|
45
|
+
import { t as openNodeSqliteDatabase } from "../node-sqlite-compat-vpVaILnb.mjs";
|
|
42
46
|
import { LocalStorage } from "../storage/local.mjs";
|
|
43
|
-
import { t as convertDataForRead } from "../portable-text-
|
|
47
|
+
import { t as convertDataForRead } from "../portable-text-oAwodbPS.mjs";
|
|
44
48
|
import { createHeaderAwareFetch, customHeadersInterceptor, getCachedAccessToken, isAccessRedirect, resolveCustomHeaders, runCloudflaredLogin } from "../client/cf-access.mjs";
|
|
45
49
|
import { EmDashClient } from "../client/index.mjs";
|
|
46
|
-
import { r as fileExists$4, t as bundleCommand } from "../bundle-C8S2Zl6U.mjs";
|
|
47
50
|
import { createRequire } from "node:module";
|
|
48
51
|
import { Kysely, SqliteDialect, sql } from "kysely";
|
|
52
|
+
import { z } from "zod";
|
|
53
|
+
import { extractManifestRoute, extractRouteOptions, isJsonPostRouteContract } from "@emdash-cms/plugin-types";
|
|
49
54
|
import { createGzipDecoder, unpackTar } from "modern-tar";
|
|
50
55
|
import { pathToFileURL } from "node:url";
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
56
|
+
import { createHash } from "node:crypto";
|
|
57
|
+
import { access, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
58
|
+
import { basename, dirname, extname, isAbsolute, join, parse, resolve } from "node:path";
|
|
59
|
+
import { createWriteStream, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
54
60
|
import { defineCommand, runCommand, runMain } from "citty";
|
|
55
61
|
import consola, { consola as consola$1 } from "consola";
|
|
56
62
|
import pc from "picocolors";
|
|
@@ -59,6 +65,8 @@ import { homedir } from "node:os";
|
|
|
59
65
|
import { parse as parse$1, printParseErrorCode } from "jsonc-parser";
|
|
60
66
|
import { parse as parse$2 } from "smol-toml";
|
|
61
67
|
import { createInterface } from "node:readline/promises";
|
|
68
|
+
import { pipeline } from "node:stream/promises";
|
|
69
|
+
import { packTar } from "modern-tar/fs";
|
|
62
70
|
|
|
63
71
|
//#region src/cli/commands/auth.ts
|
|
64
72
|
/**
|
|
@@ -642,6 +650,10 @@ const updateCommand = defineCommand({
|
|
|
642
650
|
type: "boolean",
|
|
643
651
|
description: "Keep as draft instead of auto-publishing"
|
|
644
652
|
},
|
|
653
|
+
"override-lock": {
|
|
654
|
+
type: "boolean",
|
|
655
|
+
description: "Write even though another editor holds this entry's edit lock"
|
|
656
|
+
},
|
|
645
657
|
...connectionArgs
|
|
646
658
|
},
|
|
647
659
|
async run({ args }) {
|
|
@@ -652,9 +664,10 @@ const updateCommand = defineCommand({
|
|
|
652
664
|
const updated = await client.update(args.collection, args.id, {
|
|
653
665
|
data,
|
|
654
666
|
_rev: args.rev,
|
|
655
|
-
locale: args.locale
|
|
667
|
+
locale: args.locale,
|
|
668
|
+
overrideLock: args["override-lock"]
|
|
656
669
|
});
|
|
657
|
-
if (!args.draft && updated.draftRevisionId) await client.publish(args.collection, updated.id);
|
|
670
|
+
if (!args.draft && updated.draftRevisionId) await client.publish(args.collection, updated.id, { overrideLock: args["override-lock"] });
|
|
658
671
|
output(await client.get(args.collection, updated.id), args);
|
|
659
672
|
} catch (error) {
|
|
660
673
|
consola$1.error(error instanceof Error ? error.message : "Unknown error");
|
|
@@ -678,12 +691,16 @@ const deleteCommand$2 = defineCommand({
|
|
|
678
691
|
description: "Content item ID or slug",
|
|
679
692
|
required: true
|
|
680
693
|
},
|
|
694
|
+
"override-lock": {
|
|
695
|
+
type: "boolean",
|
|
696
|
+
description: "Write even though another editor holds this entry's edit lock"
|
|
697
|
+
},
|
|
681
698
|
...connectionArgs
|
|
682
699
|
},
|
|
683
700
|
async run({ args }) {
|
|
684
701
|
configureOutputMode(args);
|
|
685
702
|
try {
|
|
686
|
-
await createClientFromArgs(args).delete(args.collection, args.id);
|
|
703
|
+
await createClientFromArgs(args).delete(args.collection, args.id, { overrideLock: args["override-lock"] });
|
|
687
704
|
output({ success: true }, args);
|
|
688
705
|
consola$1.success(`Deleted ${args.collection}/${args.id}`);
|
|
689
706
|
} catch (error) {
|
|
@@ -708,12 +725,16 @@ const publishCommand$1 = defineCommand({
|
|
|
708
725
|
description: "Content item ID or slug",
|
|
709
726
|
required: true
|
|
710
727
|
},
|
|
728
|
+
"override-lock": {
|
|
729
|
+
type: "boolean",
|
|
730
|
+
description: "Write even though another editor holds this entry's edit lock"
|
|
731
|
+
},
|
|
711
732
|
...connectionArgs
|
|
712
733
|
},
|
|
713
734
|
async run({ args }) {
|
|
714
735
|
configureOutputMode(args);
|
|
715
736
|
try {
|
|
716
|
-
await createClientFromArgs(args).publish(args.collection, args.id);
|
|
737
|
+
await createClientFromArgs(args).publish(args.collection, args.id, { overrideLock: args["override-lock"] });
|
|
717
738
|
output({ success: true }, args);
|
|
718
739
|
consola$1.success(`Published ${args.collection}/${args.id}`);
|
|
719
740
|
} catch (error) {
|
|
@@ -738,12 +759,16 @@ const unpublishCommand = defineCommand({
|
|
|
738
759
|
description: "Content item ID or slug",
|
|
739
760
|
required: true
|
|
740
761
|
},
|
|
762
|
+
"override-lock": {
|
|
763
|
+
type: "boolean",
|
|
764
|
+
description: "Write even though another editor holds this entry's edit lock"
|
|
765
|
+
},
|
|
741
766
|
...connectionArgs
|
|
742
767
|
},
|
|
743
768
|
async run({ args }) {
|
|
744
769
|
configureOutputMode(args);
|
|
745
770
|
try {
|
|
746
|
-
await createClientFromArgs(args).unpublish(args.collection, args.id);
|
|
771
|
+
await createClientFromArgs(args).unpublish(args.collection, args.id, { overrideLock: args["override-lock"] });
|
|
747
772
|
output({ success: true }, args);
|
|
748
773
|
consola$1.success(`Unpublished ${args.collection}/${args.id}`);
|
|
749
774
|
} catch (error) {
|
|
@@ -770,15 +795,22 @@ const scheduleCommand = defineCommand({
|
|
|
770
795
|
},
|
|
771
796
|
at: {
|
|
772
797
|
type: "string",
|
|
773
|
-
description: "ISO 8601 datetime to publish at",
|
|
798
|
+
description: "ISO 8601 datetime with Z or an explicit UTC offset to publish at",
|
|
774
799
|
required: true
|
|
775
800
|
},
|
|
801
|
+
"override-lock": {
|
|
802
|
+
type: "boolean",
|
|
803
|
+
description: "Write even though another editor holds this entry's edit lock"
|
|
804
|
+
},
|
|
776
805
|
...connectionArgs
|
|
777
806
|
},
|
|
778
807
|
async run({ args }) {
|
|
779
808
|
configureOutputMode(args);
|
|
780
809
|
try {
|
|
781
|
-
await createClientFromArgs(args).schedule(args.collection, args.id, {
|
|
810
|
+
await createClientFromArgs(args).schedule(args.collection, args.id, {
|
|
811
|
+
at: args.at,
|
|
812
|
+
overrideLock: args["override-lock"]
|
|
813
|
+
});
|
|
782
814
|
output({ success: true }, args);
|
|
783
815
|
consola$1.success(`Scheduled ${args.collection}/${args.id} for ${args.at}`);
|
|
784
816
|
} catch (error) {
|
|
@@ -876,7 +908,10 @@ const contentCommand = defineCommand({
|
|
|
876
908
|
function createDatabase(config) {
|
|
877
909
|
try {
|
|
878
910
|
if (config.url.startsWith("file:") || config.url === ":memory:") return new Kysely({
|
|
879
|
-
dialect: new SqliteDialect({ database: openNodeSqliteDatabase(config.url === ":memory:" ? ":memory:" : config.url.replace("file:", ""), {
|
|
911
|
+
dialect: new SqliteDialect({ database: openNodeSqliteDatabase(config.url === ":memory:" ? ":memory:" : config.url.replace("file:", ""), {
|
|
912
|
+
journalMode: "wal",
|
|
913
|
+
readOnly: config.readOnly
|
|
914
|
+
}) }),
|
|
880
915
|
log: kyselyLogOption()
|
|
881
916
|
});
|
|
882
917
|
if (config.url.startsWith("libsql:")) {
|
|
@@ -906,7 +941,7 @@ async function readPackageJson$2(cwd) {
|
|
|
906
941
|
return null;
|
|
907
942
|
}
|
|
908
943
|
}
|
|
909
|
-
async function fileExists$
|
|
944
|
+
async function fileExists$4(path) {
|
|
910
945
|
try {
|
|
911
946
|
await access(path);
|
|
912
947
|
return true;
|
|
@@ -958,7 +993,7 @@ const devCommand = defineCommand({
|
|
|
958
993
|
process.exit(1);
|
|
959
994
|
}
|
|
960
995
|
const dbPath = resolve(cwd, args.database);
|
|
961
|
-
if (!await fileExists$
|
|
996
|
+
if (!await fileExists$4(dbPath)) consola.start("Database not found, initializing...");
|
|
962
997
|
const db = createDatabase({ url: `file:${dbPath}` });
|
|
963
998
|
try {
|
|
964
999
|
consola.start("Checking database migrations...");
|
|
@@ -997,8 +1032,8 @@ const devCommand = defineCommand({
|
|
|
997
1032
|
"--port",
|
|
998
1033
|
args.port
|
|
999
1034
|
];
|
|
1000
|
-
const pnpmLockExists = await fileExists$
|
|
1001
|
-
const yarnLockExists = await fileExists$
|
|
1035
|
+
const pnpmLockExists = await fileExists$4(resolve(cwd, "pnpm-lock.yaml"));
|
|
1036
|
+
const yarnLockExists = await fileExists$4(resolve(cwd, "yarn.lock"));
|
|
1002
1037
|
let cmd;
|
|
1003
1038
|
let cmdArgs;
|
|
1004
1039
|
if (pnpmLockExists) {
|
|
@@ -1061,7 +1096,7 @@ function triggerFix(configPath) {
|
|
|
1061
1096
|
function mainFix(configPath) {
|
|
1062
1097
|
return configPath.endsWith(".toml") ? MAIN_FIX_TOML : MAIN_FIX_JSONC;
|
|
1063
1098
|
}
|
|
1064
|
-
async function fileExists$
|
|
1099
|
+
async function fileExists$3(path) {
|
|
1065
1100
|
try {
|
|
1066
1101
|
await access(path);
|
|
1067
1102
|
return true;
|
|
@@ -1082,7 +1117,7 @@ function sourcePosition(source, offset) {
|
|
|
1082
1117
|
async function findWranglerConfig(cwd) {
|
|
1083
1118
|
for (const filename of WRANGLER_CONFIG_FILES) {
|
|
1084
1119
|
const path = resolve(cwd, filename);
|
|
1085
|
-
if (await fileExists$
|
|
1120
|
+
if (await fileExists$3(path)) return path;
|
|
1086
1121
|
}
|
|
1087
1122
|
return null;
|
|
1088
1123
|
}
|
|
@@ -1177,7 +1212,7 @@ function printResult(result) {
|
|
|
1177
1212
|
}
|
|
1178
1213
|
async function checkDatabase(dbPath) {
|
|
1179
1214
|
const results = [];
|
|
1180
|
-
if (!await fileExists$
|
|
1215
|
+
if (!await fileExists$3(dbPath)) {
|
|
1181
1216
|
results.push({
|
|
1182
1217
|
name: "database",
|
|
1183
1218
|
status: "fail",
|
|
@@ -1229,6 +1264,21 @@ async function checkDatabase(dbPath) {
|
|
|
1229
1264
|
status: "warn",
|
|
1230
1265
|
message: `found ${orphaned.length}: ${orphaned.join(", ")}`
|
|
1231
1266
|
});
|
|
1267
|
+
try {
|
|
1268
|
+
const report = await scanDatetimeStorage(db);
|
|
1269
|
+
const clean = report.noncanonicalCount === 0 && report.manualReviewCount === 0 && report.inspectionErrorCount === 0;
|
|
1270
|
+
results.push({
|
|
1271
|
+
name: "datetime storage",
|
|
1272
|
+
status: clean ? "pass" : "fail",
|
|
1273
|
+
message: clean ? `all stored content datetimes are canonical (${report.timezone})` : formatDatetimeStorageReport(report)
|
|
1274
|
+
});
|
|
1275
|
+
} catch (error) {
|
|
1276
|
+
results.push({
|
|
1277
|
+
name: "datetime storage",
|
|
1278
|
+
status: "fail",
|
|
1279
|
+
message: `could not inspect stored datetimes: ${error instanceof Error ? error.message : String(error)}`
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1232
1282
|
} catch {}
|
|
1233
1283
|
try {
|
|
1234
1284
|
const count = (await sql`SELECT COUNT(id) as count FROM users`.execute(db)).rows[0]?.count ?? 0;
|
|
@@ -1338,12 +1388,17 @@ const exportSeedCommand = defineCommand({
|
|
|
1338
1388
|
},
|
|
1339
1389
|
async run({ args }) {
|
|
1340
1390
|
const dbPath = resolve(resolve(args.cwd), args.database);
|
|
1341
|
-
|
|
1342
|
-
const db = createDatabase({
|
|
1391
|
+
process.stderr.write(`Database: ${dbPath}\n`);
|
|
1392
|
+
const db = createDatabase({
|
|
1393
|
+
url: `file:${dbPath}`,
|
|
1394
|
+
readOnly: true
|
|
1395
|
+
});
|
|
1343
1396
|
try {
|
|
1344
|
-
await
|
|
1397
|
+
const { pending, unknownApplied } = await getExactMigrationStatus(db);
|
|
1398
|
+
if (unknownApplied.length > 0) throw new Error("The database was migrated by a newer EmDash version. Upgrade EmDash before exporting it.");
|
|
1399
|
+
if (pending.length > 0) throw new Error(`The database has ${pending.length} pending migration${pending.length === 1 ? "" : "s"}. Run \`emdash migrate\` before exporting it.`);
|
|
1345
1400
|
} catch (error) {
|
|
1346
|
-
consola.error("
|
|
1401
|
+
consola.error("Export requires a current database schema:", error);
|
|
1347
1402
|
await db.destroy();
|
|
1348
1403
|
process.exit(1);
|
|
1349
1404
|
}
|
|
@@ -1507,8 +1562,10 @@ async function exportCollections(db) {
|
|
|
1507
1562
|
supports: collection.supports.length > 0 ? collection.supports : void 0,
|
|
1508
1563
|
urlPattern: collection.urlPattern || void 0,
|
|
1509
1564
|
routable: collection.routable === false ? false : void 0,
|
|
1565
|
+
editLocking: collection.editLocking === false ? false : void 0,
|
|
1510
1566
|
hidden: collection.hidden || void 0,
|
|
1511
1567
|
sortOrder: collection.sortOrder,
|
|
1568
|
+
group: collection.group,
|
|
1512
1569
|
fields: fields.map((field) => ({
|
|
1513
1570
|
slug: field.slug,
|
|
1514
1571
|
label: field.label,
|
|
@@ -1531,7 +1588,7 @@ async function exportCollections(db) {
|
|
|
1531
1588
|
* Export taxonomy definitions and terms
|
|
1532
1589
|
*/
|
|
1533
1590
|
async function exportTaxonomies(db, i18nEnabled) {
|
|
1534
|
-
const defs = await db.selectFrom("_emdash_taxonomy_defs").selectAll().orderBy(
|
|
1591
|
+
const defs = await db.selectFrom("_emdash_taxonomy_defs").selectAll().orderBy("name").orderBy("locale").execute();
|
|
1535
1592
|
const result = [];
|
|
1536
1593
|
const termRepo = new TaxonomyRepository(db);
|
|
1537
1594
|
const defGroupToSeedId = /* @__PURE__ */ new Map();
|
|
@@ -1588,7 +1645,7 @@ async function exportTaxonomies(db, i18nEnabled) {
|
|
|
1588
1645
|
* Export menus with their items
|
|
1589
1646
|
*/
|
|
1590
1647
|
async function exportMenus(db, i18nEnabled) {
|
|
1591
|
-
const menus = await db.selectFrom("_emdash_menus").selectAll().orderBy(
|
|
1648
|
+
const menus = await db.selectFrom("_emdash_menus").selectAll().orderBy("name").orderBy("locale").execute();
|
|
1592
1649
|
const result = [];
|
|
1593
1650
|
const groupToSeedId = /* @__PURE__ */ new Map();
|
|
1594
1651
|
const itemGroupToSeedId = /* @__PURE__ */ new Map();
|
|
@@ -1706,6 +1763,57 @@ async function exportWidgetAreas(db) {
|
|
|
1706
1763
|
}
|
|
1707
1764
|
return result;
|
|
1708
1765
|
}
|
|
1766
|
+
/** A reference field holds a single entry id or an array of them. */
|
|
1767
|
+
function referenceValues(value) {
|
|
1768
|
+
if (typeof value === "string") return [value];
|
|
1769
|
+
if (Array.isArray(value)) return value.filter((v) => typeof v === "string");
|
|
1770
|
+
return [];
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* For each exported collection, the other exported collections its entries
|
|
1774
|
+
* point into. Read from the values rather than a field's declared target so a
|
|
1775
|
+
* `reference` field without `options.collection` is still accounted for.
|
|
1776
|
+
*/
|
|
1777
|
+
function referenceTargets(collected, collectionsBySlug, entryIdToCollection) {
|
|
1778
|
+
const targets = /* @__PURE__ */ new Map();
|
|
1779
|
+
for (const [slug, items] of collected) {
|
|
1780
|
+
const referenceFields = (collectionsBySlug.get(slug)?.fields ?? []).filter((field) => field.type === "reference").map((field) => field.slug);
|
|
1781
|
+
if (referenceFields.length === 0) continue;
|
|
1782
|
+
const found = /* @__PURE__ */ new Set();
|
|
1783
|
+
for (const { item } of items) for (const fieldSlug of referenceFields) for (const value of referenceValues(item.data[fieldSlug])) {
|
|
1784
|
+
const target = entryIdToCollection.get(value);
|
|
1785
|
+
if (target && target !== slug) found.add(target);
|
|
1786
|
+
}
|
|
1787
|
+
if (found.size > 0) targets.set(slug, found);
|
|
1788
|
+
}
|
|
1789
|
+
return targets;
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* Order collections so a reference's target is written before the entry that
|
|
1793
|
+
* points at it. `applySeed` fills its seed-id map as it walks the file, so a
|
|
1794
|
+
* `$ref` into a collection further down resolves to nothing and is stored
|
|
1795
|
+
* verbatim.
|
|
1796
|
+
*
|
|
1797
|
+
* Depth-first, with the caller's order as the tie-break so an export without
|
|
1798
|
+
* references keeps the collection order it had. A cycle has no valid order;
|
|
1799
|
+
* the collections on it stay where they were rather than failing the export.
|
|
1800
|
+
*/
|
|
1801
|
+
function orderByReferenceTargets(slugs, targets) {
|
|
1802
|
+
const exported = new Set(slugs);
|
|
1803
|
+
const ordered = [];
|
|
1804
|
+
const placed = /* @__PURE__ */ new Set();
|
|
1805
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
1806
|
+
const visit = (slug) => {
|
|
1807
|
+
if (placed.has(slug) || visiting.has(slug)) return;
|
|
1808
|
+
visiting.add(slug);
|
|
1809
|
+
for (const target of targets.get(slug) ?? []) if (exported.has(target)) visit(target);
|
|
1810
|
+
visiting.delete(slug);
|
|
1811
|
+
placed.add(slug);
|
|
1812
|
+
ordered.push(slug);
|
|
1813
|
+
};
|
|
1814
|
+
for (const slug of slugs) visit(slug);
|
|
1815
|
+
return ordered;
|
|
1816
|
+
}
|
|
1709
1817
|
/**
|
|
1710
1818
|
* Export content from collections
|
|
1711
1819
|
*/
|
|
@@ -1732,11 +1840,13 @@ async function exportContent(db, collections, includeCollections, bylineGroupToS
|
|
|
1732
1840
|
cursor = result.nextCursor;
|
|
1733
1841
|
} while (cursor);
|
|
1734
1842
|
} catch {}
|
|
1843
|
+
const collected = /* @__PURE__ */ new Map();
|
|
1844
|
+
const entryIdToSeedId = /* @__PURE__ */ new Map();
|
|
1845
|
+
const entryIdToCollection = /* @__PURE__ */ new Map();
|
|
1735
1846
|
for (const collection of collections) {
|
|
1736
1847
|
if (includeCollections && !includeCollections.includes(collection.slug)) continue;
|
|
1737
|
-
const
|
|
1848
|
+
const items = [];
|
|
1738
1849
|
let cursor;
|
|
1739
|
-
const translationGroupToSeedId = /* @__PURE__ */ new Map();
|
|
1740
1850
|
do {
|
|
1741
1851
|
const result = await contentRepo.findMany(collection.slug, {
|
|
1742
1852
|
limit: 100,
|
|
@@ -1744,29 +1854,47 @@ async function exportContent(db, collections, includeCollections, bylineGroupToS
|
|
|
1744
1854
|
});
|
|
1745
1855
|
for (const item of result.items) {
|
|
1746
1856
|
const seedId = item.slug ? i18nEnabled && item.locale ? `${collection.slug}:${item.slug}:${item.locale}` : `${collection.slug}:${item.slug}` : item.id;
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
};
|
|
1754
|
-
if (i18nEnabled && item.locale) {
|
|
1755
|
-
entry.locale = item.locale;
|
|
1756
|
-
if (item.translationGroup) {
|
|
1757
|
-
const sourceSeedId = translationGroupToSeedId.get(item.translationGroup);
|
|
1758
|
-
if (sourceSeedId) entry.translationOf = sourceSeedId;
|
|
1759
|
-
else translationGroupToSeedId.set(item.translationGroup, seedId);
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
const taxonomies = await getTaxonomyAssignments(taxonomyRepo, collection.slug, item.id);
|
|
1763
|
-
if (Object.keys(taxonomies).length > 0) entry.taxonomies = taxonomies;
|
|
1764
|
-
const bylines = await getBylineCredits(db, collection.slug, item.id, bylineGroupToSeedId);
|
|
1765
|
-
if (bylines.length > 0) entry.bylines = bylines;
|
|
1766
|
-
entries.push(entry);
|
|
1857
|
+
items.push({
|
|
1858
|
+
item,
|
|
1859
|
+
seedId
|
|
1860
|
+
});
|
|
1861
|
+
entryIdToSeedId.set(item.id, seedId);
|
|
1862
|
+
entryIdToCollection.set(item.id, collection.slug);
|
|
1767
1863
|
}
|
|
1768
1864
|
cursor = result.nextCursor;
|
|
1769
1865
|
} while (cursor);
|
|
1866
|
+
collected.set(collection.slug, items);
|
|
1867
|
+
}
|
|
1868
|
+
const collectionsBySlug = new Map(collections.map((c) => [c.slug, c]));
|
|
1869
|
+
const orderedSlugs = orderByReferenceTargets([...collected.keys()], referenceTargets(collected, collectionsBySlug, entryIdToCollection));
|
|
1870
|
+
for (const slug of orderedSlugs) {
|
|
1871
|
+
const collection = collectionsBySlug.get(slug);
|
|
1872
|
+
const items = collected.get(slug);
|
|
1873
|
+
if (!collection || !items) continue;
|
|
1874
|
+
const entries = [];
|
|
1875
|
+
const translationGroupToSeedId = /* @__PURE__ */ new Map();
|
|
1876
|
+
for (const { item, seedId } of items) {
|
|
1877
|
+
const processedData = processDataForExport(item.data, collection.fields, mediaMap, entryIdToSeedId);
|
|
1878
|
+
const entry = {
|
|
1879
|
+
id: seedId,
|
|
1880
|
+
slug: item.slug?.trim() ? item.slug : collection.routable === false ? void 0 : item.id,
|
|
1881
|
+
status: item.status === "published" || item.status === "draft" ? item.status : void 0,
|
|
1882
|
+
data: processedData
|
|
1883
|
+
};
|
|
1884
|
+
if (i18nEnabled && item.locale) {
|
|
1885
|
+
entry.locale = item.locale;
|
|
1886
|
+
if (item.translationGroup) {
|
|
1887
|
+
const sourceSeedId = translationGroupToSeedId.get(item.translationGroup);
|
|
1888
|
+
if (sourceSeedId) entry.translationOf = sourceSeedId;
|
|
1889
|
+
else translationGroupToSeedId.set(item.translationGroup, seedId);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
const taxonomies = await getTaxonomyAssignments(taxonomyRepo, collection.slug, item.id);
|
|
1893
|
+
if (Object.keys(taxonomies).length > 0) entry.taxonomies = taxonomies;
|
|
1894
|
+
const bylines = await getBylineCredits(db, collection.slug, item.id, bylineGroupToSeedId);
|
|
1895
|
+
if (bylines.length > 0) entry.bylines = bylines;
|
|
1896
|
+
entries.push(entry);
|
|
1897
|
+
}
|
|
1770
1898
|
if (i18nEnabled && entries.length > 0) entries.sort((a, b) => {
|
|
1771
1899
|
if (a.translationOf && !b.translationOf) return 1;
|
|
1772
1900
|
if (!a.translationOf && b.translationOf) return -1;
|
|
@@ -1779,7 +1907,7 @@ async function exportContent(db, collections, includeCollections, bylineGroupToS
|
|
|
1779
1907
|
/**
|
|
1780
1908
|
* Process content data for export, converting image fields to $media syntax
|
|
1781
1909
|
*/
|
|
1782
|
-
function processDataForExport(data, fields, mediaMap) {
|
|
1910
|
+
function processDataForExport(data, fields, mediaMap, entryIdToSeedId) {
|
|
1783
1911
|
const result = {};
|
|
1784
1912
|
const fieldTypes = /* @__PURE__ */ new Map();
|
|
1785
1913
|
for (const field of fields) fieldTypes.set(field.slug, field.type);
|
|
@@ -1800,9 +1928,9 @@ function processDataForExport(data, fields, mediaMap) {
|
|
|
1800
1928
|
}
|
|
1801
1929
|
}
|
|
1802
1930
|
result[key] = value;
|
|
1803
|
-
} else if (fieldType === "reference" && typeof value === "string") result[key] = `$ref:${value}`;
|
|
1931
|
+
} else if (fieldType === "reference" && typeof value === "string") result[key] = `$ref:${entryIdToSeedId.get(value) ?? value}`;
|
|
1804
1932
|
else if (Array.isArray(value)) result[key] = value.map((item) => {
|
|
1805
|
-
if (typeof item === "string" && fieldType === "reference") return `$ref:${item}`;
|
|
1933
|
+
if (typeof item === "string" && fieldType === "reference") return `$ref:${entryIdToSeedId.get(item) ?? item}`;
|
|
1806
1934
|
return item;
|
|
1807
1935
|
});
|
|
1808
1936
|
else result[key] = value;
|
|
@@ -1849,7 +1977,7 @@ async function getTaxonomyAssignments(taxonomyRepo, collection, entryId) {
|
|
|
1849
1977
|
*
|
|
1850
1978
|
* Initialize database from template config in package.json
|
|
1851
1979
|
*/
|
|
1852
|
-
async function fileExists$
|
|
1980
|
+
async function fileExists$2(path) {
|
|
1853
1981
|
try {
|
|
1854
1982
|
await access(path);
|
|
1855
1983
|
return true;
|
|
@@ -1940,7 +2068,7 @@ const initCommand = defineCommand({
|
|
|
1940
2068
|
if (alreadyInitialized && args.force) consola.warn("Re-initializing (--force)...");
|
|
1941
2069
|
if (config?.schema) {
|
|
1942
2070
|
const schemaPath = resolve(cwd, config.schema);
|
|
1943
|
-
if (await fileExists$
|
|
2071
|
+
if (await fileExists$2(schemaPath)) {
|
|
1944
2072
|
consola.start(`Running schema: ${config.schema}`);
|
|
1945
2073
|
try {
|
|
1946
2074
|
await runSqlFile(db, schemaPath);
|
|
@@ -2707,6 +2835,9 @@ const SAFE_TARGET_KIND_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
|
2707
2835
|
const SAFE_MIGRATION_NAME_PATTERN = /^[A-Za-z0-9_.-]+$/;
|
|
2708
2836
|
const CREDENTIAL_URL_PATTERN = /:\/\/[^/\s]+@/;
|
|
2709
2837
|
const CREDENTIAL_QUERY_PATTERN = /[?&](?:auth|credential|key|password|secret|signature|token)=/i;
|
|
2838
|
+
const LOCK_ID_PATTERN = /^[1-9]\d{0,15}$/;
|
|
2839
|
+
const ISO_TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
2840
|
+
const MAX_DATE_MS = 864e13;
|
|
2710
2841
|
const MIGRATE_EXIT_CODES = Object.freeze({
|
|
2711
2842
|
success: 0,
|
|
2712
2843
|
error: 1,
|
|
@@ -2828,6 +2959,10 @@ function validateOptions(options) {
|
|
|
2828
2959
|
if (options.manifest && options.fromConfig) throw new MigrateCommandError("--manifest and --from-config cannot be used together.");
|
|
2829
2960
|
if (options.config && !options.fromConfig) throw new MigrateCommandError("--config requires --from-config.");
|
|
2830
2961
|
if (options.check && options.status) throw new MigrateCommandError("--check and --status cannot be used together.");
|
|
2962
|
+
if (options.releaseLock !== void 0) {
|
|
2963
|
+
if (options.check || options.status) throw new MigrateCommandError("--release-lock cannot be used with --check or --status.");
|
|
2964
|
+
if (!LOCK_ID_PATTERN.test(options.releaseLock)) throw new MigrateCommandError("--release-lock requires the lock id shown by --status.");
|
|
2965
|
+
}
|
|
2831
2966
|
if (options.expectedTargetFingerprint && !FINGERPRINT_PATTERN.test(options.expectedTargetFingerprint)) throw new MigrateCommandError("--expected-target-fingerprint must be a SHA-256 fingerprint.");
|
|
2832
2967
|
}
|
|
2833
2968
|
function hasControlCharacter(value) {
|
|
@@ -2869,13 +3004,22 @@ function safeReport(value, target) {
|
|
|
2869
3004
|
if (!isRecord(value)) throw new MigrateCommandError("The migration executor returned an invalid report.");
|
|
2870
3005
|
const reportTarget = immutableTarget(value.target);
|
|
2871
3006
|
if (reportTarget.kind !== target.kind || reportTarget.label !== target.label || reportTarget.fingerprint !== target.fingerprint || reportTarget.accountId !== target.accountId || reportTarget.environment !== target.environment || reportTarget.resourceId !== target.resourceId) throw new MigrateCommandError("The migration executor report target does not match the confirmed target.");
|
|
2872
|
-
|
|
3007
|
+
const report = {
|
|
2873
3008
|
target: { ...reportTarget },
|
|
2874
3009
|
knownApplied: safeMigrationNames(value.knownApplied, "knownApplied"),
|
|
2875
3010
|
pending: safeMigrationNames(value.pending, "pending"),
|
|
2876
3011
|
unknownApplied: safeMigrationNames(value.unknownApplied, "unknownApplied"),
|
|
2877
3012
|
executed: safeMigrationNames(value.executed, "executed")
|
|
2878
3013
|
};
|
|
3014
|
+
if (value.lock !== void 0) {
|
|
3015
|
+
const lock = value.lock;
|
|
3016
|
+
if (!isRecord(lock) || typeof lock.id !== "string" || !LOCK_ID_PATTERN.test(lock.id) || typeof lock.heldSince !== "string" || !ISO_TIMESTAMP_PATTERN.test(lock.heldSince)) throw new MigrateCommandError("The migration executor returned an invalid lock report.");
|
|
3017
|
+
report.lock = {
|
|
3018
|
+
id: lock.id,
|
|
3019
|
+
heldSince: lock.heldSince
|
|
3020
|
+
};
|
|
3021
|
+
}
|
|
3022
|
+
return report;
|
|
2879
3023
|
}
|
|
2880
3024
|
function printTarget(target, write) {
|
|
2881
3025
|
write(`Migration target: ${target.kind} ${target.label}`);
|
|
@@ -2888,6 +3032,7 @@ function printNameSet(label, names, write) {
|
|
|
2888
3032
|
write(`${label}: ${names.length === 0 ? "none" : names.join(", ")}`);
|
|
2889
3033
|
}
|
|
2890
3034
|
function printHumanReport(report, write) {
|
|
3035
|
+
if (report.lock) write(`Migration lock: held since ${report.lock.heldSince} (id ${report.lock.id})`);
|
|
2891
3036
|
printNameSet("Known applied", report.knownApplied, write);
|
|
2892
3037
|
printNameSet("Pending", report.pending, write);
|
|
2893
3038
|
printNameSet("Unknown applied", report.unknownApplied, write);
|
|
@@ -2933,6 +3078,10 @@ function redactExecutorMessage(message, env) {
|
|
|
2933
3078
|
}
|
|
2934
3079
|
function safeCommandMessage(error, env) {
|
|
2935
3080
|
if (error instanceof MigrateCommandError || error instanceof MigrationManifestValidationError) return error.message;
|
|
3081
|
+
if (error instanceof Error && error.name === "MigrationLockHeldError") {
|
|
3082
|
+
const heldSince = busyLockHeldSince(error);
|
|
3083
|
+
if (heldSince !== void 0 && Number.isSafeInteger(heldSince) && heldSince <= MAX_DATE_MS) return migrationLockHeldMessage(heldSince);
|
|
3084
|
+
}
|
|
2936
3085
|
if (error instanceof Error && error.message) return redactExecutorMessage(error.message, env);
|
|
2937
3086
|
return "Migration command failed. Check the project configuration, target, and credentials.";
|
|
2938
3087
|
}
|
|
@@ -2970,9 +3119,11 @@ async function runMigrateCommand(options, dependencies = defaultDependencies) {
|
|
|
2970
3119
|
resolveInterruption?.();
|
|
2971
3120
|
};
|
|
2972
3121
|
removeSignalHandlers.push(dependencies.onSignal("SIGINT", onSignal), dependencies.onSignal("SIGTERM", onSignal));
|
|
2973
|
-
const
|
|
2974
|
-
|
|
2975
|
-
if (applying) {
|
|
3122
|
+
const releasing = options.releaseLock !== void 0;
|
|
3123
|
+
const applying = !options.check && !options.status && !releasing;
|
|
3124
|
+
if (applying || releasing) {
|
|
3125
|
+
const operation = releasing ? "lock release" : "apply";
|
|
3126
|
+
const question = releasing ? `Release migration lock ${options.releaseLock} on ${target.label}? Release it only when no migration is running.` : `Apply EmDash migrations to ${target.label}?`;
|
|
2976
3127
|
if (options.expectedTargetFingerprint) {
|
|
2977
3128
|
if (options.expectedTargetFingerprint !== target.fingerprint) {
|
|
2978
3129
|
dependencies.writeStderr("Expected target fingerprint does not match the target.");
|
|
@@ -2980,30 +3131,39 @@ async function runMigrateCommand(options, dependencies = defaultDependencies) {
|
|
|
2980
3131
|
return exitCode;
|
|
2981
3132
|
}
|
|
2982
3133
|
} else if (!dependencies.interactive || options.json) {
|
|
2983
|
-
dependencies.writeStderr(
|
|
3134
|
+
dependencies.writeStderr(`Noninteractive ${operation} requires --expected-target-fingerprint with the displayed fingerprint.`);
|
|
2984
3135
|
exitCode = MIGRATE_EXIT_CODES.confirmation;
|
|
2985
3136
|
return exitCode;
|
|
2986
|
-
} else if (!await dependencies.confirm(
|
|
2987
|
-
dependencies.writeStderr("Migration cancelled.");
|
|
3137
|
+
} else if (!await dependencies.confirm(question)) {
|
|
3138
|
+
dependencies.writeStderr(releasing ? "Lock release cancelled." : "Migration cancelled.");
|
|
2988
3139
|
exitCode = MIGRATE_EXIT_CODES.confirmation;
|
|
2989
3140
|
return exitCode;
|
|
2990
3141
|
}
|
|
2991
3142
|
}
|
|
2992
|
-
const
|
|
2993
|
-
action:
|
|
3143
|
+
const request = {
|
|
3144
|
+
action: "check",
|
|
2994
3145
|
i18n: manifest.i18n,
|
|
2995
3146
|
artifact: {
|
|
2996
3147
|
emdashVersion: manifest.emdashVersion,
|
|
2997
3148
|
migrationSetFingerprint: manifest.migrationSet.fingerprint
|
|
2998
3149
|
}
|
|
2999
|
-
}
|
|
3150
|
+
};
|
|
3151
|
+
if (applying) request.action = "apply";
|
|
3152
|
+
if (releasing) {
|
|
3153
|
+
request.action = "release-lock";
|
|
3154
|
+
request.lockId = options.releaseLock;
|
|
3155
|
+
}
|
|
3156
|
+
const rawReport = await Promise.race([executor.execute(request), interruption]);
|
|
3000
3157
|
if (rawReport === interruptedResult || interrupted) {
|
|
3001
3158
|
exitCode = MIGRATE_EXIT_CODES.interrupted;
|
|
3002
3159
|
return exitCode;
|
|
3003
3160
|
}
|
|
3004
3161
|
const report = safeReport(rawReport, target);
|
|
3005
3162
|
if (options.json) dependencies.writeStdout(JSON.stringify(report));
|
|
3006
|
-
else
|
|
3163
|
+
else {
|
|
3164
|
+
if (releasing) dependencies.writeStdout(`Released migration lock ${options.releaseLock}.`);
|
|
3165
|
+
printHumanReport(report, dependencies.writeStdout);
|
|
3166
|
+
}
|
|
3007
3167
|
exitCode = reportExitCode(options, report);
|
|
3008
3168
|
return exitCode;
|
|
3009
3169
|
} catch (error) {
|
|
@@ -3058,7 +3218,11 @@ const migrateCommand = defineCommand({
|
|
|
3058
3218
|
},
|
|
3059
3219
|
"expected-target-fingerprint": {
|
|
3060
3220
|
type: "string",
|
|
3061
|
-
description: "Required target fingerprint for noninteractive apply"
|
|
3221
|
+
description: "Required target fingerprint for noninteractive apply or lock release"
|
|
3222
|
+
},
|
|
3223
|
+
"release-lock": {
|
|
3224
|
+
type: "string",
|
|
3225
|
+
description: "Release the migration lock with the id shown by --status"
|
|
3062
3226
|
},
|
|
3063
3227
|
database: {
|
|
3064
3228
|
type: "string",
|
|
@@ -3094,6 +3258,7 @@ const migrateCommand = defineCommand({
|
|
|
3094
3258
|
status: args.status,
|
|
3095
3259
|
json: args.json,
|
|
3096
3260
|
expectedTargetFingerprint: args["expected-target-fingerprint"],
|
|
3261
|
+
releaseLock: args["release-lock"],
|
|
3097
3262
|
database: args.database,
|
|
3098
3263
|
databaseUrlEnv: args["database-url-env"],
|
|
3099
3264
|
d1: args.d1,
|
|
@@ -3104,6 +3269,656 @@ const migrateCommand = defineCommand({
|
|
|
3104
3269
|
}
|
|
3105
3270
|
});
|
|
3106
3271
|
|
|
3272
|
+
//#endregion
|
|
3273
|
+
//#region src/cli/commands/bundle-utils.ts
|
|
3274
|
+
/**
|
|
3275
|
+
* Bundle utility functions
|
|
3276
|
+
*
|
|
3277
|
+
* Shared logic extracted from the bundle command so it can be tested
|
|
3278
|
+
* without the CLI harness and tsdown dependency.
|
|
3279
|
+
*/
|
|
3280
|
+
const MAX_BUNDLE_SIZE = 256 * 1024;
|
|
3281
|
+
const MAX_FILE_SIZE = 128 * 1024;
|
|
3282
|
+
const MAX_FILE_COUNT = 20;
|
|
3283
|
+
const MAX_SCREENSHOTS = 5;
|
|
3284
|
+
const MAX_SCREENSHOT_WIDTH = 1920;
|
|
3285
|
+
const MAX_SCREENSHOT_HEIGHT = 1080;
|
|
3286
|
+
const ICON_SIZE = 256;
|
|
3287
|
+
const MCP_TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
3288
|
+
/**
|
|
3289
|
+
* Matches Node.js built-in imports in bundled output:
|
|
3290
|
+
* - require("node:xxx") / require("xxx")
|
|
3291
|
+
* - import("node:xxx") / import("xxx")
|
|
3292
|
+
* - import X from "node:xxx" / import { X } from "node:xxx"
|
|
3293
|
+
* - import * as X from "node:xxx"
|
|
3294
|
+
* - export { X } from "node:xxx"
|
|
3295
|
+
* Captures the base module name (e.g. "fs" from "node:fs/promises").
|
|
3296
|
+
*/
|
|
3297
|
+
const NODE_BUILTIN_IMPORT_RE = /(?:import|export|require)\s*(?:\(|[^(]*?\bfrom\s+)["'](?:node:)?([a-z_]+)(?:\/[^"']*)?\s*["']\)?/g;
|
|
3298
|
+
const LEADING_DOT_SLASH_RE = /^\.\//;
|
|
3299
|
+
const DIST_PREFIX_RE = /^dist\//;
|
|
3300
|
+
const MJS_EXT_RE = /\.m?js$/;
|
|
3301
|
+
const TS_TO_TSX_RE = /\.ts$/;
|
|
3302
|
+
/** Node.js built-in modules that shouldn't appear in sandbox code */
|
|
3303
|
+
const NODE_BUILTINS = new Set([
|
|
3304
|
+
"assert",
|
|
3305
|
+
"buffer",
|
|
3306
|
+
"child_process",
|
|
3307
|
+
"cluster",
|
|
3308
|
+
"crypto",
|
|
3309
|
+
"dgram",
|
|
3310
|
+
"dns",
|
|
3311
|
+
"domain",
|
|
3312
|
+
"events",
|
|
3313
|
+
"fs",
|
|
3314
|
+
"http",
|
|
3315
|
+
"http2",
|
|
3316
|
+
"https",
|
|
3317
|
+
"inspector",
|
|
3318
|
+
"module",
|
|
3319
|
+
"net",
|
|
3320
|
+
"os",
|
|
3321
|
+
"path",
|
|
3322
|
+
"perf_hooks",
|
|
3323
|
+
"process",
|
|
3324
|
+
"punycode",
|
|
3325
|
+
"querystring",
|
|
3326
|
+
"readline",
|
|
3327
|
+
"repl",
|
|
3328
|
+
"stream",
|
|
3329
|
+
"string_decoder",
|
|
3330
|
+
"sys",
|
|
3331
|
+
"timers",
|
|
3332
|
+
"tls",
|
|
3333
|
+
"trace_events",
|
|
3334
|
+
"tty",
|
|
3335
|
+
"url",
|
|
3336
|
+
"util",
|
|
3337
|
+
"v8",
|
|
3338
|
+
"vm",
|
|
3339
|
+
"wasi",
|
|
3340
|
+
"worker_threads",
|
|
3341
|
+
"zlib"
|
|
3342
|
+
]);
|
|
3343
|
+
async function fileExists$1(path) {
|
|
3344
|
+
try {
|
|
3345
|
+
await access(path);
|
|
3346
|
+
return true;
|
|
3347
|
+
} catch {
|
|
3348
|
+
return false;
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
/** Convert an absolute build artifact path into a portable ESM import specifier. */
|
|
3352
|
+
function toFileImportSpecifier(path) {
|
|
3353
|
+
return pathToFileURL(path).href;
|
|
3354
|
+
}
|
|
3355
|
+
/**
|
|
3356
|
+
* Read image dimensions from a buffer.
|
|
3357
|
+
* Returns [width, height] or null if the format is unrecognized.
|
|
3358
|
+
*/
|
|
3359
|
+
function readImageDimensions(buf) {
|
|
3360
|
+
try {
|
|
3361
|
+
const result = imageSize(buf);
|
|
3362
|
+
if (result.width != null && result.height != null) return [result.width, result.height];
|
|
3363
|
+
return null;
|
|
3364
|
+
} catch {
|
|
3365
|
+
return null;
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
/**
|
|
3369
|
+
* Extract manifest metadata from a ResolvedPlugin.
|
|
3370
|
+
* Strips functions (hooks, route handlers) and keeps only serializable metadata.
|
|
3371
|
+
*/
|
|
3372
|
+
function extractManifest(plugin) {
|
|
3373
|
+
if ((plugin.admin.pages?.length ?? 0) > 0 || (plugin.admin.widgets?.length ?? 0) > 0) {
|
|
3374
|
+
const adminRoute = plugin.routes.admin;
|
|
3375
|
+
if (adminRoute && (adminRoute.public === true || !isJsonPostRouteContract(adminRoute))) throw new Error("Block Kit admin route must accept POST JSON requests and return JSON");
|
|
3376
|
+
}
|
|
3377
|
+
const declaredAccess = capabilitiesToDeclaredAccess$1(plugin.capabilities, plugin.allowedHosts);
|
|
3378
|
+
const enforcedAccess = declaredAccessToCapabilities$1(declaredAccess);
|
|
3379
|
+
const hooks = [];
|
|
3380
|
+
for (const [name, resolved] of Object.entries(plugin.hooks)) {
|
|
3381
|
+
if (!resolved) continue;
|
|
3382
|
+
if (resolved.exclusive || resolved.priority !== 100 || resolved.timeout !== 5e3) {
|
|
3383
|
+
const entry = { name };
|
|
3384
|
+
if (resolved.exclusive) entry.exclusive = true;
|
|
3385
|
+
if (resolved.priority !== 100) entry.priority = resolved.priority;
|
|
3386
|
+
if (resolved.timeout !== 5e3) entry.timeout = resolved.timeout;
|
|
3387
|
+
hooks.push(entry);
|
|
3388
|
+
} else hooks.push(name);
|
|
3389
|
+
}
|
|
3390
|
+
const routes = Object.entries(plugin.routes).map(([name, route]) => extractManifestRoute(name, route));
|
|
3391
|
+
const tools = Object.entries(plugin.mcp?.tools ?? {}).map(([name, tool]) => {
|
|
3392
|
+
if (!MCP_TOOL_NAME_PATTERN.test(name)) throw new Error(`Invalid MCP tool name "${name}"`);
|
|
3393
|
+
const route = plugin.routes[tool.route];
|
|
3394
|
+
if (!route?.permission || route.public || route.response === "raw") throw new Error(`MCP tool "${name}" must reference a private route with a permission`);
|
|
3395
|
+
if (!isJsonPostRouteContract(route)) throw new Error(`MCP tool "${name}" must reference a POST-compatible JSON route`);
|
|
3396
|
+
return {
|
|
3397
|
+
name,
|
|
3398
|
+
description: tool.description,
|
|
3399
|
+
route: tool.route,
|
|
3400
|
+
permission: route.permission,
|
|
3401
|
+
destructive: tool.destructive ?? false,
|
|
3402
|
+
inputSchema: z.toJSONSchema(tool.input, { target: "draft-7" }),
|
|
3403
|
+
...tool.output ? { outputSchema: z.toJSONSchema(tool.output, { target: "draft-7" }) } : {}
|
|
3404
|
+
};
|
|
3405
|
+
});
|
|
3406
|
+
return {
|
|
3407
|
+
id: plugin.id,
|
|
3408
|
+
version: plugin.version,
|
|
3409
|
+
declaredAccess,
|
|
3410
|
+
capabilities: enforcedAccess.capabilities,
|
|
3411
|
+
allowedHosts: plugin.allowedHosts,
|
|
3412
|
+
storage: plugin.storage,
|
|
3413
|
+
hooks,
|
|
3414
|
+
routes,
|
|
3415
|
+
...tools.length > 0 ? { mcp: { tools } } : {},
|
|
3416
|
+
admin: {
|
|
3417
|
+
settingsSchema: plugin.admin.settingsSchema,
|
|
3418
|
+
pages: plugin.admin.pages,
|
|
3419
|
+
widgets: plugin.admin.widgets,
|
|
3420
|
+
editorPanels: plugin.admin.editorPanels,
|
|
3421
|
+
editorActions: plugin.admin.editorActions
|
|
3422
|
+
}
|
|
3423
|
+
};
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Scan bundled code for Node.js built-in imports.
|
|
3427
|
+
* Matches require("node:xxx"), require("xxx"), import("node:xxx") — the patterns
|
|
3428
|
+
* that appear in bundled ESM/CJS output (not source-level named imports).
|
|
3429
|
+
* Returns deduplicated array of built-in module names found.
|
|
3430
|
+
*/
|
|
3431
|
+
function findNodeBuiltinImports(code) {
|
|
3432
|
+
const found = [];
|
|
3433
|
+
NODE_BUILTIN_IMPORT_RE.lastIndex = 0;
|
|
3434
|
+
let match;
|
|
3435
|
+
while ((match = NODE_BUILTIN_IMPORT_RE.exec(code)) !== null) {
|
|
3436
|
+
const mod = match[1];
|
|
3437
|
+
if (NODE_BUILTINS.has(mod)) found.push(mod);
|
|
3438
|
+
}
|
|
3439
|
+
return [...new Set(found)];
|
|
3440
|
+
}
|
|
3441
|
+
/**
|
|
3442
|
+
* Find a build output file by base name, checking common extensions.
|
|
3443
|
+
* tsdown may output .mjs, .js, or .cjs depending on format and config.
|
|
3444
|
+
*/
|
|
3445
|
+
async function findBuildOutput(dir, baseName) {
|
|
3446
|
+
for (const ext of [
|
|
3447
|
+
".mjs",
|
|
3448
|
+
".js",
|
|
3449
|
+
".cjs"
|
|
3450
|
+
]) {
|
|
3451
|
+
const candidate = join(dir, `${baseName}${ext}`);
|
|
3452
|
+
if (await fileExists$1(candidate)) return candidate;
|
|
3453
|
+
}
|
|
3454
|
+
}
|
|
3455
|
+
/**
|
|
3456
|
+
* Resolve a dist/built path back to its source .ts/.tsx equivalent.
|
|
3457
|
+
* E.g., "./dist/index.mjs" → "src/index.ts"
|
|
3458
|
+
*/
|
|
3459
|
+
async function resolveSourceEntry(pluginDir, distPath) {
|
|
3460
|
+
const cleaned = distPath.replace(LEADING_DOT_SLASH_RE, "");
|
|
3461
|
+
const srcPath = cleaned.replace(DIST_PREFIX_RE, "src/").replace(MJS_EXT_RE, ".ts");
|
|
3462
|
+
const srcFull = resolve(pluginDir, srcPath);
|
|
3463
|
+
if (await fileExists$1(srcFull)) return srcFull;
|
|
3464
|
+
const tsxFull = resolve(pluginDir, srcPath.replace(TS_TO_TSX_RE, ".tsx"));
|
|
3465
|
+
if (await fileExists$1(tsxFull)) return tsxFull;
|
|
3466
|
+
const direct = resolve(pluginDir, cleaned);
|
|
3467
|
+
if (await fileExists$1(direct)) return direct;
|
|
3468
|
+
}
|
|
3469
|
+
const TS_SOURCE_EXPORT_RE = /\.(?:ts|tsx|mts|cts|jsx)$/;
|
|
3470
|
+
/**
|
|
3471
|
+
* Find package.json exports that point to source files instead of built output.
|
|
3472
|
+
* Returns an array of `{ exportPath, resolvedPath }` for each offending export.
|
|
3473
|
+
*/
|
|
3474
|
+
function findSourceExports(exports) {
|
|
3475
|
+
const issues = [];
|
|
3476
|
+
for (const [exportPath, exportValue] of Object.entries(exports)) {
|
|
3477
|
+
const resolved = typeof exportValue === "string" ? exportValue : exportValue && typeof exportValue === "object" && "import" in exportValue ? exportValue.import : null;
|
|
3478
|
+
if (resolved && TS_SOURCE_EXPORT_RE.test(resolved)) issues.push({
|
|
3479
|
+
exportPath,
|
|
3480
|
+
resolvedPath: resolved
|
|
3481
|
+
});
|
|
3482
|
+
}
|
|
3483
|
+
return issues;
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* Recursively walk a staging directory and return a flat list of all files
|
|
3487
|
+
* with sizes. Names are relative to `dir` so they match what would appear
|
|
3488
|
+
* as the tarball entry name.
|
|
3489
|
+
*/
|
|
3490
|
+
async function collectBundleEntries(dir) {
|
|
3491
|
+
const entries = [];
|
|
3492
|
+
await walkBundle(dir, "", entries);
|
|
3493
|
+
return entries;
|
|
3494
|
+
}
|
|
3495
|
+
async function walkBundle(dir, prefix, into) {
|
|
3496
|
+
const items = await readdir(dir, { withFileTypes: true });
|
|
3497
|
+
for (const item of items) {
|
|
3498
|
+
const fullPath = join(dir, item.name);
|
|
3499
|
+
const relPath = prefix ? `${prefix}/${item.name}` : item.name;
|
|
3500
|
+
if (item.isFile()) {
|
|
3501
|
+
const s = await stat(fullPath);
|
|
3502
|
+
into.push({
|
|
3503
|
+
name: relPath,
|
|
3504
|
+
bytes: s.size
|
|
3505
|
+
});
|
|
3506
|
+
} else if (item.isDirectory()) await walkBundle(fullPath, relPath, into);
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3509
|
+
/**
|
|
3510
|
+
* Sum the byte sizes of all entries.
|
|
3511
|
+
*/
|
|
3512
|
+
function totalBundleBytes(entries) {
|
|
3513
|
+
let total = 0;
|
|
3514
|
+
for (const e of entries) total += e.bytes;
|
|
3515
|
+
return total;
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* Check a bundle against the three size caps from RFC 0001:
|
|
3519
|
+
* - total decompressed ≤ MAX_BUNDLE_SIZE
|
|
3520
|
+
* - per-file decompressed ≤ MAX_FILE_SIZE
|
|
3521
|
+
* - file count ≤ MAX_FILE_COUNT
|
|
3522
|
+
*
|
|
3523
|
+
* Returns a list of violation messages (empty if the bundle is within all
|
|
3524
|
+
* caps). Messages are deterministic per input — the total/count violations
|
|
3525
|
+
* come first, then oversized files in alphabetical order — so the same
|
|
3526
|
+
* bundle always produces the same error text.
|
|
3527
|
+
*/
|
|
3528
|
+
function validateBundleSize(entries) {
|
|
3529
|
+
const violations = [];
|
|
3530
|
+
const total = totalBundleBytes(entries);
|
|
3531
|
+
if (total > MAX_BUNDLE_SIZE) violations.push(`Bundle size ${formatBytes(total)} exceeds maximum of ${formatBytes(MAX_BUNDLE_SIZE)}.`);
|
|
3532
|
+
if (entries.length > MAX_FILE_COUNT) violations.push(`Bundle contains ${entries.length} files, exceeds maximum of ${MAX_FILE_COUNT}.`);
|
|
3533
|
+
const oversized = entries.filter((e) => e.bytes > MAX_FILE_SIZE).toSorted((a, b) => a.name.localeCompare(b.name));
|
|
3534
|
+
for (const e of oversized) violations.push(`File ${e.name} is ${formatBytes(e.bytes)}, exceeds per-file maximum of ${formatBytes(MAX_FILE_SIZE)}.`);
|
|
3535
|
+
return violations;
|
|
3536
|
+
}
|
|
3537
|
+
/**
|
|
3538
|
+
* Render a byte count as a human-friendly string (e.g. "256.0 KB").
|
|
3539
|
+
*/
|
|
3540
|
+
function formatBytes(n) {
|
|
3541
|
+
if (n < 1024) return `${n} B`;
|
|
3542
|
+
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
|
|
3543
|
+
return `${(n / 1024 / 1024).toFixed(2)} MB`;
|
|
3544
|
+
}
|
|
3545
|
+
/**
|
|
3546
|
+
* Create a gzipped tarball from a directory.
|
|
3547
|
+
*/
|
|
3548
|
+
async function createTarball(sourceDir, outputPath) {
|
|
3549
|
+
const { createGzip } = await import("node:zlib");
|
|
3550
|
+
await pipeline(packTar(sourceDir), createGzip({ level: 9 }), createWriteStream(outputPath));
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
//#endregion
|
|
3554
|
+
//#region src/cli/commands/bundle.ts
|
|
3555
|
+
/**
|
|
3556
|
+
* emdash plugin bundle
|
|
3557
|
+
*
|
|
3558
|
+
* Produces a publishable plugin tarball from a plugin source directory.
|
|
3559
|
+
*
|
|
3560
|
+
* Steps:
|
|
3561
|
+
* 1. Resolve plugin entrypoint (finds definePlugin() export)
|
|
3562
|
+
* 2. Bundle backend code with tsdown → backend.js (single ES module, tree-shaken)
|
|
3563
|
+
* 3. Bundle admin code if present → admin.js
|
|
3564
|
+
* 4. Extract manifest from definePlugin() → manifest.json
|
|
3565
|
+
* 5. Collect assets (README.md, icon.png, screenshots/)
|
|
3566
|
+
* 6. Validate bundle (manifest schema, size limits, no Node.js builtins)
|
|
3567
|
+
* 7. Create tarball ({id}-{version}.tar.gz)
|
|
3568
|
+
*/
|
|
3569
|
+
var bundle_exports = /* @__PURE__ */ __exportAll({ bundleCommand: () => bundleCommand });
|
|
3570
|
+
const TS_EXT_RE = /\.(tsx?|[mc]?js)$/;
|
|
3571
|
+
const SLASH_RE = /\//g;
|
|
3572
|
+
const LEADING_AT_RE = /^@/;
|
|
3573
|
+
const emdash_SCOPE_RE = /^@emdash-cms\//;
|
|
3574
|
+
const bundleCommand = defineCommand({
|
|
3575
|
+
meta: {
|
|
3576
|
+
name: "bundle",
|
|
3577
|
+
description: "Bundle a plugin for marketplace distribution"
|
|
3578
|
+
},
|
|
3579
|
+
args: {
|
|
3580
|
+
dir: {
|
|
3581
|
+
type: "string",
|
|
3582
|
+
description: "Plugin directory (default: current directory)",
|
|
3583
|
+
default: process.cwd()
|
|
3584
|
+
},
|
|
3585
|
+
outDir: {
|
|
3586
|
+
type: "string",
|
|
3587
|
+
alias: "o",
|
|
3588
|
+
description: "Output directory for the tarball (default: ./dist)",
|
|
3589
|
+
default: "dist"
|
|
3590
|
+
},
|
|
3591
|
+
validateOnly: {
|
|
3592
|
+
type: "boolean",
|
|
3593
|
+
description: "Run validation only, skip tarball creation",
|
|
3594
|
+
default: false
|
|
3595
|
+
}
|
|
3596
|
+
},
|
|
3597
|
+
async run({ args }) {
|
|
3598
|
+
const pluginDir = resolve(args.dir);
|
|
3599
|
+
const outDir = resolve(pluginDir, args.outDir);
|
|
3600
|
+
const validateOnly = args.validateOnly;
|
|
3601
|
+
consola.start(validateOnly ? "Validating plugin..." : "Bundling plugin...");
|
|
3602
|
+
const pkgPath = join(pluginDir, "package.json");
|
|
3603
|
+
if (!await fileExists$1(pkgPath)) {
|
|
3604
|
+
consola.error("No package.json found in", pluginDir);
|
|
3605
|
+
process.exit(1);
|
|
3606
|
+
}
|
|
3607
|
+
const pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
|
|
3608
|
+
let backendEntry;
|
|
3609
|
+
let adminEntry;
|
|
3610
|
+
if (pkg.exports) {
|
|
3611
|
+
const sandboxExport = pkg.exports["./sandbox"];
|
|
3612
|
+
if (typeof sandboxExport === "string") backendEntry = await resolveSourceEntry(pluginDir, sandboxExport);
|
|
3613
|
+
else if (sandboxExport && typeof sandboxExport === "object" && "import" in sandboxExport) backendEntry = await resolveSourceEntry(pluginDir, sandboxExport.import);
|
|
3614
|
+
const adminExport = pkg.exports["./admin"];
|
|
3615
|
+
if (typeof adminExport === "string") adminEntry = await resolveSourceEntry(pluginDir, adminExport);
|
|
3616
|
+
else if (adminExport && typeof adminExport === "object" && "import" in adminExport) adminEntry = await resolveSourceEntry(pluginDir, adminExport.import);
|
|
3617
|
+
}
|
|
3618
|
+
if (!backendEntry) {
|
|
3619
|
+
const defaultSandbox = join(pluginDir, "src/sandbox-entry.ts");
|
|
3620
|
+
if (await fileExists$1(defaultSandbox)) backendEntry = defaultSandbox;
|
|
3621
|
+
}
|
|
3622
|
+
let mainEntry;
|
|
3623
|
+
if (pkg.exports?.["."] !== void 0) {
|
|
3624
|
+
const mainExport = pkg.exports["."];
|
|
3625
|
+
if (typeof mainExport === "string") mainEntry = await resolveSourceEntry(pluginDir, mainExport);
|
|
3626
|
+
else if (mainExport && typeof mainExport === "object" && "import" in mainExport) mainEntry = await resolveSourceEntry(pluginDir, mainExport.import);
|
|
3627
|
+
}
|
|
3628
|
+
if (!mainEntry && pkg.main) mainEntry = await resolveSourceEntry(pluginDir, pkg.main);
|
|
3629
|
+
if (!mainEntry) {
|
|
3630
|
+
const defaultMain = join(pluginDir, "src/index.ts");
|
|
3631
|
+
if (await fileExists$1(defaultMain)) mainEntry = defaultMain;
|
|
3632
|
+
}
|
|
3633
|
+
if (!mainEntry) {
|
|
3634
|
+
consola.error("Cannot find plugin entrypoint. Expected src/index.ts or main/exports in package.json");
|
|
3635
|
+
process.exit(1);
|
|
3636
|
+
}
|
|
3637
|
+
consola.info(`Main entry: ${mainEntry}`);
|
|
3638
|
+
if (backendEntry) consola.info(`Backend entry: ${backendEntry}`);
|
|
3639
|
+
if (adminEntry) consola.info(`Admin entry: ${adminEntry}`);
|
|
3640
|
+
consola.start("Extracting plugin manifest...");
|
|
3641
|
+
const { build } = await import("tsdown");
|
|
3642
|
+
const tmpDir = join(pluginDir, ".emdash-bundle-tmp");
|
|
3643
|
+
try {
|
|
3644
|
+
await rm(tmpDir, {
|
|
3645
|
+
recursive: true,
|
|
3646
|
+
force: true
|
|
3647
|
+
});
|
|
3648
|
+
await mkdir(tmpDir, { recursive: true });
|
|
3649
|
+
const mainOutDir = join(tmpDir, "main");
|
|
3650
|
+
await build({
|
|
3651
|
+
config: false,
|
|
3652
|
+
entry: [mainEntry],
|
|
3653
|
+
format: "esm",
|
|
3654
|
+
outDir: mainOutDir,
|
|
3655
|
+
dts: false,
|
|
3656
|
+
platform: "node",
|
|
3657
|
+
external: ["emdash", emdash_SCOPE_RE]
|
|
3658
|
+
});
|
|
3659
|
+
const pluginNodeModules = join(pluginDir, "node_modules");
|
|
3660
|
+
const tmpNodeModules = join(mainOutDir, "node_modules");
|
|
3661
|
+
if (await fileExists$1(pluginNodeModules)) await symlink(pluginNodeModules, tmpNodeModules, "junction");
|
|
3662
|
+
const mainOutputPath = await findBuildOutput(mainOutDir, basename(mainEntry).replace(TS_EXT_RE, ""));
|
|
3663
|
+
if (!mainOutputPath) {
|
|
3664
|
+
consola.error("Failed to build main entry — no output found in", mainOutDir);
|
|
3665
|
+
process.exit(1);
|
|
3666
|
+
}
|
|
3667
|
+
const pluginModule = await import(toFileImportSpecifier(mainOutputPath));
|
|
3668
|
+
let resolvedPlugin;
|
|
3669
|
+
if (typeof pluginModule.createPlugin === "function") resolvedPlugin = pluginModule.createPlugin();
|
|
3670
|
+
else if (typeof pluginModule.default === "function") resolvedPlugin = pluginModule.default();
|
|
3671
|
+
else if (typeof pluginModule.default === "object" && pluginModule.default !== null) {
|
|
3672
|
+
const defaultExport = pluginModule.default;
|
|
3673
|
+
if ("id" in defaultExport && "version" in defaultExport) resolvedPlugin = defaultExport;
|
|
3674
|
+
}
|
|
3675
|
+
if (!resolvedPlugin) for (const [key, value] of Object.entries(pluginModule)) {
|
|
3676
|
+
if (key === "default" || typeof value !== "function") continue;
|
|
3677
|
+
try {
|
|
3678
|
+
const result = value();
|
|
3679
|
+
if (result && typeof result === "object" && "id" in result && "version" in result) {
|
|
3680
|
+
resolvedPlugin = {
|
|
3681
|
+
id: result.id,
|
|
3682
|
+
version: result.version,
|
|
3683
|
+
capabilities: result.capabilities ?? [],
|
|
3684
|
+
allowedHosts: result.allowedHosts ?? [],
|
|
3685
|
+
storage: result.storage ?? {},
|
|
3686
|
+
hooks: {},
|
|
3687
|
+
routes: {},
|
|
3688
|
+
admin: {
|
|
3689
|
+
pages: result.adminPages,
|
|
3690
|
+
widgets: result.adminWidgets
|
|
3691
|
+
}
|
|
3692
|
+
};
|
|
3693
|
+
if (backendEntry) {
|
|
3694
|
+
const backendProbeDir = join(tmpDir, "backend-probe");
|
|
3695
|
+
const probeShimDir = join(tmpDir, "probe-shims");
|
|
3696
|
+
await mkdir(probeShimDir, { recursive: true });
|
|
3697
|
+
await writeFile(join(probeShimDir, "emdash.mjs"), "export const definePlugin = (d) => d;\n");
|
|
3698
|
+
await build({
|
|
3699
|
+
config: false,
|
|
3700
|
+
entry: [backendEntry],
|
|
3701
|
+
format: "esm",
|
|
3702
|
+
outDir: backendProbeDir,
|
|
3703
|
+
dts: false,
|
|
3704
|
+
platform: "neutral",
|
|
3705
|
+
external: [],
|
|
3706
|
+
alias: { emdash: join(probeShimDir, "emdash.mjs") },
|
|
3707
|
+
treeshake: true
|
|
3708
|
+
});
|
|
3709
|
+
const backendProbePath = await findBuildOutput(backendProbeDir, basename(backendEntry).replace(TS_EXT_RE, ""));
|
|
3710
|
+
if (backendProbePath) {
|
|
3711
|
+
const standardDef = (await import(toFileImportSpecifier(backendProbePath))).default ?? {};
|
|
3712
|
+
const hooks = standardDef.hooks;
|
|
3713
|
+
const routes = standardDef.routes;
|
|
3714
|
+
if (hooks) for (const hookName of Object.keys(hooks)) {
|
|
3715
|
+
const hookEntry = hooks[hookName];
|
|
3716
|
+
const isConfig = typeof hookEntry === "object" && hookEntry !== null && "handler" in hookEntry;
|
|
3717
|
+
const config = isConfig ? hookEntry : {};
|
|
3718
|
+
resolvedPlugin.hooks[hookName] = {
|
|
3719
|
+
handler: isConfig ? hookEntry.handler : hookEntry,
|
|
3720
|
+
priority: config.priority ?? 100,
|
|
3721
|
+
timeout: config.timeout ?? 5e3,
|
|
3722
|
+
dependencies: config.dependencies ?? [],
|
|
3723
|
+
errorPolicy: config.errorPolicy ?? "abort",
|
|
3724
|
+
exclusive: config.exclusive ?? false,
|
|
3725
|
+
pluginId: result.id
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3728
|
+
if (routes) for (const [name, route] of Object.entries(routes)) {
|
|
3729
|
+
const routeObj = typeof route === "object" && route !== null ? route : {};
|
|
3730
|
+
resolvedPlugin.routes[name] = {
|
|
3731
|
+
handler: typeof route === "function" ? route : routeObj.handler,
|
|
3732
|
+
...extractRouteOptions(route)
|
|
3733
|
+
};
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
break;
|
|
3738
|
+
}
|
|
3739
|
+
} catch (error) {
|
|
3740
|
+
if (resolvedPlugin) throw error;
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
if (!resolvedPlugin?.id || !resolvedPlugin?.version) {
|
|
3744
|
+
consola.error("Could not extract plugin definition. Expected one of:\n - createPlugin() export (native format)\n - Descriptor factory function returning { id, version, ... } (standard format)");
|
|
3745
|
+
process.exit(1);
|
|
3746
|
+
}
|
|
3747
|
+
const manifest = extractManifest(resolvedPlugin);
|
|
3748
|
+
if (resolvedPlugin.admin?.entry) {
|
|
3749
|
+
consola.error("Plugin declares adminEntry — React admin components require native/trusted mode. Use Block Kit for sandboxed admin pages, or remove adminEntry.");
|
|
3750
|
+
process.exit(1);
|
|
3751
|
+
}
|
|
3752
|
+
if (resolvedPlugin.admin?.portableTextBlocks && resolvedPlugin.admin.portableTextBlocks.length > 0) {
|
|
3753
|
+
consola.error("Plugin declares portableTextBlocks — these require native/trusted mode and cannot be bundled for the marketplace.");
|
|
3754
|
+
process.exit(1);
|
|
3755
|
+
}
|
|
3756
|
+
consola.success(`Plugin: ${manifest.id}@${manifest.version}`);
|
|
3757
|
+
consola.info(` Capabilities: ${manifest.capabilities.length > 0 ? manifest.capabilities.join(", ") : "(none)"}`);
|
|
3758
|
+
consola.info(` Hooks: ${manifest.hooks.length > 0 ? manifest.hooks.map((h) => typeof h === "string" ? h : h.name).join(", ") : "(none)"}`);
|
|
3759
|
+
consola.info(` Routes: ${manifest.routes.length > 0 ? manifest.routes.map((r) => typeof r === "string" ? r : r.name).join(", ") : "(none)"}`);
|
|
3760
|
+
const bundleDir = join(tmpDir, "bundle");
|
|
3761
|
+
await mkdir(bundleDir, { recursive: true });
|
|
3762
|
+
if (backendEntry) {
|
|
3763
|
+
consola.start("Bundling backend...");
|
|
3764
|
+
const shimDir = join(tmpDir, "shims");
|
|
3765
|
+
await mkdir(shimDir, { recursive: true });
|
|
3766
|
+
await writeFile(join(shimDir, "emdash.mjs"), "export const definePlugin = (d) => d;\n");
|
|
3767
|
+
await build({
|
|
3768
|
+
config: false,
|
|
3769
|
+
entry: [backendEntry],
|
|
3770
|
+
format: "esm",
|
|
3771
|
+
outDir: join(tmpDir, "backend"),
|
|
3772
|
+
dts: false,
|
|
3773
|
+
platform: "neutral",
|
|
3774
|
+
external: [],
|
|
3775
|
+
alias: { emdash: join(shimDir, "emdash.mjs") },
|
|
3776
|
+
minify: true,
|
|
3777
|
+
treeshake: true
|
|
3778
|
+
});
|
|
3779
|
+
const backendBaseName = basename(backendEntry).replace(TS_EXT_RE, "");
|
|
3780
|
+
const backendOutputPath = await findBuildOutput(join(tmpDir, "backend"), backendBaseName);
|
|
3781
|
+
if (backendOutputPath) {
|
|
3782
|
+
await copyFile(backendOutputPath, join(bundleDir, "backend.js"));
|
|
3783
|
+
consola.success("Built backend.js");
|
|
3784
|
+
} else {
|
|
3785
|
+
consola.error("Backend build produced no output");
|
|
3786
|
+
process.exit(1);
|
|
3787
|
+
}
|
|
3788
|
+
} else {
|
|
3789
|
+
consola.warn("No sandbox entry found — bundle will have no backend.js");
|
|
3790
|
+
consola.warn(" Add a \"sandbox-entry.ts\" in src/ or a \"./sandbox\" export in package.json");
|
|
3791
|
+
}
|
|
3792
|
+
if (adminEntry) {
|
|
3793
|
+
consola.start("Bundling admin...");
|
|
3794
|
+
await build({
|
|
3795
|
+
config: false,
|
|
3796
|
+
entry: [adminEntry],
|
|
3797
|
+
format: "esm",
|
|
3798
|
+
outDir: join(tmpDir, "admin"),
|
|
3799
|
+
dts: false,
|
|
3800
|
+
platform: "neutral",
|
|
3801
|
+
external: [],
|
|
3802
|
+
minify: true,
|
|
3803
|
+
treeshake: true
|
|
3804
|
+
});
|
|
3805
|
+
const adminBaseName = basename(adminEntry).replace(TS_EXT_RE, "");
|
|
3806
|
+
const adminOutputPath = await findBuildOutput(join(tmpDir, "admin"), adminBaseName);
|
|
3807
|
+
if (adminOutputPath) {
|
|
3808
|
+
await copyFile(adminOutputPath, join(bundleDir, "admin.js"));
|
|
3809
|
+
consola.success("Built admin.js");
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
await writeFile(join(bundleDir, "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
3813
|
+
consola.start("Collecting assets...");
|
|
3814
|
+
const readmePath = join(pluginDir, "README.md");
|
|
3815
|
+
if (await fileExists$1(readmePath)) {
|
|
3816
|
+
await copyFile(readmePath, join(bundleDir, "README.md"));
|
|
3817
|
+
consola.success("Included README.md");
|
|
3818
|
+
}
|
|
3819
|
+
const iconPath = join(pluginDir, "icon.png");
|
|
3820
|
+
if (await fileExists$1(iconPath)) {
|
|
3821
|
+
const dims = readImageDimensions(await readFile(iconPath));
|
|
3822
|
+
if (!dims) consola.warn("icon.png is not a valid PNG — skipping");
|
|
3823
|
+
else if (dims[0] !== ICON_SIZE || dims[1] !== ICON_SIZE) {
|
|
3824
|
+
consola.warn(`icon.png is ${dims[0]}x${dims[1]}, expected ${ICON_SIZE}x${ICON_SIZE} — including anyway`);
|
|
3825
|
+
await copyFile(iconPath, join(bundleDir, "icon.png"));
|
|
3826
|
+
} else {
|
|
3827
|
+
await copyFile(iconPath, join(bundleDir, "icon.png"));
|
|
3828
|
+
consola.success("Included icon.png");
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
const screenshotsDir = join(pluginDir, "screenshots");
|
|
3832
|
+
if (await fileExists$1(screenshotsDir)) {
|
|
3833
|
+
const screenshotFiles = (await readdir(screenshotsDir)).filter((f) => {
|
|
3834
|
+
const ext = extname(f).toLowerCase();
|
|
3835
|
+
return ext === ".png" || ext === ".jpg" || ext === ".jpeg";
|
|
3836
|
+
}).toSorted().slice(0, MAX_SCREENSHOTS);
|
|
3837
|
+
if (screenshotFiles.length > 0) {
|
|
3838
|
+
await mkdir(join(bundleDir, "screenshots"), { recursive: true });
|
|
3839
|
+
for (const file of screenshotFiles) {
|
|
3840
|
+
const filePath = join(screenshotsDir, file);
|
|
3841
|
+
const dims = readImageDimensions(await readFile(filePath));
|
|
3842
|
+
if (!dims) {
|
|
3843
|
+
consola.warn(`screenshots/${file} — cannot read dimensions, skipping`);
|
|
3844
|
+
continue;
|
|
3845
|
+
}
|
|
3846
|
+
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`);
|
|
3847
|
+
await copyFile(filePath, join(bundleDir, "screenshots", file));
|
|
3848
|
+
}
|
|
3849
|
+
consola.success(`Included ${screenshotFiles.length} screenshot(s)`);
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
consola.start("Validating bundle...");
|
|
3853
|
+
let hasErrors = false;
|
|
3854
|
+
if (pkg.exports) for (const issue of findSourceExports(pkg.exports)) {
|
|
3855
|
+
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.`);
|
|
3856
|
+
hasErrors = true;
|
|
3857
|
+
}
|
|
3858
|
+
const backendPath = join(bundleDir, "backend.js");
|
|
3859
|
+
if (await fileExists$1(backendPath)) {
|
|
3860
|
+
const builtins = findNodeBuiltinImports(await readFile(backendPath, "utf-8"));
|
|
3861
|
+
if (builtins.length > 0) {
|
|
3862
|
+
consola.error(`backend.js imports Node.js built-in modules: ${builtins.join(", ")}`);
|
|
3863
|
+
consola.error("Sandboxed plugins cannot use Node.js APIs");
|
|
3864
|
+
hasErrors = true;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
const declaresUnrestricted = manifest.capabilities.includes("network:request:unrestricted") || manifest.capabilities.includes("network:fetch:any");
|
|
3868
|
+
const declaresHostRestricted = manifest.capabilities.includes("network:request") || manifest.capabilities.includes("network:fetch");
|
|
3869
|
+
if (declaresUnrestricted) consola.warn("Plugin declares unrestricted network access (network:request:unrestricted) — it can make requests to any host");
|
|
3870
|
+
else if (declaresHostRestricted && manifest.allowedHosts.length === 0) consola.warn("Plugin declares network:request capability but no allowedHosts — all requests will be blocked");
|
|
3871
|
+
const deprecatedCaps = manifest.capabilities.filter(isDeprecatedCapability);
|
|
3872
|
+
if (deprecatedCaps.length > 0) {
|
|
3873
|
+
consola.warn("Plugin uses deprecated capability names. Rename them before publishing:");
|
|
3874
|
+
for (const cap of deprecatedCaps) {
|
|
3875
|
+
const replacement = CAPABILITY_RENAMES[cap];
|
|
3876
|
+
consola.warn(` ${cap} → ${replacement}`);
|
|
3877
|
+
}
|
|
3878
|
+
}
|
|
3879
|
+
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");
|
|
3880
|
+
if (resolvedPlugin.admin?.entry) consola.warn("Plugin declares admin.entry — custom React components require trusted mode. Use Block Kit for sandboxed admin pages");
|
|
3881
|
+
if (resolvedPlugin.hooks["page:fragments"]) consola.warn("Plugin declares page:fragments hook — this is trusted-only and will not work in sandboxed mode");
|
|
3882
|
+
const hasAdminPages = (manifest.admin?.pages?.length ?? 0) > 0;
|
|
3883
|
+
const hasAdminWidgets = (manifest.admin?.widgets?.length ?? 0) > 0;
|
|
3884
|
+
if (hasAdminPages || hasAdminWidgets) {
|
|
3885
|
+
if (!manifest.routes.map((r) => typeof r === "string" ? r : r.name).includes("admin")) {
|
|
3886
|
+
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.`);
|
|
3887
|
+
hasErrors = true;
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
const bundleEntries = await collectBundleEntries(bundleDir);
|
|
3891
|
+
const sizeViolations = validateBundleSize(bundleEntries);
|
|
3892
|
+
if (sizeViolations.length > 0) {
|
|
3893
|
+
for (const v of sizeViolations) consola.error(v);
|
|
3894
|
+
hasErrors = true;
|
|
3895
|
+
} else consola.info(`Bundle size: ${formatBytes(totalBundleBytes(bundleEntries))} across ${bundleEntries.length} file${bundleEntries.length === 1 ? "" : "s"}`);
|
|
3896
|
+
if (hasErrors) {
|
|
3897
|
+
consola.error("Bundle validation failed");
|
|
3898
|
+
process.exit(1);
|
|
3899
|
+
}
|
|
3900
|
+
consola.success("Validation passed");
|
|
3901
|
+
if (validateOnly) return;
|
|
3902
|
+
await mkdir(outDir, { recursive: true });
|
|
3903
|
+
const tarballName = `${manifest.id.replace(SLASH_RE, "-").replace(LEADING_AT_RE, "")}-${manifest.version}.tar.gz`;
|
|
3904
|
+
const tarballPath = join(outDir, tarballName);
|
|
3905
|
+
consola.start("Creating tarball...");
|
|
3906
|
+
await createTarball(bundleDir, tarballPath);
|
|
3907
|
+
const tarballSizeKB = ((await stat(tarballPath)).size / 1024).toFixed(1);
|
|
3908
|
+
const tarballBuf = await readFile(tarballPath);
|
|
3909
|
+
const checksum = createHash("sha256").update(tarballBuf).digest("hex");
|
|
3910
|
+
consola.success(`Created ${tarballName} (${tarballSizeKB}KB)`);
|
|
3911
|
+
consola.info(` SHA-256: ${checksum}`);
|
|
3912
|
+
consola.info(` Path: ${tarballPath}`);
|
|
3913
|
+
} finally {
|
|
3914
|
+
if (tmpDir.endsWith(".emdash-bundle-tmp")) await rm(tmpDir, {
|
|
3915
|
+
recursive: true,
|
|
3916
|
+
force: true
|
|
3917
|
+
});
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
});
|
|
3921
|
+
|
|
3107
3922
|
//#endregion
|
|
3108
3923
|
//#region src/cli/commands/plugin-init.ts
|
|
3109
3924
|
/**
|
|
@@ -3164,7 +3979,7 @@ const pluginInitCommand = defineCommand({
|
|
|
3164
3979
|
process.exit(1);
|
|
3165
3980
|
}
|
|
3166
3981
|
const srcDir = join(targetDir, "src");
|
|
3167
|
-
if (await fileExists$
|
|
3982
|
+
if (await fileExists$1(join(targetDir, "package.json"))) {
|
|
3168
3983
|
consola.error(`package.json already exists in ${targetDir}`);
|
|
3169
3984
|
process.exit(1);
|
|
3170
3985
|
}
|
|
@@ -3541,7 +4356,7 @@ async function pollGitHubDeviceFlow(tokenEndpoint, clientId, deviceCode, interva
|
|
|
3541
4356
|
}
|
|
3542
4357
|
throw new Error("Device code expired (timeout). Please try again.");
|
|
3543
4358
|
}
|
|
3544
|
-
const manifestSummarySchema =
|
|
4359
|
+
const manifestSummarySchema = pluginManifestBaseSchema.pick({
|
|
3545
4360
|
id: true,
|
|
3546
4361
|
version: true,
|
|
3547
4362
|
capabilities: true,
|
|
@@ -3646,7 +4461,7 @@ const publishCommand = defineCommand({
|
|
|
3646
4461
|
const pluginDir = resolve(args.dir);
|
|
3647
4462
|
try {
|
|
3648
4463
|
const { runCommand } = await import("citty");
|
|
3649
|
-
const { bundleCommand } = await
|
|
4464
|
+
const { bundleCommand } = await Promise.resolve().then(() => bundle_exports);
|
|
3650
4465
|
await runCommand(bundleCommand, { rawArgs: ["--dir", pluginDir] });
|
|
3651
4466
|
} catch {
|
|
3652
4467
|
consola.error("Build failed");
|