dineway 0.1.49 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-DUaz_w7p.mjs +79 -0
- package/dist/{activity-events-CwM7yxPW.mjs → activity-events-CJDvE2uc.mjs} +5 -113
- package/dist/actor-0QJ1Gbtf.mjs +37 -0
- package/dist/after-BfniwgIf.mjs +9 -0
- package/dist/{allowed-origins-CyGnbgBd.mjs → allowed-origins--OwHHiY8.mjs} +1 -1
- package/dist/api/route-utils.d.mts +9 -10
- package/dist/api/route-utils.mjs +16 -13
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -4
- package/dist/{api-BMIxRIEN.mjs → api-B4PHIF4V.mjs} +93 -41
- package/dist/{api-tokens-DtvdtIkm.mjs → api-tokens-tbK_sORH.mjs} +6 -2
- package/dist/{apply-D_RlTYtC.mjs → apply-DjTqq6Ae.mjs} +117 -77
- package/dist/astro/image-endpoint.d.mts +7 -0
- package/dist/astro/image-endpoint.mjs +54 -0
- package/dist/astro/index.d.mts +34 -11
- package/dist/astro/index.mjs +163 -24
- package/dist/astro/integration/shims/use-sync-external-store-with-selector.js +71 -0
- package/dist/astro/integration/shims/use-sync-external-store.js +1 -0
- package/dist/astro/middleware/auth.d.mts +8 -18
- package/dist/astro/middleware/auth.mjs +42 -24
- package/dist/astro/middleware/redirect.mjs +13 -4
- package/dist/astro/middleware/request-context.mjs +8 -5
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +389 -206
- package/dist/astro/routes/admin.astro +6 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/briefing.mjs +21 -17
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -8
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -8
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -8
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +17 -14
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +17 -14
- package/dist/astro/routes/api/admin/bylines/index.mjs +17 -14
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +14 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +11 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +11 -9
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +27 -24
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +27 -24
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +32 -28
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +32 -28
- package/dist/astro/routes/api/admin/context/diff.mjs +31 -27
- package/dist/astro/routes/api/admin/context/index.mjs +32 -28
- package/dist/astro/routes/api/admin/context/stale.mjs +31 -27
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +27 -24
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +31 -27
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +31 -27
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +28 -25
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +56 -51
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +56 -51
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +47 -43
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +54 -49
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +53 -48
- package/dist/astro/routes/api/admin/plugins/index.mjs +47 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +46 -42
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +53 -48
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +46 -42
- package/dist/astro/routes/api/admin/plugins/updates.mjs +46 -42
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +32 -63
- package/dist/astro/routes/api/admin/review-requests/index.d.mts +2 -1
- package/dist/astro/routes/api/admin/review-requests/index.mjs +58 -10
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +46 -42
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +46 -42
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +4 -4
- package/dist/astro/routes/api/admin/users/index.mjs +7 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -11
- package/dist/astro/routes/api/auth/invite/index.mjs +9 -8
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -10
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +11 -10
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +9 -8
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +12 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +10 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +11 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -10
- package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -11
- package/dist/astro/routes/api/auth/signup/request.mjs +11 -10
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +15 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts +8 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +160 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +49 -20
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +67 -32
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +16 -14
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -9
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +11 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -6
- package/dist/astro/routes/api/dashboard.mjs +9 -8
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +22 -10
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +9 -6
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +18 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +85 -37
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +20 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +36 -32
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +17 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +121 -100
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +24 -12
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +55 -2
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +284 -55
- package/dist/astro/routes/api/manifest.mjs +14 -5
- package/dist/astro/routes/api/mcp.mjs +753 -170
- package/dist/astro/routes/api/media/_id_/confirm.mjs +38 -10
- package/dist/astro/routes/api/media/_id_.mjs +11 -7
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +11 -10
- package/dist/astro/routes/api/media.mjs +28 -35
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +32 -28
- package/dist/astro/routes/api/menus/_name_/items.mjs +32 -28
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +32 -28
- package/dist/astro/routes/api/menus/_name_/translations.mjs +32 -28
- package/dist/astro/routes/api/menus/_name_.mjs +32 -28
- package/dist/astro/routes/api/menus/index.mjs +32 -28
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +4 -3
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +46 -31
- package/dist/astro/routes/api/redirects/404s/index.mjs +11 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +11 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +33 -29
- package/dist/astro/routes/api/redirects/index.mjs +33 -29
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +48 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +48 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +48 -43
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +48 -43
- package/dist/astro/routes/api/schema/collections/index.mjs +48 -43
- package/dist/astro/routes/api/schema/index.mjs +14 -15
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +46 -42
- package/dist/astro/routes/api/schema/orphans/index.mjs +46 -42
- package/dist/astro/routes/api/search/enable.mjs +11 -10
- package/dist/astro/routes/api/search/index.mjs +10 -9
- package/dist/astro/routes/api/search/rebuild.mjs +11 -10
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +10 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +32 -28
- package/dist/astro/routes/api/sections/index.mjs +32 -28
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +32 -28
- package/dist/astro/routes/api/setup/admin-verify.mjs +14 -13
- package/dist/astro/routes/api/setup/admin.mjs +12 -11
- package/dist/astro/routes/api/setup/dev-bypass.mjs +31 -25
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +29 -25
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +8 -7
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +35 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +35 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +35 -31
- package/dist/astro/routes/api/taxonomies/index.mjs +35 -31
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +31 -27
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +32 -28
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +32 -28
- package/dist/astro/routes/api/widget-areas/_name_.mjs +29 -26
- package/dist/astro/routes/api/widget-areas/index.mjs +32 -28
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +8 -7
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +23 -14
- package/dist/astro/routes/sitemap.xml.mjs +9 -8
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +22 -13
- package/dist/{audit-BeNsSyfU.mjs → audit-B2pRxZ20.mjs} +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-Dr14I98m.mjs → auth-control-guard-D71jourk.mjs} +1 -1
- package/dist/{authorize-BLO0m7fW.mjs → authorize-ZXPGPwKn.mjs} +1 -1
- package/dist/{briefing-CkTee1ex.mjs → briefing-0rf-su3-.mjs} +90 -28
- package/dist/{briefing-DJX6irto.mjs → briefing-kRhegBoF.mjs} +2 -1
- package/dist/bundle-CEcdUa1s.mjs +602 -0
- package/dist/{byline-BVC1lV6G.mjs → byline-7xR185Ly.mjs} +30 -62
- package/dist/{byline-fields-Cj39WhXC.mjs → byline-fields-BKzA0fJU.mjs} +1 -1
- package/dist/{byline-fields-uJlygdzM.d.mts → byline-fields-Ckeqd1OY.d.mts} +88 -35
- package/dist/{byline-fields-cNrLJVRs.mjs → byline-fields-WN7RQT4q.mjs} +10 -4
- package/dist/{byline-registry-4v6tXMNX.mjs → byline-registry-Ba54M74c.mjs} +2 -2
- package/dist/{bylines-LN9XISRo.mjs → bylines-C-EL6dh3.mjs} +9 -3
- package/dist/{bylines-DwokOFj6.mjs → bylines-CmZFCMr0.mjs} +5 -5
- package/dist/{cache-Bac05gBd.mjs → cache-DkVCKGio.mjs} +2 -2
- package/dist/{chunks-CuUt7K50.mjs → chunks-ChGNDY8r.mjs} +1 -1
- package/dist/cli/index.d.mts +29 -1
- package/dist/cli/index.mjs +1466 -1763
- package/dist/cli/plugin-kit.d.mts +75 -0
- package/dist/cli/plugin-kit.mjs +4 -0
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +27 -52
- package/dist/client/index.mjs +34 -6
- package/dist/client-factory-BDD9azPJ.mjs +233 -0
- package/dist/{comment-Beue8-15.mjs → comment-DFALgsJD.mjs} +13 -3
- package/dist/comment-reaction-C37bf99u.mjs +58 -0
- package/dist/{comments-DcjFIfqX.mjs → comments-B3NwDBxl.mjs} +1 -1
- package/dist/{content-CBxYGWfL.mjs → content-DJcAYFhz.mjs} +51 -34
- package/dist/content-refresh-B4ZCmxgd.mjs +1576 -0
- package/dist/{context-Df1xVYyr.mjs → context-DnpXcp6Y.mjs} +2 -2
- package/dist/{context-CQVNZaR8.mjs → context-fSCYLL3c.mjs} +125 -53
- package/dist/{context-route-helpers-B9wj8Rmh.mjs → context-route-helpers-CI8XzcsK.mjs} +2 -1
- package/dist/{cron-DxCAU_Sn.mjs → cron-B1SL_lsb.mjs} +7 -3
- package/dist/{dashboard-B7ZUNuyF.mjs → dashboard-D0nj5oWg.mjs} +4 -4
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-BZVGftqi.mjs → device-flow-BJe6VEhP.mjs} +5 -5
- package/dist/{placeholder-d54Qr_7n.mjs → enrich-Ck9tfMqe.mjs} +36 -9
- package/dist/{error-DCSuUAZW.mjs → error-CSVaQNZy.mjs} +5 -0
- package/dist/{experimental-workflows-CSMffP6q.mjs → experimental-workflows-GVhUgzEs.mjs} +1 -1
- package/dist/field-defs-cache-DL-T2XVS.mjs +49 -0
- package/dist/forgeway-seo-client-G5ddhVHd.mjs +456 -0
- package/dist/{fts-manager-B5l_qwrA.mjs → fts-manager-ewTGohf4.mjs} +1 -1
- package/dist/{hitl-requests-7NlzVeUA.mjs → hitl-requests-DEFj8e6u.mjs} +2 -2
- package/dist/{hitl-route-helpers-k---_H3-.mjs → hitl-route-helpers-C23JHaWz.mjs} +5 -4
- package/dist/import-CXXL5pip.mjs +1354 -0
- package/dist/index-DcnOCD1e.d.mts +375 -0
- package/dist/index.d.mts +15 -16
- package/dist/index.mjs +85 -70
- package/dist/{jsonld-DZ67souc.d.mts → jsonld-DzKbhRZ4.d.mts} +8 -4
- package/dist/{load-D9OiGr2m.mjs → load-CFtJRT3c.mjs} +1 -1
- package/dist/{loader--GOYux8M.mjs → loader-aWkkc1_o.mjs} +117 -31
- package/dist/{manifest-schema-qh2P7RDX.mjs → manifest-schema-uA6pRFXi.mjs} +38 -1
- package/dist/mcp-reviewed-executor-Dn52L_yY.mjs +558 -0
- package/dist/media/image-endpoint.d.mts +32 -0
- package/dist/media/image-endpoint.mjs +111 -0
- package/dist/media/index.d.mts +27 -2
- package/dist/media/index.mjs +5 -3
- package/dist/media/local-runtime.d.mts +15 -11
- package/dist/media/local-runtime.mjs +9 -7
- package/dist/{media-CbKyYukG.mjs → media-CVMOoywq.mjs} +3 -1
- package/dist/{media-allowlist-BYxJIcTO.mjs → media-allowlist-zDNJmXCo.mjs} +1 -1
- package/dist/media-url-BdoLPvg8.mjs +20 -0
- package/dist/{menus-C7F0sCrC.mjs → menus-CCG2z5um.mjs} +80 -15
- package/dist/{menus-BZbXf-ej.mjs → menus-CmyIkRG5.mjs} +19 -5
- package/dist/{normalize-ByemhhfW.mjs → normalize-Cyt7JdF7.mjs} +8 -1
- package/dist/{oauth-authorization-DF-LCsIA.mjs → oauth-authorization-B9H7X85L.mjs} +5 -5
- package/dist/{oauth-clients-Du-V0fEm.mjs → oauth-clients-Dwl32-Uj.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +14 -0
- package/dist/object-cache/memory.mjs +55 -0
- package/dist/object-cache-D51qOseS.mjs +419 -0
- package/dist/output-DhBe5_Pi.mjs +68 -0
- package/dist/page/index.d.mts +10 -3
- package/dist/page/index.mjs +2 -2
- package/dist/{parse-CneSgl7-.mjs → parse-i15EFSAE.mjs} +1 -1
- package/dist/{parser-DxfsARXL.mjs → parser-06LLLL4E.mjs} +151 -9
- package/dist/{placeholder-CXfoCtCd.d.mts → placeholder-DkWkXfDI.d.mts} +12 -4
- package/dist/plugin-utils.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +13 -2
- package/dist/{plugins-DzfqRREq.mjs → plugins-CPA2PtfY.mjs} +919 -66
- package/dist/{transport-LSdZVXHF.mjs → portable-text-BASHceim.mjs} +1 -134
- package/dist/portable-text-E79LyjGo.d.mts +45 -0
- package/dist/{preview-C-3YTX2U.mjs → preview-BjedZm8G.mjs} +4 -3
- package/dist/process-cache-CCDgti7j.mjs +106 -0
- package/dist/project-env-DKibmuP8.mjs +95 -0
- package/dist/{provider-loader-9it4vd6L.d.mts → provider-loader-DC2JdWeO.d.mts} +1 -1
- package/dist/{public-url-B4xV4rGa.d.mts → public-url-DQJCnYi9.d.mts} +1 -1
- package/dist/publication-authorization-RKiHXKtq.mjs +985 -0
- package/dist/{query-CZ3TH_Uu.mjs → query-C2U5u5_p.mjs} +11 -6
- package/dist/{query-Ds0EnMFX.mjs → query-DEv5x6yB.mjs} +281 -76
- package/dist/{rate-limit-i0G3IAOX.mjs → rate-limit-DglsAJSw.mjs} +2 -2
- package/dist/{redirect-CEACczxo.mjs → redirect-ubhEqQCQ.mjs} +2 -2
- package/dist/{redirects-ocRJmQHP.mjs → redirects-Bhpm8bRe.mjs} +35 -19
- package/dist/{redirects-DYj1yPxs.mjs → redirects-xs2yahLq.mjs} +47 -24
- package/dist/{registry-D7HACema.mjs → registry-BYYyb2tF.mjs} +148 -81
- package/dist/request-context.d.mts +2 -0
- package/dist/{request-meta-DAb6xaP9.mjs → request-meta-CFe1tW2M.mjs} +1 -1
- package/dist/review-payload-BysRWpxS.mjs +111 -0
- package/dist/{review-requests-BW2NxY-l.mjs → review-requests-CTWGnWUt.mjs} +1 -1
- package/dist/review-requests-D42VEP1l.mjs +142 -0
- package/dist/review-route-helpers-C31vO6SI.mjs +41 -0
- package/dist/runner-BgmttQmD.mjs +7444 -0
- package/dist/{runner-09sTqtv0.d.mts → runner-D6hzs8L9.d.mts} +1 -1
- package/dist/runtime.d.mts +9 -10
- package/dist/runtime.mjs +3 -3
- package/dist/schema-DUtnZxjZ.mjs +8 -0
- package/dist/{search-Gdrqj582.mjs → search-DUKgZUlm.mjs} +5 -3
- package/dist/{secrets-CeGpBFV2.mjs → secrets-ZV5rd8yV.mjs} +14 -11
- package/dist/{sections-BOjU13Y-.mjs → sections-DvFgsnda.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +21 -18
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +3 -12
- package/dist/{seo-5lJOtB5J.mjs → seo-BLszyJxd.mjs} +22 -4
- package/dist/{seo-CLj8lS7Q.mjs → seo-BU8MLCS9.mjs} +5 -2
- package/dist/{seo-contributions-CqVvReEj.mjs → seo-contributions-GnCuL1ML.mjs} +11 -3
- package/dist/{service-jGlhrICs.mjs → service-FL3fB0Rx.mjs} +2 -2
- package/dist/session-user-Ct6GBLvn.mjs +22 -0
- package/dist/{settings-CUXOxzsT.mjs → settings-BECcAIRH.mjs} +28 -55
- package/dist/{settings-DlBsT2VS.mjs → settings-EzADu-dd.mjs} +2 -2
- package/dist/{setup-complete-BRrdPYjZ.mjs → setup-complete-Da0axZEE.mjs} +1 -1
- package/dist/{site-activity-DONFrMBJ.mjs → site-activity-h8smOlYI.mjs} +1 -1
- package/dist/{site-context-C8Az_P_I.mjs → site-context-B8T1kpUP.mjs} +337 -530
- package/dist/{site-url-DIMD68go.mjs → site-url-DJEid0ml.mjs} +1 -1
- package/dist/stable-hash-DshcXvRE.mjs +19 -0
- package/dist/status-NqWOSFAD.mjs +21 -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/{taxonomies-D9Sw4wWM.mjs → taxonomies-BiM9NtgW.mjs} +36 -29
- package/dist/taxonomies-DSnY5nOa.mjs +443 -0
- package/dist/{taxonomy-B169Nm6B.mjs → taxonomy-0k_vRVsD.mjs} +44 -9
- package/dist/transport-C46KHLMP.mjs +134 -0
- package/dist/types-A8fPOJnl.mjs +69 -0
- package/dist/types-BLQCz46p.d.mts +118 -0
- package/dist/{types-CwawBUTa.d.mts → types-B_FlxIIl.d.mts} +4 -1
- package/dist/{types-CSgR9nQB.mjs → types-ChxYDRvx.mjs} +1 -1
- package/dist/{types-GaCtZ1k9.d.mts → types-Cw0PeCT_.d.mts} +18 -0
- package/dist/types-DuQn1G7-.d.mts +2973 -0
- package/dist/{runtime-C4-2lSFg.d.mts → types-DwoUifGE.d.mts} +5668 -3000
- package/dist/{types-DRIKLmJI.d.mts → types-opjX_kz6.d.mts} +17 -2
- package/dist/ui/server-runtime.d.mts +13 -15
- package/dist/ui/server-runtime.mjs +24 -20
- package/dist/url-guoXQQcV.mjs +33 -0
- package/dist/{user-DTLoZs16.mjs → user-BH-n01y3.mjs} +2 -2
- package/dist/{utils-B8hBJ9Oz.mjs → utils-D1SrKGtP.mjs} +129 -7
- package/dist/{validate-DzjCdy6v.d.mts → validate-CbVFoJgc.d.mts} +65 -8
- package/dist/{validate-DWmPO6oj.mjs → validate-D1HL-oLR.mjs} +11 -6
- package/dist/version-C3iVRuaF.mjs +6 -0
- package/dist/{widgets-BpJ8EpPd.mjs → widgets-BZrLrNgS.mjs} +46 -43
- package/dist/{wordpress-slugs-DHNR9LpG.mjs → wordpress-slugs-C3PWcowq.mjs} +1 -1
- package/dist/{zod-generator-K91-g665.mjs → zod-generator-C7AsLpSB.mjs} +42 -14
- package/package.json +38 -8
- package/src/components/Block.astro +50 -0
- package/src/components/Comments.astro +143 -1
- package/src/components/DinewayHead.astro +19 -2
- package/src/components/DinewayImage.astro +66 -33
- package/src/components/DinewayMedia.astro +1 -2
- package/src/components/Image.astro +85 -40
- package/src/components/InlinePortableTextEditor.tsx +12 -2
- package/src/components/JsonLdScript.astro +9 -0
- package/src/components/LiveSearch.astro +40 -4
- package/src/components/index.ts +4 -0
- package/src/components/live-search-routing.ts +30 -0
- package/src/components/portable-text-text-align.ts +15 -0
- package/src/ui.ts +2 -0
- package/dist/entity-aliases-4y93Yjuc.mjs +0 -51
- package/dist/import-4YBXbDkI.mjs +0 -684
- package/dist/index-CZiWCQDp.d.mts +0 -227
- package/dist/review-requests-Qum4713s.mjs +0 -79
- package/dist/runner-DzIpHGND.mjs +0 -2836
- package/dist/schema-Bsi-VpYv.mjs +0 -8
- package/dist/taxonomies-CZ-_DitR.mjs +0 -327
- package/dist/types-CuJOqHfM.d.mts +0 -758
- package/dist/types-DSPGWjxO.d.mts +0 -1247
- package/dist/types-nP9vGUFq.d.mts +0 -56
- package/dist/version-C4gfn0PJ.mjs +0 -6
- /package/dist/{adapters-OQCImOL7.d.mts → adapters-BiRymx02.d.mts} +0 -0
- /package/dist/{api-tokens-CYUoFGo7.mjs → api-tokens-Ypaly90d.mjs} +0 -0
- /package/dist/{challenge-store-DFxX0_15.mjs → challenge-store-D5pSY2S1.mjs} +0 -0
- /package/dist/{components--pg6zBvu.mjs → components-DImzlLhb.mjs} +0 -0
- /package/dist/{context-types-r8oFvyOq.mjs → context-types-eBuMDAg-.mjs} +0 -0
- /package/dist/{default-B6iaLvP7.mjs → default-D4Vygcy_.mjs} +0 -0
- /package/dist/{email-console-BOVqIYpB.mjs → email-console-Bp0r68iF.mjs} +0 -0
- /package/dist/{escape-BDgouFFY.mjs → escape-DN4Qmjsl.mjs} +0 -0
- /package/dist/{hash-BPmX6P8I.mjs → hash-mxxx2oPW.mjs} +0 -0
- /package/dist/{mime-CbKsKDCB.mjs → mime-C0vOHFm7.mjs} +0 -0
- /package/dist/{mode-CZqCF9dZ.mjs → mode-C8yZnIlR.mjs} +0 -0
- /package/dist/{oauth-state-store-qncPB_IU.mjs → oauth-state-store-CndT35iw.mjs} +0 -0
- /package/dist/{oauth-user-lookup-BFjWF8wK.mjs → oauth-user-lookup-CMehAaKs.mjs} +0 -0
- /package/dist/{options-LsPjZlqD.mjs → options-DQPTH5n0.mjs} +0 -0
- /package/dist/{passkey-config-DzHQK90v.mjs → passkey-config-NYukYGed.mjs} +0 -0
- /package/dist/{patterns-DKAX6oqN.mjs → patterns-CoqlXUvk.mjs} +0 -0
- /package/dist/{provider-loader-DzUxejk7.mjs → provider-loader-BtfrrzfD.mjs} +0 -0
- /package/dist/{public-url-B_m9IwdV.mjs → public-url-Cp6hyjVR.mjs} +0 -0
- /package/dist/{redirect-BjIBtDWY.mjs → redirect-DrbEmU9a.mjs} +0 -0
- /package/dist/{request-cache-ho99schz.mjs → request-cache-CBFjCwSt.mjs} +0 -0
- /package/dist/{resolve-DTuDyYKs.mjs → resolve-DE71WcL9.mjs} +0 -0
- /package/dist/{setup-nonce-pyGfc9hV.mjs → setup-nonce-BtkKnvxQ.mjs} +0 -0
- /package/dist/{sidecar-client-mJxwayYN.mjs → sidecar-client-Ctzfyyp-.mjs} +0 -0
- /package/dist/{slugify-BqebcqBg.mjs → slugify-KSsVD_D3.mjs} +0 -0
- /package/dist/{ssrf-DiKqWd3N.mjs → ssrf-FJqwQzj4.mjs} +0 -0
- /package/dist/{tokens-SLmgowfd.mjs → tokens-BDQU29Vd.mjs} +0 -0
- /package/dist/{transaction-CFLhEOuH.mjs → transaction-0LEAAy8R.mjs} +0 -0
- /package/dist/{transport-BnsNxh2l.d.mts → transport-D9pKAzFP.d.mts} +0 -0
- /package/dist/{trusted-proxy-BgIIcbsN.mjs → trusted-proxy-Dm7Mxvt6.mjs} +0 -0
- /package/dist/{types-CJ8DkL0q.mjs → types-B7TDDFMG.mjs} +0 -0
- /package/dist/{types-Dryvv7LH.d.mts → types-g0zMtraY.d.mts} +0 -0
- /package/dist/{types-Cg276-3z.mjs → types-mVVgRPaU.mjs} +0 -0
- /package/dist/{types-DZpT-PnG.d.mts → types-wFu80FrO.d.mts} +0 -0
- /package/dist/{url-w7Mp5qAD.mjs → url-EMAguGVk.mjs} +0 -0
|
@@ -1,81 +1,96 @@
|
|
|
1
|
-
import { i as runMigrations } from "../runner-
|
|
1
|
+
import { i as runMigrations } from "../runner-BgmttQmD.mjs";
|
|
2
2
|
import "../connection-CiJWiWya.mjs";
|
|
3
3
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
4
4
|
import { s as isSqlite } from "../dialect-helpers-fk43GbDb.mjs";
|
|
5
5
|
import { i as setI18nConfig } from "../config-CVssduLe.mjs";
|
|
6
|
-
import { d as EmailPipeline, g as
|
|
6
|
+
import { _ as DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES, d as EmailPipeline, g as definePlugin, h as runPluginMigrations, m as resolveExclusiveHooks, p as createHookPipeline, u as PluginRouteRegistry, v as readBoundedPluginRouteBody } from "../plugins-CPA2PtfY.mjs";
|
|
7
7
|
import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
|
|
8
8
|
import { createRecorder, flushRecorder, formatServerTimingHeader, isInstrumentationEnabled, isServerTimingEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
9
9
|
import "../base64-F8-DUraK.mjs";
|
|
10
|
-
import "../types-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import {
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import {
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import
|
|
32
|
-
import "../
|
|
33
|
-
import {
|
|
34
|
-
import "../
|
|
35
|
-
import
|
|
36
|
-
import {
|
|
37
|
-
import
|
|
38
|
-
import "../briefing-
|
|
39
|
-
import "../
|
|
40
|
-
import {
|
|
41
|
-
import { n as
|
|
42
|
-
import "../
|
|
43
|
-
import "../
|
|
44
|
-
import "../
|
|
45
|
-
import "../
|
|
46
|
-
import "../
|
|
47
|
-
import "../
|
|
48
|
-
import "../
|
|
49
|
-
import "../
|
|
50
|
-
import "../
|
|
51
|
-
import "../
|
|
52
|
-
import "../
|
|
53
|
-
import
|
|
54
|
-
import "../
|
|
55
|
-
import "../
|
|
56
|
-
import "../
|
|
57
|
-
import
|
|
58
|
-
import "../
|
|
59
|
-
import "../
|
|
60
|
-
import {
|
|
61
|
-
import
|
|
62
|
-
import "../
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import "../
|
|
66
|
-
import "../
|
|
67
|
-
import "../
|
|
68
|
-
import "../
|
|
69
|
-
import "../
|
|
70
|
-
import "../
|
|
71
|
-
import "../
|
|
72
|
-
import "../
|
|
73
|
-
import "../
|
|
10
|
+
import "../types-ChxYDRvx.mjs";
|
|
11
|
+
import { o as isMissingTableError, r as getDb } from "../loader-aWkkc1_o.mjs";
|
|
12
|
+
import { t as after } from "../after-BfniwgIf.mjs";
|
|
13
|
+
import "../object-cache-D51qOseS.mjs";
|
|
14
|
+
import { r as RevisionRepository, t as ContentRepository } from "../content-DJcAYFhz.mjs";
|
|
15
|
+
import { t as MediaRepository } from "../media-CVMOoywq.mjs";
|
|
16
|
+
import "../user-BH-n01y3.mjs";
|
|
17
|
+
import "../taxonomy-0k_vRVsD.mjs";
|
|
18
|
+
import "../comment-DFALgsJD.mjs";
|
|
19
|
+
import { t as OptionsRepository } from "../options-DQPTH5n0.mjs";
|
|
20
|
+
import "../audit-B2pRxZ20.mjs";
|
|
21
|
+
import "../site-activity-h8smOlYI.mjs";
|
|
22
|
+
import "../review-requests-CTWGnWUt.mjs";
|
|
23
|
+
import { n as PublicationAuthorizationService, t as PublicationAuthorizationError } from "../publication-authorization-RKiHXKtq.mjs";
|
|
24
|
+
import "../site-context-B8T1kpUP.mjs";
|
|
25
|
+
import { t as PluginContextFactory } from "../context-fSCYLL3c.mjs";
|
|
26
|
+
import "../menus-CmyIkRG5.mjs";
|
|
27
|
+
import "../redirect-ubhEqQCQ.mjs";
|
|
28
|
+
import { r as requestCached } from "../request-cache-CBFjCwSt.mjs";
|
|
29
|
+
import "../byline-registry-Ba54M74c.mjs";
|
|
30
|
+
import { a as initWithLock, i as createInitLock, r as processCachedAsync, t as createProcessCache } from "../process-cache-CCDgti7j.mjs";
|
|
31
|
+
import "../field-defs-cache-DL-T2XVS.mjs";
|
|
32
|
+
import "../byline-7xR185Ly.mjs";
|
|
33
|
+
import { n as normalizeMediaValue } from "../normalize-Cyt7JdF7.mjs";
|
|
34
|
+
import "../enrich-Ck9tfMqe.mjs";
|
|
35
|
+
import "../seo-BU8MLCS9.mjs";
|
|
36
|
+
import { $ as handleContentUpdate, A as handleRevisionGet, B as handleContentDiscardDraft, D as handleMediaGet, E as handleMediaDelete, F as handleContentCompare, G as handleContentListTrashed, H as handleContentGet, I as handleContentCountScheduled, J as handleContentRestore, K as handleContentPermanentDelete, L as handleContentCountTrashed, M as handleRevisionRestore, O as handleMediaList, P as handleContentAuthors, Q as handleContentUnschedule, R as handleContentCreate, T as handleMediaCreate, U as handleContentGetIncludingTrashed, V as handleContentDuplicate, W as handleContentList, X as handleContentTranslations, Y as handleContentSchedule, Z as handleContentUnpublish, d as createPluginBundleStore, et as validateRev, j as handleRevisionList, k as handleMediaUpdate, q as handleContentPublish, z as handleContentDelete } from "../api-B4PHIF4V.mjs";
|
|
37
|
+
import "../dashboard-D0nj5oWg.mjs";
|
|
38
|
+
import { u as PluginStateRepository } from "../briefing-0rf-su3-.mjs";
|
|
39
|
+
import "../context-types-eBuMDAg-.mjs";
|
|
40
|
+
import { i as markContentMediaUsageCollectionStale, o as refreshContentMediaUsageAfterWrite, r as findNonTranslatableSiblingContentIds, t as deleteContentMediaUsage } from "../content-refresh-B4ZCmxgd.mjs";
|
|
41
|
+
import { n as hashString } from "../hash-mxxx2oPW.mjs";
|
|
42
|
+
import { t as FTSManager } from "../fts-manager-ewTGohf4.mjs";
|
|
43
|
+
import { n as SchemaRegistry } from "../registry-BYYyb2tF.mjs";
|
|
44
|
+
import { r as createPublicMediaUrlResolver } from "../url-guoXQQcV.mjs";
|
|
45
|
+
import "../settings-BECcAIRH.mjs";
|
|
46
|
+
import "../briefing-kRhegBoF.mjs";
|
|
47
|
+
import "../review-requests-D42VEP1l.mjs";
|
|
48
|
+
import { n as VERSION, t as COMMIT } from "../version-C3iVRuaF.mjs";
|
|
49
|
+
import "../query-C2U5u5_p.mjs";
|
|
50
|
+
import "../zod-generator-C7AsLpSB.mjs";
|
|
51
|
+
import "../schema-DUtnZxjZ.mjs";
|
|
52
|
+
import "../seo-BLszyJxd.mjs";
|
|
53
|
+
import "../bylines-C-EL6dh3.mjs";
|
|
54
|
+
import "../byline-fields-BKzA0fJU.mjs";
|
|
55
|
+
import "../sections-DvFgsnda.mjs";
|
|
56
|
+
import "../settings-EzADu-dd.mjs";
|
|
57
|
+
import "../resolve-DE71WcL9.mjs";
|
|
58
|
+
import "../taxonomies-DSnY5nOa.mjs";
|
|
59
|
+
import "../taxonomies-BiM9NtgW.mjs";
|
|
60
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-uA6pRFXi.mjs";
|
|
61
|
+
import "../parse-i15EFSAE.mjs";
|
|
62
|
+
import "../redirects-Bhpm8bRe.mjs";
|
|
63
|
+
import "../byline-fields-WN7RQT4q.mjs";
|
|
64
|
+
import "../status-NqWOSFAD.mjs";
|
|
65
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-Dm7Mxvt6.mjs";
|
|
66
|
+
import "../rate-limit-DglsAJSw.mjs";
|
|
67
|
+
import { a as invalidateUrlPatternCache } from "../query-DEv5x6yB.mjs";
|
|
68
|
+
import "../preview-BjedZm8G.mjs";
|
|
69
|
+
import "../parser-06LLLL4E.mjs";
|
|
70
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-CFe1tW2M.mjs";
|
|
71
|
+
import "../ssrf-FJqwQzj4.mjs";
|
|
72
|
+
import { n as CronExecutor } from "../cron-B1SL_lsb.mjs";
|
|
73
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-Bp0r68iF.mjs";
|
|
74
|
+
import { o as validateEncryptionKeyAtStartup } from "../secrets-ZV5rd8yV.mjs";
|
|
75
|
+
import "../api-tokens-Ypaly90d.mjs";
|
|
76
|
+
import { n as createActivePluginMcpRegistry } from "../mcp-reviewed-executor-Dn52L_yY.mjs";
|
|
77
|
+
import "../activity-DUaz_w7p.mjs";
|
|
78
|
+
import "../activity-events-CJDvE2uc.mjs";
|
|
79
|
+
import { i as experimentalSiteContextWorkflowsEnabled } from "../experimental-workflows-GVhUgzEs.mjs";
|
|
80
|
+
import "../utils-D1SrKGtP.mjs";
|
|
81
|
+
import "../search-DUKgZUlm.mjs";
|
|
82
|
+
import "../import-CXXL5pip.mjs";
|
|
83
|
+
import "../tokens-BDQU29Vd.mjs";
|
|
84
|
+
import "../comment-reaction-C37bf99u.mjs";
|
|
85
|
+
import "../menus-CCG2z5um.mjs";
|
|
86
|
+
import "../bylines-CmZFCMr0.mjs";
|
|
87
|
+
import "../widgets-BZrLrNgS.mjs";
|
|
88
|
+
import "../apply-DjTqq6Ae.mjs";
|
|
89
|
+
import "../load-CFtJRT3c.mjs";
|
|
74
90
|
import "../index.mjs";
|
|
75
|
-
import { t as getAuthMode } from "../mode-
|
|
76
|
-
import {
|
|
77
|
-
import { t as
|
|
78
|
-
import { a as validateEncryptionKeyAtStartup } from "../secrets-CeGpBFV2.mjs";
|
|
91
|
+
import { t as getAuthMode } from "../mode-C8yZnIlR.mjs";
|
|
92
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-D5pSY2S1.mjs";
|
|
93
|
+
import { t as resolveSessionUser } from "../session-user-Ct6GBLvn.mjs";
|
|
79
94
|
import { Kysely, sql } from "kysely";
|
|
80
95
|
import { defineMiddleware } from "astro:middleware";
|
|
81
96
|
import virtualConfig from "virtual:dineway/config";
|
|
@@ -348,6 +363,10 @@ const SCHEDULED_PUBLISH_BATCH_LIMIT = 100;
|
|
|
348
363
|
async function publishDueContent(db, options = {}) {
|
|
349
364
|
const { publish, onPublished, limit = SCHEDULED_PUBLISH_BATCH_LIMIT } = options;
|
|
350
365
|
const published = [];
|
|
366
|
+
if (!publish) {
|
|
367
|
+
console.error("[scheduled-publish] Authorized publication callback is required");
|
|
368
|
+
return published;
|
|
369
|
+
}
|
|
351
370
|
let collections;
|
|
352
371
|
try {
|
|
353
372
|
collections = await new SchemaRegistry(db).listCollections();
|
|
@@ -356,22 +375,27 @@ async function publishDueContent(db, options = {}) {
|
|
|
356
375
|
return published;
|
|
357
376
|
}
|
|
358
377
|
const repo = new ContentRepository(db);
|
|
359
|
-
const doPublish = publish ?? ((collection, id, opts) => handleContentPublish(db, collection, id, opts));
|
|
360
378
|
const batchLimit = limit > 0 ? limit : void 0;
|
|
361
379
|
for (const collection of collections) try {
|
|
362
380
|
const due = await repo.findReadyToPublish(collection.slug, batchLimit);
|
|
363
381
|
const batch = [];
|
|
364
382
|
for (const item of due) {
|
|
383
|
+
if (!item.scheduledAt) continue;
|
|
365
384
|
const publishedAt = item.publishedAt == null ? item.scheduledAt ?? void 0 : void 0;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
385
|
+
try {
|
|
386
|
+
const result = await publish(collection.slug, item.id, {
|
|
387
|
+
publishedAt,
|
|
388
|
+
requireScheduledDue: true,
|
|
389
|
+
scheduledAt: item.scheduledAt
|
|
390
|
+
});
|
|
391
|
+
if (result.success) batch.push({
|
|
392
|
+
collection: collection.slug,
|
|
393
|
+
id: item.id
|
|
394
|
+
});
|
|
395
|
+
else if (result.error?.code !== "NOT_DUE") console.error(`[scheduled-publish] Failed to publish ${collection.slug}/${item.id}:`, result.error);
|
|
396
|
+
} catch (error) {
|
|
397
|
+
console.error(`[scheduled-publish] Failed to publish ${collection.slug}/${item.id}:`, error);
|
|
398
|
+
}
|
|
375
399
|
}
|
|
376
400
|
if (batch.length > 0) {
|
|
377
401
|
published.push(...batch);
|
|
@@ -387,47 +411,6 @@ async function publishDueContent(db, options = {}) {
|
|
|
387
411
|
return published;
|
|
388
412
|
}
|
|
389
413
|
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/utils/init-lock.ts
|
|
392
|
-
const DEFAULT_DEADLINE_MS = 15e3;
|
|
393
|
-
const DEFAULT_POLL_MS = 50;
|
|
394
|
-
const MAX_WAIT_HEADROOM_MS = 15e3;
|
|
395
|
-
function sleep(ms) {
|
|
396
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
397
|
-
}
|
|
398
|
-
function createInitLock() {
|
|
399
|
-
return {
|
|
400
|
-
ownerStartedAt: null,
|
|
401
|
-
generation: 0
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
async function initWithLock(lock, getCached, init, options) {
|
|
405
|
-
const deadlineMs = options?.deadlineMs ?? DEFAULT_DEADLINE_MS;
|
|
406
|
-
const pollMs = options?.pollMs ?? DEFAULT_POLL_MS;
|
|
407
|
-
const maxWaitMs = options?.maxWaitMs ?? deadlineMs + MAX_WAIT_HEADROOM_MS;
|
|
408
|
-
const waitStart = Date.now();
|
|
409
|
-
for (;;) {
|
|
410
|
-
const cached = getCached();
|
|
411
|
-
if (cached !== null && cached !== void 0) return cached;
|
|
412
|
-
const ownerStartedAt = lock.ownerStartedAt;
|
|
413
|
-
if (ownerStartedAt === null || Date.now() - ownerStartedAt > deadlineMs) {
|
|
414
|
-
lock.generation += 1;
|
|
415
|
-
const claim = lock.generation;
|
|
416
|
-
lock.ownerStartedAt = Date.now();
|
|
417
|
-
try {
|
|
418
|
-
const isCurrentClaim = () => lock.generation === claim;
|
|
419
|
-
const initPromise = Promise.resolve().then(() => init(isCurrentClaim));
|
|
420
|
-
options?.anchor?.(initPromise.then(() => void 0, () => void 0));
|
|
421
|
-
return await initPromise;
|
|
422
|
-
} finally {
|
|
423
|
-
if (lock.generation === claim) lock.ownerStartedAt = null;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
if (Date.now() - waitStart > maxWaitMs) throw new Error(`initWithLock: timed out after ${maxWaitMs}ms waiting for initialization`);
|
|
427
|
-
await sleep(pollMs);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
414
|
//#endregion
|
|
432
415
|
//#region src/dineway-runtime.ts
|
|
433
416
|
const LEADING_SLASH_PATTERN = /^\//;
|
|
@@ -553,7 +536,6 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
553
536
|
configuredPlugins;
|
|
554
537
|
sandboxedPlugins;
|
|
555
538
|
sandboxedPluginEntries;
|
|
556
|
-
schemaRegistry;
|
|
557
539
|
_hooks;
|
|
558
540
|
config;
|
|
559
541
|
mediaProviders;
|
|
@@ -576,10 +558,8 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
576
558
|
runtimeDeps;
|
|
577
559
|
/** Mutable ref for the cron invokeCronHook closure to read the current pipeline */
|
|
578
560
|
pipelineRef;
|
|
579
|
-
/**
|
|
580
|
-
|
|
581
|
-
/** Shared in-flight FTS health verification promise. */
|
|
582
|
-
_searchHealthPromise = null;
|
|
561
|
+
/** Process-lifetime FTS health check cache that never stores an in-flight promise. */
|
|
562
|
+
_searchHealthCache = createProcessCache();
|
|
583
563
|
/**
|
|
584
564
|
* Get the database instance for the current request.
|
|
585
565
|
*
|
|
@@ -599,7 +579,6 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
599
579
|
this.configuredPlugins = configuredPlugins;
|
|
600
580
|
this.sandboxedPlugins = sandboxedPlugins;
|
|
601
581
|
this.sandboxedPluginEntries = sandboxedPluginEntries;
|
|
602
|
-
this.schemaRegistry = new SchemaRegistry(db);
|
|
603
582
|
this._hooks = hooks;
|
|
604
583
|
this.enabledPlugins = enabledPlugins;
|
|
605
584
|
this.pluginStates = pluginStates;
|
|
@@ -620,12 +599,53 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
620
599
|
getSandboxRunner() {
|
|
621
600
|
return sandboxRunner;
|
|
622
601
|
}
|
|
602
|
+
get schemaRegistry() {
|
|
603
|
+
return new SchemaRegistry(this.db);
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Resolve native MCP contributions from the current active plugin set.
|
|
607
|
+
* The registry is derived per request so activate/deactivate changes cannot
|
|
608
|
+
* leave a stateless MCP server with a stale contribution snapshot.
|
|
609
|
+
*/
|
|
610
|
+
getPluginMcpRegistry() {
|
|
611
|
+
return createActivePluginMcpRegistry(this.configuredPlugins, this.enabledPlugins);
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Resolve the outbound HTTP capability for an active native plugin.
|
|
615
|
+
* MCP handlers use this instead of reaching for global fetch, so the same
|
|
616
|
+
* capability and SSRF rules apply to routes, hooks, and MCP contributions.
|
|
617
|
+
*/
|
|
618
|
+
getPluginHttpAccess(pluginId) {
|
|
619
|
+
if (!this.enabledPlugins.has(pluginId)) return void 0;
|
|
620
|
+
const plugin = this.configuredPlugins.find((candidate) => candidate.id === pluginId);
|
|
621
|
+
if (!plugin) return void 0;
|
|
622
|
+
return new PluginContextFactory({
|
|
623
|
+
...this.pipelineFactoryOptions,
|
|
624
|
+
emailPipeline: this.email ?? void 0,
|
|
625
|
+
cronReschedule: this.cronScheduler ? () => this.cronScheduler?.reschedule() : void 0
|
|
626
|
+
}).createContext(plugin).http;
|
|
627
|
+
}
|
|
623
628
|
/**
|
|
624
629
|
* Publish any content whose scheduled time has passed.
|
|
625
630
|
* Routes through the runtime wrapper so after-publish hooks still fire.
|
|
626
631
|
*/
|
|
627
632
|
async publishScheduled() {
|
|
628
|
-
return publishDueContent(this.db, { publish:
|
|
633
|
+
return publishDueContent(this.db, { publish: this.publishAuthorizedDueContent.bind(this) });
|
|
634
|
+
}
|
|
635
|
+
async publishAuthorizedDueContent(collection, id, options) {
|
|
636
|
+
try {
|
|
637
|
+
return (await this.createPublicationAuthorizationService().publishAuthorizedDueContent({
|
|
638
|
+
collection,
|
|
639
|
+
id,
|
|
640
|
+
scheduledAt: options.scheduledAt,
|
|
641
|
+
publishedAt: options.publishedAt
|
|
642
|
+
})).result;
|
|
643
|
+
} catch (error) {
|
|
644
|
+
return {
|
|
645
|
+
success: false,
|
|
646
|
+
error: { code: error instanceof PublicationAuthorizationError ? error.code : "SCHEDULED_PUBLISH_ERROR" }
|
|
647
|
+
};
|
|
648
|
+
}
|
|
629
649
|
}
|
|
630
650
|
/**
|
|
631
651
|
* Run all scheduled maintenance work from a heartbeat driver.
|
|
@@ -646,7 +666,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
646
666
|
let published = [];
|
|
647
667
|
try {
|
|
648
668
|
published = await publishDueContent(this.db, {
|
|
649
|
-
publish:
|
|
669
|
+
publish: this.publishAuthorizedDueContent.bind(this),
|
|
650
670
|
onPublished: options.onPublished
|
|
651
671
|
});
|
|
652
672
|
} catch (error) {
|
|
@@ -679,26 +699,29 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
679
699
|
*
|
|
680
700
|
* Search health is deferred off the runtime cold-start path so ordinary
|
|
681
701
|
* page loads do not pay the index verification cost. Concurrent callers
|
|
682
|
-
*
|
|
683
|
-
* treated as healthy for the lifetime of this runtime instance.
|
|
702
|
+
* coalesce without sharing an in-flight promise, and once it has completed
|
|
703
|
+
* the result is treated as healthy for the lifetime of this runtime instance.
|
|
684
704
|
*/
|
|
685
705
|
async ensureSearchHealthy() {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
if (!isSqlite(
|
|
689
|
-
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
this._searchHealthPromise = (async () => {
|
|
706
|
+
const requestDb = getRequestContextDatabase();
|
|
707
|
+
const db = requestDb ?? this._db;
|
|
708
|
+
if (!isSqlite(db)) return;
|
|
709
|
+
const verify = async () => {
|
|
693
710
|
try {
|
|
694
|
-
const repaired = await new FTSManager(
|
|
711
|
+
const repaired = await new FTSManager(db).verifyAndRepairAll();
|
|
695
712
|
if (repaired > 0) console.log(`Repaired ${repaired} corrupted FTS index(es)`);
|
|
696
|
-
} catch {}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
713
|
+
} catch {}
|
|
714
|
+
};
|
|
715
|
+
if (requestDb) {
|
|
716
|
+
await verify();
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
try {
|
|
720
|
+
await processCachedAsync(this._searchHealthCache, verify, {
|
|
721
|
+
anchor: (promise) => after(() => promise),
|
|
722
|
+
ownerTimeoutMs: 3e4
|
|
723
|
+
});
|
|
724
|
+
} catch {}
|
|
702
725
|
}
|
|
703
726
|
/**
|
|
704
727
|
* Update in-memory plugin status and rebuild the hook pipeline.
|
|
@@ -731,10 +754,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
731
754
|
async rebuildHookPipeline() {
|
|
732
755
|
const newPipeline = createHookPipeline(this.allPipelinePlugins.filter((p) => this.enabledPlugins.has(p.id)), this.pipelineFactoryOptions);
|
|
733
756
|
await DinewayRuntime.resolveExclusiveHooks(newPipeline, this.db, this.runtimeDeps);
|
|
734
|
-
if (this.email) newPipeline.setContextFactory({
|
|
735
|
-
db: this.db,
|
|
736
|
-
emailPipeline: this.email
|
|
737
|
-
});
|
|
757
|
+
if (this.email) newPipeline.setContextFactory({ emailPipeline: this.email });
|
|
738
758
|
if (this.cronScheduler) {
|
|
739
759
|
const scheduler = this.cronScheduler;
|
|
740
760
|
newPipeline.setContextFactory({ cronReschedule: () => scheduler.reschedule() });
|
|
@@ -816,7 +836,10 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
816
836
|
const routeMetaMap = /* @__PURE__ */ new Map();
|
|
817
837
|
for (const entry of bundle.manifest.routes) {
|
|
818
838
|
const normalized = normalizeManifestRoute(entry);
|
|
819
|
-
routeMetaMap.set(normalized.name, {
|
|
839
|
+
routeMetaMap.set(normalized.name, {
|
|
840
|
+
public: normalized.public === true,
|
|
841
|
+
body: "json"
|
|
842
|
+
});
|
|
820
843
|
}
|
|
821
844
|
sandboxedRouteMetaCache.set(pluginId, routeMetaMap);
|
|
822
845
|
} else sandboxedRouteMetaCache.delete(pluginId);
|
|
@@ -843,6 +866,8 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
843
866
|
}
|
|
844
867
|
};
|
|
845
868
|
const db = await phase("rt.db", "DB init + migrations", () => DinewayRuntime.getDatabase(deps));
|
|
869
|
+
const resolveDb = () => getRequestContextDatabase() ?? db;
|
|
870
|
+
await phase("rt.plugin-migrations", "Trusted plugin migrations", () => runPluginMigrations(db, deps.plugins));
|
|
846
871
|
await phase("rt.secrets", "Validate encryption key", () => validateEncryptionKeyAtStartup());
|
|
847
872
|
const storage = DinewayRuntime.getStorage(deps);
|
|
848
873
|
let pluginStates = /* @__PURE__ */ new Map();
|
|
@@ -906,6 +931,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
906
931
|
const trustedProxyHeaders = getTrustedProxyHeaders(deps.config);
|
|
907
932
|
const pipelineFactoryOptions = {
|
|
908
933
|
db,
|
|
934
|
+
getDb: resolveDb,
|
|
909
935
|
storage: storage ?? void 0,
|
|
910
936
|
siteInfo,
|
|
911
937
|
trustedProxyHeaders
|
|
@@ -924,6 +950,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
924
950
|
const mediaProviderEntries = deps.mediaProviderEntries ?? [];
|
|
925
951
|
const providerContext = {
|
|
926
952
|
db,
|
|
953
|
+
getDb: resolveDb,
|
|
927
954
|
storage
|
|
928
955
|
};
|
|
929
956
|
for (const entry of mediaProviderEntries) try {
|
|
@@ -940,15 +967,12 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
940
967
|
const result = await pipelineRef.current.invokeCronHook(pluginId, event);
|
|
941
968
|
if (!result.success && result.error) throw result.error;
|
|
942
969
|
};
|
|
943
|
-
pipeline.setContextFactory({
|
|
944
|
-
db,
|
|
945
|
-
emailPipeline
|
|
946
|
-
});
|
|
970
|
+
pipeline.setContextFactory({ emailPipeline });
|
|
947
971
|
let cronExecutor = null;
|
|
948
972
|
const runtimeRef = { current: null };
|
|
949
973
|
await phase("rt.cron", "Cron init (recovery deferred post-response)", async () => {
|
|
950
974
|
try {
|
|
951
|
-
cronExecutor = new CronExecutor(
|
|
975
|
+
cronExecutor = new CronExecutor(resolveDb, invokeCronHook);
|
|
952
976
|
const executorForRecovery = cronExecutor;
|
|
953
977
|
after(async () => {
|
|
954
978
|
try {
|
|
@@ -963,7 +987,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
963
987
|
cronScheduler.setSystemCleanup(async () => {
|
|
964
988
|
try {
|
|
965
989
|
const runtime = runtimeRef.current;
|
|
966
|
-
await publishDueContent(db, { publish: runtime ?
|
|
990
|
+
await publishDueContent(db, { publish: runtime ? runtime.publishAuthorizedDueContent.bind(runtime) : void 0 });
|
|
967
991
|
} catch (error) {
|
|
968
992
|
console.error("[scheduled-publish] Sweep failed:", error);
|
|
969
993
|
}
|
|
@@ -979,6 +1003,18 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
979
1003
|
console.warn("[cron] Failed to initialize cron system:", error);
|
|
980
1004
|
}
|
|
981
1005
|
});
|
|
1006
|
+
await phase("rt.pluginLifecycle", "Configured plugin first-start lifecycle", async () => {
|
|
1007
|
+
const stateRepository = new PluginStateRepository(db);
|
|
1008
|
+
for (const plugin of deps.plugins) {
|
|
1009
|
+
if (pluginStates.has(plugin.id)) continue;
|
|
1010
|
+
const installFailure = (await pipeline.runPluginInstall(plugin.id)).find((result) => !result.success);
|
|
1011
|
+
if (installFailure) throw new Error(`Plugin install failed for "${plugin.id}": ${installFailure.error?.message ?? "Unknown error"}`);
|
|
1012
|
+
const activateFailure = (await pipeline.runPluginActivate(plugin.id)).find((result) => !result.success);
|
|
1013
|
+
if (activateFailure) throw new Error(`Plugin activation failed for "${plugin.id}": ${activateFailure.error?.message ?? "Unknown error"}`);
|
|
1014
|
+
await stateRepository.enable(plugin.id, plugin.version);
|
|
1015
|
+
pluginStates.set(plugin.id, "active");
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
982
1018
|
const runtime = new DinewayRuntime(db, storage, deps.plugins, sandboxedPlugins, deps.sandboxedPluginEntries, pipeline, enabledPlugins, pluginStates, deps.config, mediaProviders, mediaProviderEntries, cronExecutor, cronScheduler, emailPipeline, allPipelinePlugins, pipelineFactoryOptions, deps, pipelineRef);
|
|
983
1019
|
runtimeRef.current = runtime;
|
|
984
1020
|
return runtime;
|
|
@@ -1030,9 +1066,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1030
1066
|
}
|
|
1031
1067
|
})();
|
|
1032
1068
|
if (collectionCount.count === 0 && !setupDone) {
|
|
1033
|
-
const { applySeed } = await import("../apply-
|
|
1034
|
-
const { loadSeed } = await import("../load-
|
|
1035
|
-
const { validateSeed } = await import("../validate-
|
|
1069
|
+
const { applySeed } = await import("../apply-DjTqq6Ae.mjs").then((n) => n.n);
|
|
1070
|
+
const { loadSeed } = await import("../load-CFtJRT3c.mjs").then((n) => n.r);
|
|
1071
|
+
const { validateSeed } = await import("../validate-D1HL-oLR.mjs").then((n) => n.n);
|
|
1036
1072
|
const seed = await loadSeed();
|
|
1037
1073
|
if (validateSeed(seed).valid) {
|
|
1038
1074
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1130,7 +1166,10 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1130
1166
|
const routeMeta = /* @__PURE__ */ new Map();
|
|
1131
1167
|
for (const entry of bundle.manifest.routes) {
|
|
1132
1168
|
const normalized = normalizeManifestRoute(entry);
|
|
1133
|
-
routeMeta.set(normalized.name, {
|
|
1169
|
+
routeMeta.set(normalized.name, {
|
|
1170
|
+
public: normalized.public === true,
|
|
1171
|
+
body: "json"
|
|
1172
|
+
});
|
|
1134
1173
|
}
|
|
1135
1174
|
sandboxedRouteMetaCache.set(plugin.pluginId, routeMeta);
|
|
1136
1175
|
}
|
|
@@ -1238,7 +1277,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1238
1277
|
sandboxed: true,
|
|
1239
1278
|
adminMode: hasAdminPages || hasWidgets ? "blocks" : "none",
|
|
1240
1279
|
adminPages: entry.adminPages ?? [],
|
|
1241
|
-
dashboardWidgets: entry.adminWidgets ?? []
|
|
1280
|
+
dashboardWidgets: entry.adminWidgets ?? [],
|
|
1281
|
+
portableTextBlocks: entry.portableTextBlocks,
|
|
1282
|
+
fieldWidgets: entry.fieldWidgets
|
|
1242
1283
|
};
|
|
1243
1284
|
}
|
|
1244
1285
|
for (const [pluginId, meta] of marketplaceManifestCache) {
|
|
@@ -1318,11 +1359,13 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1318
1359
|
authorId: body.authorId,
|
|
1319
1360
|
bylines: body.bylines
|
|
1320
1361
|
});
|
|
1321
|
-
if (result.success && result.data)
|
|
1362
|
+
if (result.success && result.data) {
|
|
1363
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1364
|
+
this.runAfterSaveHooks(contentItemToRecord(result.data.item), collection, true);
|
|
1365
|
+
}
|
|
1322
1366
|
return result;
|
|
1323
1367
|
}
|
|
1324
1368
|
async handleContentUpdate(collection, id, body) {
|
|
1325
|
-
const { ContentRepository } = await import("../content-CBxYGWfL.mjs").then((n) => n.n);
|
|
1326
1369
|
const repo = new ContentRepository(this.db);
|
|
1327
1370
|
const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
|
|
1328
1371
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -1393,7 +1436,21 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1393
1436
|
authorId: bodyWithoutRev.authorId,
|
|
1394
1437
|
bylines: bodyWithoutRev.bylines
|
|
1395
1438
|
});
|
|
1396
|
-
if (result.success && result.data)
|
|
1439
|
+
if (result.success && result.data) {
|
|
1440
|
+
const contentIdsToRefresh = [resolvedId];
|
|
1441
|
+
if (!usesDraftRevisions && processedData) try {
|
|
1442
|
+
contentIdsToRefresh.push(...await findNonTranslatableSiblingContentIds(this.db, collection, resolvedId, result.data.item.translationGroup, processedData));
|
|
1443
|
+
} catch (error) {
|
|
1444
|
+
console.error(`[media-usage] Failed to discover synced i18n siblings for ${collection}/${resolvedId}:`, error);
|
|
1445
|
+
try {
|
|
1446
|
+
await markContentMediaUsageCollectionStale(this.db, collection, "CONTENT_USAGE_REFRESH_ERROR");
|
|
1447
|
+
} catch (staleError) {
|
|
1448
|
+
console.error(`[media-usage] Failed to mark ${collection} stale:`, staleError);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, contentIdsToRefresh);
|
|
1452
|
+
this.runAfterSaveHooks(contentItemToRecord(result.data.item), collection, false);
|
|
1453
|
+
}
|
|
1397
1454
|
return result;
|
|
1398
1455
|
}
|
|
1399
1456
|
async handleContentDelete(collection, id) {
|
|
@@ -1414,48 +1471,95 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1414
1471
|
message: "Delete blocked by sandboxed plugin hook"
|
|
1415
1472
|
}
|
|
1416
1473
|
};
|
|
1474
|
+
const contentId = await this.resolveContentId(collection, id, false);
|
|
1417
1475
|
const result = await handleContentDelete(this.db, collection, id);
|
|
1418
|
-
if (result.success)
|
|
1476
|
+
if (result.success) {
|
|
1477
|
+
if (contentId) await this.refreshContentUsageAfterSuccessfulWrite(collection, [contentId]);
|
|
1478
|
+
this.runAfterDeleteHooks(id, collection, false);
|
|
1479
|
+
}
|
|
1419
1480
|
return result;
|
|
1420
1481
|
}
|
|
1421
1482
|
async handleContentListTrashed(collection, params = {}) {
|
|
1422
1483
|
return handleContentListTrashed(this.db, collection, params);
|
|
1423
1484
|
}
|
|
1424
1485
|
async handleContentRestore(collection, id) {
|
|
1425
|
-
|
|
1486
|
+
const result = await handleContentRestore(this.db, collection, id);
|
|
1487
|
+
if (result.success) {
|
|
1488
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1489
|
+
this.runAfterRestoreHooks(contentItemToRecord(result.data.item), collection);
|
|
1490
|
+
}
|
|
1491
|
+
return result;
|
|
1426
1492
|
}
|
|
1427
1493
|
async handleContentPermanentDelete(collection, id) {
|
|
1494
|
+
const contentId = await this.resolveContentId(collection, id, true);
|
|
1428
1495
|
const result = await handleContentPermanentDelete(this.db, collection, id);
|
|
1429
|
-
if (result.success)
|
|
1496
|
+
if (result.success) {
|
|
1497
|
+
if (contentId) await this.deleteContentUsageAfterSuccessfulPermanentDelete(collection, contentId);
|
|
1498
|
+
this.runAfterDeleteHooks(id, collection, true);
|
|
1499
|
+
}
|
|
1430
1500
|
return result;
|
|
1431
1501
|
}
|
|
1432
1502
|
async handleContentCountTrashed(collection) {
|
|
1433
1503
|
return handleContentCountTrashed(this.db, collection);
|
|
1434
1504
|
}
|
|
1435
1505
|
async handleContentDuplicate(collection, id, authorId) {
|
|
1436
|
-
|
|
1506
|
+
const result = await handleContentDuplicate(this.db, collection, id, authorId);
|
|
1507
|
+
if (result.success && result.data) await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1508
|
+
return result;
|
|
1509
|
+
}
|
|
1510
|
+
createPublicationAuthorizationService() {
|
|
1511
|
+
const policies = this.configuredPlugins.filter((plugin) => this.enabledPlugins.has(plugin.id)).flatMap((plugin) => plugin.publicationReleasePolicies ?? []);
|
|
1512
|
+
return new PublicationAuthorizationService({
|
|
1513
|
+
db: this.db,
|
|
1514
|
+
policies,
|
|
1515
|
+
handlers: {
|
|
1516
|
+
handleContentGet: this.handleContentGet.bind(this),
|
|
1517
|
+
handleContentCompare: this.handleContentCompare.bind(this),
|
|
1518
|
+
handleContentPublish: this.handleContentPublish.bind(this),
|
|
1519
|
+
handleContentSchedule: this.handleContentSchedule.bind(this),
|
|
1520
|
+
handleContentUnschedule: this.handleContentUnschedule.bind(this)
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1437
1523
|
}
|
|
1438
1524
|
async handleContentPublish(collection, id, options = {}) {
|
|
1439
1525
|
const result = await handleContentPublish(this.db, collection, id, options);
|
|
1440
|
-
if (result.success && result.data)
|
|
1526
|
+
if (result.success && result.data) {
|
|
1527
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1528
|
+
this.runAfterPublishHooks(contentItemToRecord(result.data.item), collection);
|
|
1529
|
+
}
|
|
1441
1530
|
return result;
|
|
1442
1531
|
}
|
|
1443
1532
|
async handleContentUnpublish(collection, id) {
|
|
1444
1533
|
const result = await handleContentUnpublish(this.db, collection, id);
|
|
1445
|
-
if (result.success && result.data)
|
|
1534
|
+
if (result.success && result.data) {
|
|
1535
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1536
|
+
this.runAfterUnpublishHooks(contentItemToRecord(result.data.item), collection);
|
|
1537
|
+
}
|
|
1446
1538
|
return result;
|
|
1447
1539
|
}
|
|
1448
1540
|
async handleContentSchedule(collection, id, scheduledAt) {
|
|
1449
|
-
|
|
1541
|
+
const result = await handleContentSchedule(this.db, collection, id, scheduledAt);
|
|
1542
|
+
if (result.success && result.data) {
|
|
1543
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1544
|
+
this.runAfterScheduleHooks(contentItemToRecord(result.data.item), collection);
|
|
1545
|
+
}
|
|
1546
|
+
return result;
|
|
1450
1547
|
}
|
|
1451
1548
|
async handleContentUnschedule(collection, id) {
|
|
1452
|
-
|
|
1549
|
+
const result = await handleContentUnschedule(this.db, collection, id);
|
|
1550
|
+
if (result.success && result.data) {
|
|
1551
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1552
|
+
this.runAfterUnscheduleHooks(contentItemToRecord(result.data.item), collection);
|
|
1553
|
+
}
|
|
1554
|
+
return result;
|
|
1453
1555
|
}
|
|
1454
1556
|
async handleContentCountScheduled(collection) {
|
|
1455
1557
|
return handleContentCountScheduled(this.db, collection);
|
|
1456
1558
|
}
|
|
1457
1559
|
async handleContentDiscardDraft(collection, id) {
|
|
1458
|
-
|
|
1560
|
+
const result = await handleContentDiscardDraft(this.db, collection, id);
|
|
1561
|
+
if (result.success && result.data) await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1562
|
+
return result;
|
|
1459
1563
|
}
|
|
1460
1564
|
async handleContentCompare(collection, id) {
|
|
1461
1565
|
return handleContentCompare(this.db, collection, id);
|
|
@@ -1463,6 +1567,25 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1463
1567
|
async handleContentTranslations(collection, id) {
|
|
1464
1568
|
return handleContentTranslations(this.db, collection, id);
|
|
1465
1569
|
}
|
|
1570
|
+
async refreshContentUsageAfterSuccessfulWrite(collection, contentIds) {
|
|
1571
|
+
for (const contentId of new Set(contentIds)) try {
|
|
1572
|
+
await refreshContentMediaUsageAfterWrite(this.db, collection, contentId);
|
|
1573
|
+
} catch (error) {
|
|
1574
|
+
console.error(`[media-usage] Failed after content write ${collection}/${contentId}:`, error);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
async deleteContentUsageAfterSuccessfulPermanentDelete(collection, contentId) {
|
|
1578
|
+
try {
|
|
1579
|
+
const result = await deleteContentMediaUsage(this.db, collection, contentId);
|
|
1580
|
+
if (!result.success) console.error(`[media-usage] Usage delete for ${collection}/${contentId} finished with ${result.errorCode}`);
|
|
1581
|
+
} catch (error) {
|
|
1582
|
+
console.error(`[media-usage] Failed after permanent content delete ${collection}/${contentId}:`, error);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
async resolveContentId(collection, id, includeTrashed) {
|
|
1586
|
+
const repo = new ContentRepository(this.db);
|
|
1587
|
+
return (includeTrashed ? await repo.findByIdOrSlugIncludingTrashed(collection, id) : await repo.findByIdOrSlug(collection, id))?.id ?? null;
|
|
1588
|
+
}
|
|
1466
1589
|
async handleMediaList(params) {
|
|
1467
1590
|
return handleMediaList(this.db, params);
|
|
1468
1591
|
}
|
|
@@ -1526,7 +1649,13 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1526
1649
|
if (trustedPlugin) {
|
|
1527
1650
|
const route = trustedPlugin.routes[routeKey];
|
|
1528
1651
|
if (!route) return null;
|
|
1529
|
-
return {
|
|
1652
|
+
return {
|
|
1653
|
+
public: route.public === true,
|
|
1654
|
+
body: route.body ?? "json",
|
|
1655
|
+
...route.body === "raw" ? { maxBodyBytes: route.maxBodyBytes ?? DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES } : {},
|
|
1656
|
+
authorization: route.authorization,
|
|
1657
|
+
apiTokenPolicy: route.apiTokenPolicy
|
|
1658
|
+
};
|
|
1530
1659
|
}
|
|
1531
1660
|
const meta = sandboxedRouteMetaCache.get(pluginId);
|
|
1532
1661
|
if (meta) {
|
|
@@ -1535,14 +1664,23 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1535
1664
|
}
|
|
1536
1665
|
if (routeKey === "admin") {
|
|
1537
1666
|
const manifestMeta = marketplaceManifestCache.get(pluginId);
|
|
1538
|
-
if (manifestMeta?.admin?.pages?.length || manifestMeta?.admin?.widgets?.length) return {
|
|
1667
|
+
if (manifestMeta?.admin?.pages?.length || manifestMeta?.admin?.widgets?.length) return {
|
|
1668
|
+
public: false,
|
|
1669
|
+
body: "json"
|
|
1670
|
+
};
|
|
1539
1671
|
const entry = this.sandboxedPluginEntries.find((e) => e.id === pluginId);
|
|
1540
|
-
if (entry?.adminPages?.length || entry?.adminWidgets?.length) return {
|
|
1672
|
+
if (entry?.adminPages?.length || entry?.adminWidgets?.length) return {
|
|
1673
|
+
public: false,
|
|
1674
|
+
body: "json"
|
|
1675
|
+
};
|
|
1541
1676
|
}
|
|
1542
|
-
if (this.findSandboxedPlugin(pluginId)) return {
|
|
1677
|
+
if (this.findSandboxedPlugin(pluginId)) return {
|
|
1678
|
+
public: false,
|
|
1679
|
+
body: "json"
|
|
1680
|
+
};
|
|
1543
1681
|
return null;
|
|
1544
1682
|
}
|
|
1545
|
-
async handlePluginApiRoute(pluginId, _method, path, request) {
|
|
1683
|
+
async handlePluginApiRoute(pluginId, _method, path, request, invocation) {
|
|
1546
1684
|
if (!this.isPluginEnabled(pluginId)) return {
|
|
1547
1685
|
success: false,
|
|
1548
1686
|
error: {
|
|
@@ -1555,22 +1693,41 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1555
1693
|
const routeRegistry = new PluginRouteRegistry({
|
|
1556
1694
|
...this.pipelineFactoryOptions,
|
|
1557
1695
|
db: this.db,
|
|
1696
|
+
storage: this.storage ?? void 0,
|
|
1558
1697
|
emailPipeline: this.email ?? void 0,
|
|
1559
1698
|
trustedProxyHeaders: getTrustedProxyHeaders(this.config)
|
|
1560
1699
|
});
|
|
1561
1700
|
routeRegistry.register(trustedPlugin);
|
|
1562
1701
|
const routeKey = path.replace(LEADING_SLASH_PATTERN, "");
|
|
1702
|
+
const trustedRoute = trustedPlugin.routes[routeKey];
|
|
1703
|
+
if ((trustedRoute?.body ?? "json") === "raw") {
|
|
1704
|
+
const bodyResult = await readBoundedPluginRouteBody(request, trustedRoute?.maxBodyBytes ?? DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES);
|
|
1705
|
+
if (!bodyResult.ok) return {
|
|
1706
|
+
success: false,
|
|
1707
|
+
error: {
|
|
1708
|
+
code: "PAYLOAD_TOO_LARGE",
|
|
1709
|
+
message: `Plugin route request body exceeds ${bodyResult.limit} bytes`
|
|
1710
|
+
},
|
|
1711
|
+
status: 413
|
|
1712
|
+
};
|
|
1713
|
+
return routeRegistry.invoke(pluginId, routeKey, {
|
|
1714
|
+
request,
|
|
1715
|
+
rawBody: bodyResult.bytes,
|
|
1716
|
+
actor: invocation?.actor
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1563
1719
|
let body = void 0;
|
|
1564
1720
|
try {
|
|
1565
1721
|
body = await request.json();
|
|
1566
1722
|
} catch {}
|
|
1567
1723
|
return routeRegistry.invoke(pluginId, routeKey, {
|
|
1568
1724
|
request,
|
|
1569
|
-
body
|
|
1725
|
+
body,
|
|
1726
|
+
actor: invocation?.actor
|
|
1570
1727
|
});
|
|
1571
1728
|
}
|
|
1572
1729
|
const sandboxedPlugin = this.findSandboxedPlugin(pluginId);
|
|
1573
|
-
if (sandboxedPlugin) return this.handleSandboxedRoute(sandboxedPlugin, path, request);
|
|
1730
|
+
if (sandboxedPlugin) return this.handleSandboxedRoute(sandboxedPlugin, path, request, invocation?.actor);
|
|
1574
1731
|
return {
|
|
1575
1732
|
success: false,
|
|
1576
1733
|
error: {
|
|
@@ -1685,11 +1842,42 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1685
1842
|
}
|
|
1686
1843
|
}
|
|
1687
1844
|
runAfterPublishHooks(content, collection) {
|
|
1845
|
+
this.runDeferredContentHook("content:afterPublish", content, collection);
|
|
1846
|
+
}
|
|
1847
|
+
runAfterUnpublishHooks(content, collection) {
|
|
1848
|
+
this.runDeferredContentHook("content:afterUnpublish", content, collection);
|
|
1849
|
+
}
|
|
1850
|
+
runAfterRestoreHooks(content, collection) {
|
|
1851
|
+
this.runDeferredContentHook("content:afterRestore", content, collection);
|
|
1852
|
+
}
|
|
1853
|
+
runAfterScheduleHooks(content, collection) {
|
|
1854
|
+
this.runDeferredContentHook("content:afterSchedule", content, collection);
|
|
1855
|
+
}
|
|
1856
|
+
runAfterUnscheduleHooks(content, collection) {
|
|
1857
|
+
this.runDeferredContentHook("content:afterUnschedule", content, collection);
|
|
1858
|
+
}
|
|
1859
|
+
runDeferredContentHook(name, content, collection) {
|
|
1688
1860
|
after(async () => {
|
|
1689
|
-
if (this.hooks.hasHooks(
|
|
1690
|
-
|
|
1861
|
+
if (this.hooks.hasHooks(name)) try {
|
|
1862
|
+
switch (name) {
|
|
1863
|
+
case "content:afterPublish":
|
|
1864
|
+
await this.hooks.runContentAfterPublish(content, collection);
|
|
1865
|
+
break;
|
|
1866
|
+
case "content:afterUnpublish":
|
|
1867
|
+
await this.hooks.runContentAfterUnpublish(content, collection);
|
|
1868
|
+
break;
|
|
1869
|
+
case "content:afterRestore":
|
|
1870
|
+
await this.hooks.runContentAfterRestore(content, collection);
|
|
1871
|
+
break;
|
|
1872
|
+
case "content:afterSchedule":
|
|
1873
|
+
await this.hooks.runContentAfterSchedule(content, collection);
|
|
1874
|
+
break;
|
|
1875
|
+
case "content:afterUnschedule":
|
|
1876
|
+
await this.hooks.runContentAfterUnschedule(content, collection);
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1691
1879
|
} catch (err) {
|
|
1692
|
-
console.error(
|
|
1880
|
+
console.error(`Dineway ${name} hook error:`, err);
|
|
1693
1881
|
}
|
|
1694
1882
|
const tasks = [];
|
|
1695
1883
|
for (const [pluginKey, plugin] of this.sandboxedPlugins) {
|
|
@@ -1697,30 +1885,19 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1697
1885
|
if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
|
|
1698
1886
|
tasks.push((async () => {
|
|
1699
1887
|
try {
|
|
1700
|
-
await plugin.invokeHook(
|
|
1888
|
+
await plugin.invokeHook(name, {
|
|
1701
1889
|
content,
|
|
1702
1890
|
collection
|
|
1703
1891
|
});
|
|
1704
1892
|
} catch (err) {
|
|
1705
|
-
console.error(`Dineway: Sandboxed plugin ${pluginId}
|
|
1893
|
+
console.error(`Dineway: Sandboxed plugin ${pluginId} ${name} error:`, err);
|
|
1706
1894
|
}
|
|
1707
1895
|
})());
|
|
1708
1896
|
}
|
|
1709
1897
|
await Promise.allSettled(tasks);
|
|
1710
1898
|
});
|
|
1711
1899
|
}
|
|
1712
|
-
|
|
1713
|
-
if (this.hooks.hasHooks("content:afterUnpublish")) this.hooks.runContentAfterUnpublish(content, collection).catch((err) => console.error("Dineway afterUnpublish hook error:", err));
|
|
1714
|
-
for (const [pluginKey, plugin] of this.sandboxedPlugins) {
|
|
1715
|
-
const [pluginId] = pluginKey.split(":");
|
|
1716
|
-
if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
|
|
1717
|
-
plugin.invokeHook("content:afterUnpublish", {
|
|
1718
|
-
content,
|
|
1719
|
-
collection
|
|
1720
|
-
}).catch((err) => console.error(`Dineway: Sandboxed plugin ${pluginId} afterUnpublish error:`, err));
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
async handleSandboxedRoute(plugin, path, request) {
|
|
1900
|
+
async handleSandboxedRoute(plugin, path, request, actor) {
|
|
1724
1901
|
const routeName = path.replace(LEADING_SLASH_PATTERN, "");
|
|
1725
1902
|
let body = void 0;
|
|
1726
1903
|
try {
|
|
@@ -1735,7 +1912,8 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1735
1912
|
url: request.url,
|
|
1736
1913
|
method: request.method,
|
|
1737
1914
|
headers,
|
|
1738
|
-
meta
|
|
1915
|
+
meta,
|
|
1916
|
+
actor: actor ?? null
|
|
1739
1917
|
})
|
|
1740
1918
|
};
|
|
1741
1919
|
} catch (error) {
|
|
@@ -1982,9 +2160,9 @@ function setBaselineSecurityHeaders(response, pathname, serverTimings) {
|
|
|
1982
2160
|
const res = new Response(response.body, response);
|
|
1983
2161
|
const astroCookies = Reflect.get(response, ASTRO_COOKIES_SYMBOL);
|
|
1984
2162
|
if (astroCookies !== void 0) Reflect.set(res, ASTRO_COOKIES_SYMBOL, astroCookies);
|
|
1985
|
-
res.headers.set("X-Content-Type-Options", "nosniff");
|
|
1986
|
-
res.headers.set("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
1987
|
-
res.headers.set("Permissions-Policy", "camera=(), microphone=(), geolocation=(), payment=()");
|
|
2163
|
+
if (!res.headers.has("X-Content-Type-Options")) res.headers.set("X-Content-Type-Options", "nosniff");
|
|
2164
|
+
if (!res.headers.has("Referrer-Policy")) res.headers.set("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
2165
|
+
if (!res.headers.has("Permissions-Policy")) res.headers.set("Permissions-Policy", "camera=(), microphone=(), geolocation=(), payment=()");
|
|
1988
2166
|
const shouldSetFrameOptions = !import.meta.env.DEV || pathname.startsWith("/_dineway");
|
|
1989
2167
|
if (!res.headers.has("Content-Security-Policy") && shouldSetFrameOptions) res.headers.set("X-Frame-Options", "SAMEORIGIN");
|
|
1990
2168
|
if (serverTimings && serverTimings.length > 0) res.headers.set("Server-Timing", formatServerTimingHeader(serverTimings));
|
|
@@ -2059,11 +2237,11 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2059
2237
|
const requestDb = locals.__dinewayRequestDb;
|
|
2060
2238
|
if (!isDinewayRoute && !isPublicRuntimeRoute && !hasEditCookie && !hasPreviewToken) {
|
|
2061
2239
|
const hasSessionCookie = cookies.get("astro-session") !== void 0;
|
|
2062
|
-
if (!(context.isPrerendered || !hasSessionCookie ? null : await context.session
|
|
2063
|
-
if (!isSetupVerified()) {
|
|
2240
|
+
if (!(context.isPrerendered || !hasSessionCookie ? null : await resolveSessionUser(context.session)) && !requestDb) {
|
|
2241
|
+
if (!isSetupVerified() && !context.isPrerendered) {
|
|
2064
2242
|
const setupStart = startServerTiming(serverTimings);
|
|
2065
2243
|
try {
|
|
2066
|
-
const { getDb } = await import("../loader
|
|
2244
|
+
const { getDb } = await import("../loader-aWkkc1_o.mjs").then((n) => n.i);
|
|
2067
2245
|
await (await getDb()).selectFrom("_dineway_migrations").selectAll().limit(1).execute();
|
|
2068
2246
|
markSetupVerified();
|
|
2069
2247
|
} catch (error) {
|
|
@@ -2117,6 +2295,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2117
2295
|
locals.dineway = {
|
|
2118
2296
|
handleContentList: runtime.handleContentList.bind(runtime),
|
|
2119
2297
|
handleContentGet: runtime.handleContentGet.bind(runtime),
|
|
2298
|
+
handleContentAuthors: runtime.handleContentAuthors.bind(runtime),
|
|
2120
2299
|
handleContentCreate: runtime.handleContentCreate.bind(runtime),
|
|
2121
2300
|
handleContentUpdate: runtime.handleContentUpdate.bind(runtime),
|
|
2122
2301
|
handleContentDelete: runtime.handleContentDelete.bind(runtime),
|
|
@@ -2145,6 +2324,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2145
2324
|
handlePluginApiRoute: runtime.handlePluginApiRoute.bind(runtime),
|
|
2146
2325
|
handlePublicPluginApiRoute: createPublicPluginApiRouteHandler(runtime),
|
|
2147
2326
|
getPluginRouteMeta: runtime.getPluginRouteMeta.bind(runtime),
|
|
2327
|
+
getPluginHttpAccess: runtime.getPluginHttpAccess.bind(runtime),
|
|
2148
2328
|
getMediaProvider: runtime.getMediaProvider.bind(runtime),
|
|
2149
2329
|
getMediaProviderList: runtime.getMediaProviderList.bind(runtime),
|
|
2150
2330
|
collectPageMetadata: runtime.collectPageMetadata.bind(runtime),
|
|
@@ -2156,6 +2336,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2156
2336
|
hooks: runtime.hooks,
|
|
2157
2337
|
email: runtime.email,
|
|
2158
2338
|
configuredPlugins: runtime.configuredPlugins,
|
|
2339
|
+
sandboxedPluginEntries: runtime.sandboxedPluginEntries,
|
|
2159
2340
|
config,
|
|
2160
2341
|
getManifest: runtime.getManifest.bind(runtime),
|
|
2161
2342
|
invalidateManifest: runtime.invalidateManifest.bind(runtime),
|
|
@@ -2179,10 +2360,12 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2179
2360
|
return runWithContext(parentContext ? {
|
|
2180
2361
|
...parentContext,
|
|
2181
2362
|
editMode,
|
|
2182
|
-
db: requestDb
|
|
2363
|
+
db: requestDb,
|
|
2364
|
+
dbIsIsolated: true
|
|
2183
2365
|
} : {
|
|
2184
2366
|
editMode,
|
|
2185
|
-
db: requestDb
|
|
2367
|
+
db: requestDb,
|
|
2368
|
+
dbIsIsolated: true
|
|
2186
2369
|
}, doInit);
|
|
2187
2370
|
}
|
|
2188
2371
|
return doInit();
|