dineway 0.2.37 → 0.2.39
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-BbtYp_4V.mjs → activity-LXZdjKwI.mjs} +1 -1
- package/dist/{activity-events-CiFN61xq.mjs → activity-events-DoqeOM8x.mjs} +1 -1
- package/dist/adapter-symbols-Bq3JsWGM.d.mts +5 -0
- package/dist/{adapters-Rol-inz6.d.mts → adapters-C8nRpUuj.d.mts} +22 -6
- package/dist/after.d.mts +10 -0
- package/dist/{after-BVaUn7bK.mjs → after.mjs} +3 -2
- package/dist/{allowed-origins-Cp7BI3L9.mjs → allowed-origins-DiVrMLxh.mjs} +1 -1
- package/dist/api/route-utils.d.mts +12 -10
- package/dist/api/route-utils.mjs +18 -19
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-kJUT0VCn.mjs → api-COSxvdOi.mjs} +11 -11
- package/dist/{api-tokens-OAgvq4xg.mjs → api-tokens-CNHnKO57.mjs} +1 -1
- package/dist/{apply--6MFJ5h9.mjs → apply-D4rZHDyg.mjs} +18 -18
- package/dist/astro/index.d.mts +13 -11
- package/dist/astro/index.mjs +20 -14
- package/dist/astro/middleware/auth.d.mts +11 -9
- package/dist/astro/middleware/auth.mjs +7 -8
- package/dist/astro/middleware/redirect.mjs +7 -7
- package/dist/astro/middleware/request-context.mjs +4 -5
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +9 -1
- package/dist/astro/middleware.mjs +301 -132
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- 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 +22 -23
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +11 -11
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +11 -11
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +11 -11
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +19 -20
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +19 -20
- package/dist/astro/routes/api/admin/bylines/index.mjs +19 -20
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +16 -17
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -13
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +37 -38
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +37 -38
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +42 -43
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +42 -43
- package/dist/astro/routes/api/admin/context/diff.mjs +41 -42
- package/dist/astro/routes/api/admin/context/index.mjs +42 -43
- package/dist/astro/routes/api/admin/context/stale.mjs +41 -42
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +37 -38
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +41 -42
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +41 -42
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +38 -39
- 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 +66 -67
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +66 -67
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +58 -59
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +65 -66
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +65 -66
- package/dist/astro/routes/api/admin/plugins/index.mjs +58 -59
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +58 -59
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +65 -66
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +58 -59
- package/dist/astro/routes/api/admin/plugins/updates.mjs +58 -59
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +23 -24
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +34 -35
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +50 -51
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +8 -8
- package/dist/astro/routes/api/admin/review-requests/index.mjs +48 -49
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +58 -59
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +58 -59
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -8
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -12
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +10 -10
- 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 +3 -3
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +14 -14
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/setup-token/index.mjs +6 -6
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +11 -9
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +19 -20
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +17 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +20 -21
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +29 -30
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +29 -30
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +18 -19
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +11 -12
- 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 -23
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +45 -46
- package/dist/astro/routes/api/import/wordpress/media.d.mts +11 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +13 -13
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +46 -47
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +12 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +43 -44
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +26 -27
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -9
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +50 -51
- package/dist/astro/routes/api/integration/artifact.mjs +8 -9
- package/dist/astro/routes/api/integration/dispatch.mjs +12 -13
- package/dist/astro/routes/api/integrations/_provider_.mjs +9 -10
- package/dist/astro/routes/api/integrations/index.mjs +8 -9
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +87 -88
- package/dist/astro/routes/api/media/_id_/confirm.mjs +11 -11
- package/dist/astro/routes/api/media/_id_.mjs +9 -9
- 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 +12 -12
- package/dist/astro/routes/api/media.mjs +15 -15
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +42 -43
- package/dist/astro/routes/api/menus/_name_/items.mjs +42 -43
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +42 -43
- package/dist/astro/routes/api/menus/_name_/translations.mjs +42 -43
- package/dist/astro/routes/api/menus/_name_.mjs +42 -43
- package/dist/astro/routes/api/menus/index.mjs +42 -43
- package/dist/astro/routes/api/oauth/authorize.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +7 -7
- package/dist/astro/routes/api/openapi.json.mjs +5 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +13 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs +13 -13
- package/dist/astro/routes/api/redirects/_id_.mjs +42 -43
- package/dist/astro/routes/api/redirects/index.mjs +42 -43
- 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 +60 -61
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +60 -61
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +60 -61
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +60 -61
- package/dist/astro/routes/api/schema/collections/index.mjs +60 -61
- package/dist/astro/routes/api/schema/index.mjs +10 -10
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +58 -59
- package/dist/astro/routes/api/schema/orphans/index.mjs +58 -59
- package/dist/astro/routes/api/search/enable.mjs +13 -13
- package/dist/astro/routes/api/search/index.mjs +12 -12
- package/dist/astro/routes/api/search/rebuild.mjs +13 -13
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +12 -12
- package/dist/astro/routes/api/sections/_slug_.mjs +42 -43
- package/dist/astro/routes/api/sections/index.mjs +42 -43
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings/reviews.mjs +9 -9
- package/dist/astro/routes/api/settings.mjs +42 -43
- package/dist/astro/routes/api/setup/admin-verify.mjs +14 -14
- package/dist/astro/routes/api/setup/admin.mjs +12 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +30 -31
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +32 -33
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +8 -9
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +45 -46
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +45 -46
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +45 -46
- package/dist/astro/routes/api/taxonomies/index.mjs +45 -46
- package/dist/astro/routes/api/themes/preview.mjs +6 -7
- 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 +41 -42
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +42 -43
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +42 -43
- package/dist/astro/routes/api/widget-areas/_name_.mjs +39 -40
- package/dist/astro/routes/api/widget-areas/index.mjs +42 -43
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +8 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +16 -17
- package/dist/astro/routes/sitemap.xml.mjs +15 -16
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +14 -12
- package/dist/{audit-F5iWkbcJ.mjs → audit-Cl495Ze3.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-DPOSBNFI.mjs → auth-control-guard-DbjgJdlo.mjs} +1 -1
- package/dist/{authorize-CXIjxIfC.mjs → authorize-DDmgmnW-.mjs} +1 -1
- package/dist/{briefing-BiBHuHqK.mjs → briefing-COw-WcYz.mjs} +6 -6
- package/dist/{briefing-DQYj9x6H.mjs → briefing-DsD-Ouwc.mjs} +1 -1
- package/dist/{bundle-DImnxo71.mjs → bundle-bhiszAui.mjs} +2 -2
- package/dist/{byline-BCPYEtzy.mjs → byline-TYk2kad6.mjs} +6 -6
- package/dist/{byline-fields-CY6V0ew1.mjs → byline-fields-BKj5f3Ub.mjs} +1 -1
- package/dist/{byline-fields-Cr3vqtmy.d.mts → byline-fields-CKhPED5o.d.mts} +31 -31
- package/dist/{byline-fields-DGNKitg3.mjs → byline-fields-DZ46DF10.mjs} +3 -3
- package/dist/{byline-registry-CkuVVeJJ.mjs → byline-registry-CJihchD1.mjs} +1 -1
- package/dist/{bylines-BkRyEw1m.mjs → bylines-6T9iVC9j.mjs} +3 -3
- package/dist/{bylines-ulHYkoqw.mjs → bylines-CvTSCAw9.mjs} +5 -5
- package/dist/{cache-DZDOBJv3.mjs → cache-B5NSHhxG.mjs} +2 -2
- package/dist/{chunks-BnG3LPMN.mjs → chunks-C8vSD_5L.mjs} +1 -1
- package/dist/cli/index.mjs +50 -46
- package/dist/cli/plugin-kit.d.mts +11 -9
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/index.d.mts +11 -9
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-6vLLT06O.mjs → client-factory-C1ZQCMog.mjs} +1 -1
- package/dist/{comment-DX7gSK1w.mjs → comment-DAQfUjqt.mjs} +2 -2
- package/dist/{comment-reaction-Cun5eIXL.mjs → comment-reaction-Dp3G7UZc.mjs} +1 -1
- package/dist/{comments-CFswogn0.mjs → comments-BrvIaRAx.mjs} +1 -1
- package/dist/{content-D_Q7BEGo.mjs → content-CIKsrvU9.mjs} +12 -11
- package/dist/{content-refresh-9M9cc55-.mjs → content-refresh-BilzqcLt.mjs} +4 -4
- package/dist/{context-jRMnVU99.mjs → context-DAs_MZjJ.mjs} +11 -11
- package/dist/{context-CDZsqodm.mjs → context-DVTvucNb.mjs} +2 -2
- package/dist/{context-route-helpers-CWAHJFl3.mjs → context-route-helpers-BP-UJ4u8.mjs} +1 -1
- package/dist/{d1-binding-D6HZa3ks.mjs → d1-binding-DrLMBUxu.mjs} +6 -2
- package/dist/{dashboard-C7K-qmQw.mjs → dashboard-BAjWCGCP.mjs} +4 -4
- package/dist/database/batch.d.mts +2 -1
- package/dist/database/batch.mjs +5 -3
- package/dist/database/d1/index.d.mts +11 -9
- package/dist/database/d1/index.mjs +5 -5
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.mjs +3 -13
- 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-Prqg6ycD.mjs → device-flow-Dh0rNlh1.mjs} +3 -3
- package/dist/{discovery-CYcZJ1o3.mjs → discovery-V0e0Gg8j.mjs} +4 -4
- package/dist/{enrich-BjF-J4sF.mjs → enrich-B7PIJ8Iy.mjs} +1 -1
- package/dist/{evidence-CoLCtvqq.mjs → evidence-Vnp_fQbC.mjs} +6 -6
- package/dist/{field-defs-cache-BKKFFf_V.mjs → field-defs-cache-aXUeXJdC.mjs} +6 -6
- package/dist/{fts-manager-DA74x_uP.mjs → fts-manager-BrPpYtK0.mjs} +1 -1
- package/dist/{hitl-requests-CMlepQbW.mjs → hitl-requests-BxMMON3s.mjs} +2 -2
- package/dist/{hitl-route-helpers-DnNP_wMa.mjs → hitl-route-helpers-sdnjpx2k.mjs} +4 -4
- package/dist/{import-CJiI0o15.mjs → import-C2-v4FCs.mjs} +9 -9
- package/dist/{index-mlJSqFkG.d.mts → index-BVGe04wF.d.mts} +3 -3
- package/dist/index.d.mts +17 -15
- package/dist/index.mjs +98 -98
- package/dist/{integration-credentials-Br16M1VE.mjs → integration-credentials-DMEXZU2J.mjs} +2 -2
- package/dist/{jsonld-B2e_FWju.d.mts → jsonld-XWmmAoVo.d.mts} +2 -2
- package/dist/{load-B2oitobd.mjs → load-DvCVppOF.mjs} +1 -1
- package/dist/{loader-Cgsx23wU.mjs → loader-Dp6zLmQm.mjs} +3 -3
- package/dist/{manifest-schema-DBXM_g8l.mjs → manifest-schema-CCvogfrP.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-XBjd6qYu.mjs → mcp-reviewed-executor-B8Gbin3T.mjs} +6 -6
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +13 -11
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-BZqwtRTZ.mjs → media-C5ba8fvI.mjs} +1 -1
- package/dist/{media-allowlist-CyByjUXh.mjs → media-allowlist-DQvscVkS.mjs} +1 -1
- package/dist/{menus-BJvvB0n9.mjs → menus-CyNpBQrX.mjs} +2 -2
- package/dist/{menus-DNcY6Do7.mjs → menus-w5xwT-f5.mjs} +7 -7
- package/dist/{migrations-C7YXse7V.mjs → migrations-CLlX25HO.mjs} +2 -2
- package/dist/{oauth-authorization-B_mmz7O2.mjs → oauth-authorization-CdqJZUMf.mjs} +4 -4
- package/dist/{oauth-clients-Cr4pdIAE.mjs → oauth-clients-CHNb9MAZ.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-DYGlsI-R.mjs → object-cache-mxCW-Rpt.mjs} +1 -1
- package/dist/page/index.d.mts +12 -10
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-BscLr3p2.mjs → parse-THHCpJLB.mjs} +1 -1
- package/dist/plugin-utils.d.mts +11 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +11 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-D6zhTwNX.mjs → plugins-pfraURNp.mjs} +8 -8
- package/dist/{policy-CrK1vl8l.mjs → policy-B6mVa7ib.mjs} +2 -2
- package/dist/{preview-E1xKZGsX.mjs → preview-Bh7D7F27.mjs} +3 -3
- package/dist/{provider-loader-H2wdGD0o.d.mts → provider-loader-DT7vQ5FI.d.mts} +1 -1
- package/dist/{public-url-Dj1vD21t.d.mts → public-url-BvnTaacI.d.mts} +1 -1
- package/dist/{public-url-zoO-QbN6.d.mts → public-url-Ccv0Xmue.d.mts} +2 -2
- package/dist/{publication-authorization-D4Cq5dn5.mjs → publication-authorization-B_HJSnzR.mjs} +10 -10
- package/dist/{query-DnK6LJdA.mjs → query-DLeahg3x.mjs} +4 -4
- package/dist/{query-BTxYlpUS.mjs → query-xspvw7Ui.mjs} +15 -15
- package/dist/{rate-limit-RaBJEgyt.mjs → rate-limit-BsBr_U9g.mjs} +2 -2
- package/dist/{redirect-HLI3wT5Y.mjs → redirect-BQFa1THe.mjs} +2 -2
- package/dist/{redirects-DpRiuRWn.mjs → redirects-CVfxefrz.mjs} +3 -3
- package/dist/{redirects-D16GFaOa.mjs → redirects-DJcsgz_X.mjs} +5 -5
- package/dist/{registry-DcV93OL_.mjs → registry-Dclv9iHv.mjs} +7 -7
- package/dist/{release-CZfAeyXm.mjs → release-B3Q-9B7N.mjs} +3 -3
- package/dist/request-context.d.mts +5 -1
- package/dist/request-context.mjs +12 -1
- package/dist/{request-meta-C6yGqnGD.mjs → request-meta-CjORiJQ_.mjs} +1 -1
- package/dist/{review-payload-BPwisxjF.mjs → review-payload-Bap86e75.mjs} +13 -13
- package/dist/{review-requests-BF2eEKr8.mjs → review-requests-CUVn0RBl.mjs} +2 -2
- package/dist/{review-requests-CP3Nfqhy.mjs → review-requests-CcSUTm_l.mjs} +2 -2
- package/dist/{review-route-helpers-BYx3Px90.mjs → review-route-helpers-CKBfGKCi.mjs} +1 -1
- package/dist/{revocation-DZ8e4JCS.mjs → revocation-C_ZQvGRT.mjs} +2 -2
- package/dist/{runner-CVeq0266.mjs → runner-CRU7BXjr.mjs} +1 -1
- package/dist/{runner-Cxl-vyk2.d.mts → runner-SoP1rphP.d.mts} +1 -1
- package/dist/{runs-B8kCirJ6.mjs → runs-BtaAiLTw.mjs} +4 -4
- package/dist/runtime.d.mts +14 -11
- package/dist/runtime.mjs +5 -4
- package/dist/scheduled-publish-BxdShRGs.d.mts +9 -0
- package/dist/schema-CosVhHJt.mjs +8 -0
- package/dist/{search-C9qOBgvo.mjs → search-BI9uKr7U.mjs} +3 -3
- package/dist/{secrets-BP2YTPWn.mjs → secrets-D_pergcD.mjs} +4 -4
- package/dist/{sections-CkoQY7Z9.mjs → sections-BqqYq9RW.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -25
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +9 -9
- package/dist/{seo-Bypxm1iD.mjs → seo-B-5PsaJO.mjs} +1 -1
- package/dist/{seo-B3cQl1r2.mjs → seo-Bs_DUxJf.mjs} +2 -2
- package/dist/{service-CMR5_eSN.mjs → service-B65aJsN7.mjs} +3 -3
- package/dist/{service-mJBl4ZP4.mjs → service-W2xuGLgw.mjs} +2 -2
- package/dist/{session-user-DacoiKrJ.mjs → session-user-eweCNKzW.mjs} +1 -1
- package/dist/{settings-DiAKrrP4.mjs → settings-CyJ2-MKx.mjs} +2 -2
- package/dist/{settings-dNtUakSt.mjs → settings-DsBzKeUQ.mjs} +8 -8
- package/dist/{setup-complete-CWMnrNFN.mjs → setup-complete-DeivSVJi.mjs} +1 -1
- package/dist/{site-activity-BrN2NviL.mjs → site-activity-DU0UPDji.mjs} +1 -1
- package/dist/{site-context-Bll8ehSX.mjs → site-context-Dic2jHuw.mjs} +15 -15
- package/dist/{site-url-DoTPKRND.mjs → site-url-Tw6CfBB2.mjs} +1 -1
- package/dist/{state-D8AogXCV.mjs → state-DM7blWfT.mjs} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +2 -2
- package/dist/{store-CjmmGlVw.mjs → store-32e6dfD-.mjs} +2 -2
- package/dist/{submission-CdXVheI1.mjs → submission-DJmRejGR.mjs} +10 -10
- package/dist/{taxonomies-rJBePDW_.mjs → taxonomies-BFsUR7kc.mjs} +3 -3
- package/dist/{taxonomies-9lXML1QX.mjs → taxonomies-lWGNLKgn.mjs} +7 -7
- package/dist/{taxonomy-CAd9SL-L.mjs → taxonomy-DN6i1upz.mjs} +3 -3
- package/dist/{trusted-proxy-CvDP0g0F.mjs → trusted-proxy-hYufGFPK.mjs} +1 -1
- package/dist/{types-5xfwCI4m.d.mts → types-CJynaYg1.d.mts} +15 -24
- package/dist/{types-BFoQ5a1v.d.mts → types-CgcOeaiQ.d.mts} +1 -1
- package/dist/{types-BqxIv8Il.mjs → types-RFzE_V1M.mjs} +1 -1
- package/dist/ui/server-runtime.d.mts +15 -13
- package/dist/ui/server-runtime.mjs +25 -26
- package/dist/{user-1-YV30lf.mjs → user-Btai9rl3.mjs} +2 -2
- package/dist/{utils-BoWkoty8.mjs → utils-CYxGuO_P.mjs} +2 -2
- package/dist/{validate-CupwWNWL.mjs → validate-C05z0m7M.mjs} +3 -3
- package/dist/{validate-CCOsvPg2.d.mts → validate-kmN2lS8H.d.mts} +3 -3
- package/dist/version-BnLdwIT1.mjs +6 -0
- package/dist/{widgets-DbOctkXv.mjs → widgets-BOrDZdQ3.mjs} +3 -3
- package/dist/{wordpress-slugs-pQlLXbKn.mjs → wordpress-slugs-ROzITIBK.mjs} +1 -1
- package/dist/{worker-0TNlZuCU.mjs → worker-Bg35R37I.mjs} +10 -10
- package/dist/workers-build-5UQ4j69Q.mjs +70 -0
- package/dist/{zod-generator-BzACAoR5.mjs → zod-generator-DkrWuID7.mjs} +2 -2
- package/package.json +10 -18
- package/dist/astro/middleware/workers.d.mts +0 -6
- package/dist/astro/middleware/workers.mjs +0 -8
- package/dist/d1-dialect-BBxPg6Om.mjs +0 -48
- package/dist/db/d1.d.mts +0 -7
- package/dist/db/d1.mjs +0 -13
- package/dist/schema-DFeC5axi.mjs +0 -8
- package/dist/version-cCcZvW0B.mjs +0 -6
- package/dist/workers-build-QVrquLLe.mjs +0 -36
- /package/dist/{api-tokens-DA18zxza.mjs → api-tokens-0N3nafqZ.mjs} +0 -0
- /package/dist/{challenge-store-DFGsDtCj.mjs → challenge-store-BPn3goP9.mjs} +0 -0
- /package/dist/{components-gMTtJqHg.mjs → components-rFN8NH3N.mjs} +0 -0
- /package/dist/{context-types-DLD_HnKT.mjs → context-types-CPWAJRs5.mjs} +0 -0
- /package/dist/{cron-BVYo08mi.mjs → cron-C7HCJPPl.mjs} +0 -0
- /package/dist/{default-w3MwLng7.mjs → default-BS6VQRkB.mjs} +0 -0
- /package/dist/{email-console-CpvgEN1w.mjs → email-console-GqK6hgMJ.mjs} +0 -0
- /package/dist/{error-B-44r5TD.mjs → error-B5a45Tfb.mjs} +0 -0
- /package/dist/{escape-B1GM0yJU.mjs → escape-CE7xOWzJ.mjs} +0 -0
- /package/dist/{experimental-workflows-fzJHB3ZI.mjs → experimental-workflows-BbxpWwBy.mjs} +0 -0
- /package/dist/{forgeway-account-CnWOIusE.mjs → forgeway-account-DcTxh3Gw.mjs} +0 -0
- /package/dist/{hash-DvMZXj2L.mjs → hash-D2Rqd2J2.mjs} +0 -0
- /package/dist/{media-url-D-elxQjL.mjs → media-url-D9kdpoLS.mjs} +0 -0
- /package/dist/{mime-D_ae-u_U.mjs → mime-BnVhH671.mjs} +0 -0
- /package/dist/{mode-BJwb_MgK.mjs → mode-D0gePRtf.mjs} +0 -0
- /package/dist/{normalize-5rct_U0I.mjs → normalize-aTwryvvi.mjs} +0 -0
- /package/dist/{oauth-authority-DOjME4Hh.mjs → oauth-authority-P5YMSk2z.mjs} +0 -0
- /package/dist/{oauth-state-store-D2H9hKcN.mjs → oauth-state-store-CMqLdo4I.mjs} +0 -0
- /package/dist/{options-BcqHWpc-.mjs → options-JiLWB6Bt.mjs} +0 -0
- /package/dist/{output-CdmbQioY.mjs → output-7HDrYTSQ.mjs} +0 -0
- /package/dist/{parser-ehIlj32k.mjs → parser-kettsjWc.mjs} +0 -0
- /package/dist/{passkey-config-sUQoLEj_.mjs → passkey-config-DVzQ3dv3.mjs} +0 -0
- /package/dist/{patterns-CZ7D4y_R.mjs → patterns-Ay-4KImK.mjs} +0 -0
- /package/dist/{placeholder-CQKI6vLd.d.mts → placeholder-DJLP_HY7.d.mts} +0 -0
- /package/dist/{portable-text-DH3Om_2D.mjs → portable-text-tQhvPLf1.mjs} +0 -0
- /package/dist/{process-cache-MHM4Sqzs.mjs → process-cache-C19OA3am.mjs} +0 -0
- /package/dist/{provider-loader-Dnv2neOu.mjs → provider-loader-DERzBMUz.mjs} +0 -0
- /package/dist/{public-discovery-CTql6jdZ.mjs → public-discovery-BGyhuD5U.mjs} +0 -0
- /package/dist/{public-url-DNt9A1yS.mjs → public-url-DFXUU6Wp.mjs} +0 -0
- /package/dist/{public-url-4sMO36Gw.mjs → public-url-sR8SVmTt.mjs} +0 -0
- /package/dist/{redirect-Cjjb5VYr.mjs → redirect-BxacnBYL.mjs} +0 -0
- /package/dist/{request-cache-DPmV5nk4.mjs → request-cache-8_ifFzVw.mjs} +0 -0
- /package/dist/{resolve-CpOV2jt_.mjs → resolve-DEKC4qVa.mjs} +0 -0
- /package/dist/{revision-090sZyGc.mjs → revision-W6FDfDqx.mjs} +0 -0
- /package/dist/{runtime-env-v-1UXPAH.mjs → runtime-env-CPTzh0mZ.mjs} +0 -0
- /package/dist/{seo-contributions-atY3jZEV.mjs → seo-contributions-LEFs1d7w.mjs} +0 -0
- /package/dist/{service-CeEi6nax.mjs → service-kQ5ljRzX.mjs} +0 -0
- /package/dist/{setup-nonce-BUmfCiY1.mjs → setup-nonce-B6A5Y1ea.mjs} +0 -0
- /package/dist/{sidecar-client-CbrX8nuw.mjs → sidecar-client-BwPhhz-F.mjs} +0 -0
- /package/dist/{slugify-Di8Q_MFq.mjs → slugify-kD31VIv2.mjs} +0 -0
- /package/dist/{ssrf-COxLChKv.mjs → ssrf-C9dyjU8O.mjs} +0 -0
- /package/dist/{stable-hash-DEtJgcp7.mjs → stable-hash-B9Tbb2f_.mjs} +0 -0
- /package/dist/{status-DBSB6tdS.mjs → status-Bjf_uSrW.mjs} +0 -0
- /package/dist/{tokens-I3tSjoFI.mjs → tokens-D-StaTAQ.mjs} +0 -0
- /package/dist/{transport-aPKvM53n.mjs → transport-BrU1aDY5.mjs} +0 -0
- /package/dist/{types-CVRNRAA5.d.mts → types-B--VyN3n.d.mts} +0 -0
- /package/dist/{types-SddyDti7.d.mts → types-B03h5jt_.d.mts} +0 -0
- /package/dist/{types-CyBH89BS.mjs → types-COvyXIp7.mjs} +0 -0
- /package/dist/{types-DNPP-eu4.d.mts → types-CtGSEKEJ.d.mts} +0 -0
- /package/dist/{types-ChSk0dmw.mjs → types-DNBL-4Sn.mjs} +0 -0
- /package/dist/{types-CAD4OvmF.d.mts → types-DsJTXStN.d.mts} +0 -0
- /package/dist/{types-BWsEjujW.d.mts → types-KFzuijKE.d.mts} +0 -0
- /package/dist/{types-BKsk4nnM.mjs → types-PLJ9hlhh.mjs} +0 -0
- /package/dist/{types-1qU0-N1P.d.mts → types-SlLXjRpg.d.mts} +0 -0
- /package/dist/{url-DfqolpO2.mjs → url-DGG3hw_h.mjs} +0 -0
- /package/dist/{url-Ce0qtSdB.mjs → url-DUz3LbCs.mjs} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "../types-B--VyN3n.mjs";
|
|
2
|
+
import { t as PublishedRef } from "../scheduled-publish-BxdShRGs.mjs";
|
|
1
3
|
import * as astro from "astro";
|
|
2
4
|
|
|
3
5
|
//#region src/astro/middleware.d.ts
|
|
@@ -9,5 +11,11 @@ import * as astro from "astro";
|
|
|
9
11
|
*/
|
|
10
12
|
declare const RUNTIME_INIT_DEADLINE_MS: number;
|
|
11
13
|
declare const onRequest: astro.MiddlewareHandler;
|
|
14
|
+
/** Run maintenance from a platform scheduler, with the same release gate as HTTP requests. */
|
|
15
|
+
declare function runScheduledTasks(options?: {
|
|
16
|
+
onPublished?: (refs: PublishedRef[]) => Promise<void>;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
published: PublishedRef[];
|
|
19
|
+
}>;
|
|
12
20
|
//#endregion
|
|
13
|
-
export { RUNTIME_INIT_DEADLINE_MS, onRequest as default, onRequest };
|
|
21
|
+
export { RUNTIME_INIT_DEADLINE_MS, onRequest as default, onRequest, runScheduledTasks };
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import { a as runMigrations, o as assertD1Migrations, t as MIGRATION_NAMES } from "../runner-
|
|
1
|
+
import { a as runMigrations, o as assertD1Migrations, t as MIGRATION_NAMES } from "../runner-CRU7BXjr.mjs";
|
|
2
|
+
import { createRequestMetrics, getRequestContext, runWithContext, runWithPageCache, withPrimaryDatabase } from "../request-context.mjs";
|
|
3
|
+
import { after, hasBackgroundTaskContext } from "../after.mjs";
|
|
2
4
|
import "../connection-DJ3GzHVH.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { createRequestMetrics, getRequestContext, runWithContext, runWithPageCache } from "../request-context.mjs";
|
|
5
|
+
import { t as d1Database } from "../d1-binding-DrLMBUxu.mjs";
|
|
5
6
|
import { atomicBatch, isD1Database } from "../database/batch.mjs";
|
|
6
7
|
import { s as isSqlite } from "../dialect-helpers-C6xtO-Ui.mjs";
|
|
7
8
|
import { i as setI18nConfig } from "../config-XW5tMrH8.mjs";
|
|
8
|
-
import { _ as readBoundedPluginRouteBody, d as EmailPipeline, g as DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES, h as definePlugin, m as resolveExclusiveHooks, p as createHookPipeline, u as PluginRouteRegistry } from "../plugins-
|
|
9
|
+
import { _ as readBoundedPluginRouteBody, d as EmailPipeline, g as DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES, h as definePlugin, m as resolveExclusiveHooks, p as createHookPipeline, u as PluginRouteRegistry } from "../plugins-pfraURNp.mjs";
|
|
9
10
|
import { createRecorder, flushRecorder, formatServerTimingHeader, isInstrumentationEnabled, isServerTimingEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
10
11
|
import "../base64-Cz-aU0X1.mjs";
|
|
11
|
-
import "../types-
|
|
12
|
-
import { o as isMissingTableError, r as getDb } from "../loader-
|
|
12
|
+
import "../types-RFzE_V1M.mjs";
|
|
13
|
+
import { o as isMissingTableError, r as getDb } from "../loader-Dp6zLmQm.mjs";
|
|
13
14
|
import "../actor-DxUAJgQX.mjs";
|
|
14
15
|
import "../atomic-authority-CnBQJ14T.mjs";
|
|
15
|
-
import
|
|
16
|
-
import "../
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import { r as
|
|
27
|
-
import
|
|
28
|
-
import "../
|
|
29
|
-
import
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
32
|
-
import
|
|
33
|
-
import "../
|
|
34
|
-
import
|
|
35
|
-
import "../
|
|
36
|
-
import "../
|
|
37
|
-
import
|
|
38
|
-
import "../
|
|
39
|
-
import
|
|
40
|
-
import "../
|
|
41
|
-
import "../
|
|
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 "../taxonomies-
|
|
74
|
-
import "../
|
|
75
|
-
import
|
|
76
|
-
import "../
|
|
77
|
-
import "../
|
|
78
|
-
import "../
|
|
79
|
-
import "../
|
|
80
|
-
import
|
|
81
|
-
import "../
|
|
82
|
-
import
|
|
83
|
-
import "../
|
|
84
|
-
import "../
|
|
85
|
-
import { n as
|
|
86
|
-
import { n as
|
|
87
|
-
import {
|
|
88
|
-
import
|
|
89
|
-
import "../
|
|
90
|
-
import { n as
|
|
91
|
-
import
|
|
92
|
-
import "../
|
|
93
|
-
import
|
|
94
|
-
import "../
|
|
95
|
-
import "../
|
|
96
|
-
import "../
|
|
97
|
-
import "../
|
|
98
|
-
import "../
|
|
99
|
-
import "../
|
|
100
|
-
import "../
|
|
101
|
-
import "../
|
|
102
|
-
import "../
|
|
103
|
-
import "../
|
|
104
|
-
import "../load-B2oitobd.mjs";
|
|
16
|
+
import "../object-cache-mxCW-Rpt.mjs";
|
|
17
|
+
import { t as RevisionRepository } from "../revision-W6FDfDqx.mjs";
|
|
18
|
+
import { t as ContentRepository } from "../content-CIKsrvU9.mjs";
|
|
19
|
+
import { t as MediaRepository } from "../media-C5ba8fvI.mjs";
|
|
20
|
+
import "../user-Btai9rl3.mjs";
|
|
21
|
+
import "../taxonomy-DN6i1upz.mjs";
|
|
22
|
+
import "../comment-DAQfUjqt.mjs";
|
|
23
|
+
import { t as OptionsRepository } from "../options-JiLWB6Bt.mjs";
|
|
24
|
+
import "../audit-Cl495Ze3.mjs";
|
|
25
|
+
import "../site-activity-DU0UPDji.mjs";
|
|
26
|
+
import { r as ReviewRequestRepository } from "../review-requests-CUVn0RBl.mjs";
|
|
27
|
+
import { n as PublicationAuthorizationService, r as publicationReceipt, s as ContentReleaseGrantRepository, t as PublicationAuthorizationError } from "../publication-authorization-B_HJSnzR.mjs";
|
|
28
|
+
import "../site-context-Dic2jHuw.mjs";
|
|
29
|
+
import { t as PluginContextFactory } from "../context-DAs_MZjJ.mjs";
|
|
30
|
+
import "../menus-CyNpBQrX.mjs";
|
|
31
|
+
import "../redirect-BQFa1THe.mjs";
|
|
32
|
+
import { r as requestCached } from "../request-cache-8_ifFzVw.mjs";
|
|
33
|
+
import "../byline-registry-CJihchD1.mjs";
|
|
34
|
+
import { a as initWithLock, i as createInitLock, r as processCachedAsync, t as createProcessCache } from "../process-cache-C19OA3am.mjs";
|
|
35
|
+
import "../field-defs-cache-aXUeXJdC.mjs";
|
|
36
|
+
import "../byline-TYk2kad6.mjs";
|
|
37
|
+
import { n as normalizeMediaValue } from "../normalize-aTwryvvi.mjs";
|
|
38
|
+
import "../enrich-B7PIJ8Iy.mjs";
|
|
39
|
+
import { A as validateRev, C as handleContentUpdate, O as decodeRev, S as handleContentUnschedule, _ as handleContentPublish, a as handleContentCompare, b as handleContentTranslations, c as handleContentCreate, d as handleContentDuplicate, f as handleContentGet, g as handleContentPermanentDelete, h as handleContentListTrashed, i as handleContentAuthors, k as encodeRev, l as handleContentDelete, m as handleContentList, o as handleContentCountScheduled, p as handleContentGetIncludingTrashed, s as handleContentCountTrashed, t as ReviewPayloadBuilder, u as handleContentDiscardDraft, v as handleContentRestore, x as handleContentUnpublish, y as handleContentSchedule } from "../review-payload-Bap86e75.mjs";
|
|
40
|
+
import "../seo-Bs_DUxJf.mjs";
|
|
41
|
+
import "../submission-DJmRejGR.mjs";
|
|
42
|
+
import "../context-types-CPWAJRs5.mjs";
|
|
43
|
+
import { u as PluginStateRepository } from "../briefing-COw-WcYz.mjs";
|
|
44
|
+
import { a as SiteAiGateway, t as SiteIntegrationRuns } from "../runs-BtaAiLTw.mjs";
|
|
45
|
+
import { n as runWithRuntimeEnvironment } from "../runtime-env-CPTzh0mZ.mjs";
|
|
46
|
+
import { o as validateEncryptionKeyAtStartup } from "../secrets-D_pergcD.mjs";
|
|
47
|
+
import { i as markContentMediaUsageCollectionStale, r as findNonTranslatableSiblingContentIds, s as refreshContentMediaUsageAfterWrite, t as deleteContentMediaUsage } from "../content-refresh-BilzqcLt.mjs";
|
|
48
|
+
import "../ssrf-C9dyjU8O.mjs";
|
|
49
|
+
import { n as hashString } from "../hash-D2Rqd2J2.mjs";
|
|
50
|
+
import { t as FTSManager } from "../fts-manager-BrPpYtK0.mjs";
|
|
51
|
+
import "../public-discovery-BGyhuD5U.mjs";
|
|
52
|
+
import { n as SchemaRegistry } from "../registry-Dclv9iHv.mjs";
|
|
53
|
+
import { r as createPublicMediaUrlResolver } from "../url-DUz3LbCs.mjs";
|
|
54
|
+
import "../settings-DsBzKeUQ.mjs";
|
|
55
|
+
import "../evidence-Vnp_fQbC.mjs";
|
|
56
|
+
import "../dashboard-BAjWCGCP.mjs";
|
|
57
|
+
import "../briefing-DsD-Ouwc.mjs";
|
|
58
|
+
import "../review-requests-CcSUTm_l.mjs";
|
|
59
|
+
import { n as VERSION, t as COMMIT } from "../version-BnLdwIT1.mjs";
|
|
60
|
+
import { A as handleRevisionGet, D as handleMediaGet, E as handleMediaDelete, M as handleRevisionRestore, O as handleMediaList, T as handleMediaCreate, d as createPluginBundleStore, j as handleRevisionList, k as handleMediaUpdate } from "../api-COSxvdOi.mjs";
|
|
61
|
+
import "../query-DLeahg3x.mjs";
|
|
62
|
+
import "../zod-generator-DkrWuID7.mjs";
|
|
63
|
+
import "../schema-CosVhHJt.mjs";
|
|
64
|
+
import "../discovery-V0e0Gg8j.mjs";
|
|
65
|
+
import "../seo-B-5PsaJO.mjs";
|
|
66
|
+
import "../bylines-6T9iVC9j.mjs";
|
|
67
|
+
import "../byline-fields-BKj5f3Ub.mjs";
|
|
68
|
+
import "../sections-BqqYq9RW.mjs";
|
|
69
|
+
import "../settings-CyJ2-MKx.mjs";
|
|
70
|
+
import { t as IntegrationCredentialStore } from "../store-32e6dfD-.mjs";
|
|
71
|
+
import "../integration-credentials-DMEXZU2J.mjs";
|
|
72
|
+
import "../resolve-DEKC4qVa.mjs";
|
|
73
|
+
import "../taxonomies-lWGNLKgn.mjs";
|
|
74
|
+
import "../taxonomies-BFsUR7kc.mjs";
|
|
75
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-CCvogfrP.mjs";
|
|
76
|
+
import "../parse-THHCpJLB.mjs";
|
|
77
|
+
import "../redirects-CVfxefrz.mjs";
|
|
78
|
+
import "../byline-fields-DZ46DF10.mjs";
|
|
79
|
+
import "../status-Bjf_uSrW.mjs";
|
|
80
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-hYufGFPK.mjs";
|
|
81
|
+
import "../rate-limit-BsBr_U9g.mjs";
|
|
82
|
+
import { a as invalidateUrlPatternCache } from "../query-xspvw7Ui.mjs";
|
|
83
|
+
import "../preview-Bh7D7F27.mjs";
|
|
84
|
+
import "../parser-kettsjWc.mjs";
|
|
85
|
+
import { n as runPluginMigrations } from "../migrations-CLlX25HO.mjs";
|
|
86
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-CjORiJQ_.mjs";
|
|
87
|
+
import { n as CronExecutor } from "../cron-C7HCJPPl.mjs";
|
|
88
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-GqK6hgMJ.mjs";
|
|
89
|
+
import "../api-tokens-0N3nafqZ.mjs";
|
|
90
|
+
import { n as createActivePluginMcpRegistry } from "../mcp-reviewed-executor-B8Gbin3T.mjs";
|
|
91
|
+
import { n as redactActivityRecord } from "../activity-LXZdjKwI.mjs";
|
|
92
|
+
import "../activity-events-DoqeOM8x.mjs";
|
|
93
|
+
import { i as experimentalSiteContextWorkflowsEnabled } from "../experimental-workflows-BbxpWwBy.mjs";
|
|
94
|
+
import "../utils-CYxGuO_P.mjs";
|
|
95
|
+
import "../search-BI9uKr7U.mjs";
|
|
96
|
+
import "../import-C2-v4FCs.mjs";
|
|
97
|
+
import "../tokens-D-StaTAQ.mjs";
|
|
98
|
+
import "../comment-reaction-Dp3G7UZc.mjs";
|
|
99
|
+
import "../menus-w5xwT-f5.mjs";
|
|
100
|
+
import "../bylines-CvTSCAw9.mjs";
|
|
101
|
+
import "../widgets-BOrDZdQ3.mjs";
|
|
102
|
+
import "../validate-C05z0m7M.mjs";
|
|
103
|
+
import "../apply-D4rZHDyg.mjs";
|
|
104
|
+
import "../load-DvCVppOF.mjs";
|
|
105
105
|
import "../index.mjs";
|
|
106
|
-
import { n as d1ReleaseRevision, t as assertD1Release } from "../state-
|
|
107
|
-
import { t as getAuthMode } from "../mode-
|
|
108
|
-
import { i as runPublicationTransaction, r as validateReviewMedia, t as ReviewAutomationWorker } from "../worker-
|
|
109
|
-
import "../policy-
|
|
110
|
-
import { t as cleanupExpiredChallenges } from "../challenge-store-
|
|
111
|
-
import { t as resolveSessionUser } from "../session-user-
|
|
106
|
+
import { n as d1ReleaseRevision, t as assertD1Release } from "../state-DM7blWfT.mjs";
|
|
107
|
+
import { t as getAuthMode } from "../mode-D0gePRtf.mjs";
|
|
108
|
+
import { i as runPublicationTransaction, r as validateReviewMedia, t as ReviewAutomationWorker } from "../worker-Bg35R37I.mjs";
|
|
109
|
+
import "../policy-B6mVa7ib.mjs";
|
|
110
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-BPn3goP9.mjs";
|
|
111
|
+
import { t as resolveSessionUser } from "../session-user-eweCNKzW.mjs";
|
|
112
112
|
import { Kysely, sql } from "kysely";
|
|
113
113
|
import { getSecret } from "astro:env/server";
|
|
114
114
|
import { defineMiddleware } from "astro:middleware";
|
|
115
115
|
import virtualConfig from "virtual:dineway/config";
|
|
116
|
-
import { createDialect } from "virtual:dineway/dialect";
|
|
116
|
+
import { createCoalescingDialect, createDialect, createRequestScopedDb } from "virtual:dineway/dialect";
|
|
117
117
|
import { mediaProviders } from "virtual:dineway/media-providers";
|
|
118
118
|
import { plugins } from "virtual:dineway/plugins";
|
|
119
119
|
import { createSandboxRunner, sandboxEnabled } from "virtual:dineway/sandbox-runner";
|
|
@@ -1150,25 +1150,33 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1150
1150
|
const storage = DinewayRuntime.getStorage(deps);
|
|
1151
1151
|
let pluginStates = /* @__PURE__ */ new Map();
|
|
1152
1152
|
let siteInfo;
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1153
|
+
const initDb = deps.createCoalescingDialect && deps.config.database && !getRequestContext()?.db ? new Kysely({
|
|
1154
|
+
dialect: deps.createCoalescingDialect(deps.config.database.config),
|
|
1155
|
+
log: kyselyLogOption()
|
|
1156
|
+
}) : db;
|
|
1157
|
+
try {
|
|
1158
|
+
await Promise.all([phase("rt.plugins", "Plugin states", async () => {
|
|
1159
|
+
try {
|
|
1160
|
+
const states = await initDb.selectFrom("_plugin_state").select(["plugin_id", "status"]).execute();
|
|
1161
|
+
pluginStates = new Map(states.map((s) => [s.plugin_id, s.status]));
|
|
1162
|
+
} catch {}
|
|
1163
|
+
}), phase("rt.site", "Site info options", async () => {
|
|
1164
|
+
try {
|
|
1165
|
+
const siteOptions = await new OptionsRepository(initDb).getMany([
|
|
1166
|
+
"dineway:site_title",
|
|
1167
|
+
"dineway:site_url",
|
|
1168
|
+
"dineway:locale"
|
|
1169
|
+
]);
|
|
1170
|
+
siteInfo = {
|
|
1171
|
+
siteName: siteOptions.get("dineway:site_title") ?? void 0,
|
|
1172
|
+
siteUrl: siteOptions.get("dineway:site_url") ?? void 0,
|
|
1173
|
+
locale: siteOptions.get("dineway:locale") ?? void 0
|
|
1174
|
+
};
|
|
1175
|
+
} catch {}
|
|
1176
|
+
})]);
|
|
1177
|
+
} finally {
|
|
1178
|
+
if (initDb !== db) await initDb.destroy();
|
|
1179
|
+
}
|
|
1172
1180
|
const enabledPlugins = /* @__PURE__ */ new Set();
|
|
1173
1181
|
for (const plugin of deps.plugins) {
|
|
1174
1182
|
const status = pluginStates.get(plugin.id);
|
|
@@ -1336,9 +1344,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1336
1344
|
}
|
|
1337
1345
|
})();
|
|
1338
1346
|
if (collectionCount.count === 0 && !setupDone) {
|
|
1339
|
-
const { applySeed } = await import("../apply
|
|
1340
|
-
const { loadSeed } = await import("../load-
|
|
1341
|
-
const { validateSeed } = await import("../validate-
|
|
1347
|
+
const { applySeed } = await import("../apply-D4rZHDyg.mjs").then((n) => n.n);
|
|
1348
|
+
const { loadSeed } = await import("../load-DvCVppOF.mjs").then((n) => n.r);
|
|
1349
|
+
const { validateSeed } = await import("../validate-C05z0m7M.mjs").then((n) => n.n);
|
|
1342
1350
|
const seed = await loadSeed();
|
|
1343
1351
|
if (validateSeed(seed).valid) {
|
|
1344
1352
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -2277,6 +2285,120 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
2277
2285
|
}
|
|
2278
2286
|
};
|
|
2279
2287
|
|
|
2288
|
+
//#endregion
|
|
2289
|
+
//#region src/astro/middleware/scoped-db.ts
|
|
2290
|
+
/**
|
|
2291
|
+
* Request-scoped database lifecycle helpers.
|
|
2292
|
+
*
|
|
2293
|
+
* Extracted from middleware.ts so they can be unit-tested without pulling in
|
|
2294
|
+
* the virtual:dineway/* module graph. The middleware imports these to settle a
|
|
2295
|
+
* request-scoped db adapter's lifecycle around the response.
|
|
2296
|
+
*/
|
|
2297
|
+
/**
|
|
2298
|
+
* Astro attaches AstroCookies to outgoing responses via a well-known global
|
|
2299
|
+
* symbol. Cloning a Response (`new Response(body, init)`) drops non-header
|
|
2300
|
+
* metadata, so any helper that wraps the response must explicitly forward this
|
|
2301
|
+
* symbol or `cookies.set()` calls will be silently dropped. `Symbol.for`
|
|
2302
|
+
* returns the same registry symbol everywhere, so this matches the copy in
|
|
2303
|
+
* middleware.ts.
|
|
2304
|
+
*/
|
|
2305
|
+
const ASTRO_COOKIES_SYMBOL$2 = Symbol.for("astro.cookies");
|
|
2306
|
+
/**
|
|
2307
|
+
* Run a request-scoped db's `close()` once the response body has finished
|
|
2308
|
+
* streaming. Astro streams HTML and components issue DB queries during that
|
|
2309
|
+
* stream, so a connection-backed adapter (e.g. Postgres over Hyperdrive) must
|
|
2310
|
+
* not be torn down until the body is flushed. Bodyless responses (redirects,
|
|
2311
|
+
* 304s, errors) close immediately. A guard makes close idempotent and a stream
|
|
2312
|
+
* `cancel` (client disconnect) still triggers it so connections never leak.
|
|
2313
|
+
*
|
|
2314
|
+
* No-op for adapters without a `close` (D1): the response passes through.
|
|
2315
|
+
*/
|
|
2316
|
+
function wrapResponseForScopedClose(response, close) {
|
|
2317
|
+
let closed = false;
|
|
2318
|
+
const runClose = () => {
|
|
2319
|
+
if (closed) return;
|
|
2320
|
+
closed = true;
|
|
2321
|
+
try {
|
|
2322
|
+
close();
|
|
2323
|
+
} catch (error) {
|
|
2324
|
+
console.error("[dineway] request-scoped db close failed:", error);
|
|
2325
|
+
}
|
|
2326
|
+
};
|
|
2327
|
+
if (!response.body) {
|
|
2328
|
+
runClose();
|
|
2329
|
+
return response;
|
|
2330
|
+
}
|
|
2331
|
+
const transform = new TransformStream({
|
|
2332
|
+
flush: runClose,
|
|
2333
|
+
cancel: runClose
|
|
2334
|
+
});
|
|
2335
|
+
const wrapped = new Response(response.body.pipeThrough(transform), response);
|
|
2336
|
+
const astroCookies = Reflect.get(response, ASTRO_COOKIES_SYMBOL$2);
|
|
2337
|
+
if (astroCookies !== void 0) Reflect.set(wrapped, ASTRO_COOKIES_SYMBOL$2, astroCookies);
|
|
2338
|
+
wrapped.headers.delete("Content-Length");
|
|
2339
|
+
return wrapped;
|
|
2340
|
+
}
|
|
2341
|
+
/**
|
|
2342
|
+
* Run the request body under a request-scoped db, then settle its lifecycle:
|
|
2343
|
+
* `commit()` runs before the response is returned (so per-request state like a
|
|
2344
|
+
* D1 bookmark cookie is persisted in the headers, even if render throws), while
|
|
2345
|
+
* `close()` (if any) is deferred to stream-end so a connection-backed adapter
|
|
2346
|
+
* isn't torn down mid-render. On error the connection is closed immediately
|
|
2347
|
+
* before rethrowing so it never leaks.
|
|
2348
|
+
*
|
|
2349
|
+
* On the error path both `commit()` and `close()` are defended: a throw from
|
|
2350
|
+
* either is logged and swallowed so it can't replace the propagating render
|
|
2351
|
+
* error (which is the one the caller needs to see). On the success path
|
|
2352
|
+
* `commit()` is guarded too — if it throws, the connection is closed before the
|
|
2353
|
+
* failure is surfaced, so it never leaks. For the current adapters `commit()`
|
|
2354
|
+
* is a no-op (Hyperdrive) or a cookie write (D1, no `close`) and `close()` is
|
|
2355
|
+
* fire-and-forget, so these guards only matter for a future connection-backed
|
|
2356
|
+
* adapter with throwing teardown, but the helper is generic and must not leak
|
|
2357
|
+
* or mask.
|
|
2358
|
+
*/
|
|
2359
|
+
async function finishScoped(scoped, run) {
|
|
2360
|
+
let response;
|
|
2361
|
+
try {
|
|
2362
|
+
response = await run();
|
|
2363
|
+
} catch (error) {
|
|
2364
|
+
commitSafely(scoped.commit);
|
|
2365
|
+
closeSafely(scoped.close);
|
|
2366
|
+
throw error;
|
|
2367
|
+
}
|
|
2368
|
+
try {
|
|
2369
|
+
scoped.commit();
|
|
2370
|
+
} catch (error) {
|
|
2371
|
+
closeSafely(scoped.close);
|
|
2372
|
+
throw error;
|
|
2373
|
+
}
|
|
2374
|
+
return scoped.close ? wrapResponseForScopedClose(response, scoped.close) : response;
|
|
2375
|
+
}
|
|
2376
|
+
/**
|
|
2377
|
+
* Run commit() swallowing any error. Used where an exception is already
|
|
2378
|
+
* propagating (or about to be thrown) and a commit failure must neither mask it
|
|
2379
|
+
* nor skip the subsequent close().
|
|
2380
|
+
*/
|
|
2381
|
+
function commitSafely(commit) {
|
|
2382
|
+
try {
|
|
2383
|
+
commit();
|
|
2384
|
+
} catch (error) {
|
|
2385
|
+
console.error("[dineway] request-scoped db commit failed during error handling:", error);
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Run close() swallowing any error. Used on the error/commit-failure paths
|
|
2390
|
+
* where another exception is the one the caller must see; a throwing teardown
|
|
2391
|
+
* must not replace it.
|
|
2392
|
+
*/
|
|
2393
|
+
function closeSafely(close) {
|
|
2394
|
+
if (!close) return;
|
|
2395
|
+
try {
|
|
2396
|
+
close();
|
|
2397
|
+
} catch (error) {
|
|
2398
|
+
console.error("[dineway] request-scoped db close failed during error handling:", error);
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2280
2402
|
//#endregion
|
|
2281
2403
|
//#region src/astro/middleware/stream-end-metrics.ts
|
|
2282
2404
|
/**
|
|
@@ -2409,6 +2531,7 @@ function buildDependencies(config) {
|
|
|
2409
2531
|
config,
|
|
2410
2532
|
plugins: getPlugins(),
|
|
2411
2533
|
createDialect,
|
|
2534
|
+
createCoalescingDialect,
|
|
2412
2535
|
createStorage,
|
|
2413
2536
|
sandboxEnabled,
|
|
2414
2537
|
sandboxedPluginEntries: sandboxedPlugins || [],
|
|
@@ -2510,6 +2633,37 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2510
2633
|
const serverTimings = createServerTimings();
|
|
2511
2634
|
const metrics = serverTimings || queryRecorder ? createRequestMetrics(performance.now()) : void 0;
|
|
2512
2635
|
const middlewareStart = startServerTiming(serverTimings);
|
|
2636
|
+
const renderWithDatabase = async () => {
|
|
2637
|
+
const parent = getRequestContext();
|
|
2638
|
+
const config = getConfig();
|
|
2639
|
+
if (!config?.database?.supportsRequestScope || context.isPrerendered || parent?.databaseMode === "primary" || parent?.db || locals.__dinewayRequestDb) return next();
|
|
2640
|
+
const user = cookies.get("astro-session") ? await resolveSessionUser(context.session) : void 0;
|
|
2641
|
+
const scoped = createRequestScopedDb({
|
|
2642
|
+
config: config.database.config,
|
|
2643
|
+
isAuthenticated: !!user || !!locals.user || request.headers.has("authorization"),
|
|
2644
|
+
isWrite: !["GET", "HEAD"].includes(request.method) || url.pathname.startsWith("/_dineway") || url.searchParams.has("_preview"),
|
|
2645
|
+
cookies,
|
|
2646
|
+
url
|
|
2647
|
+
});
|
|
2648
|
+
if (!scoped) return next();
|
|
2649
|
+
const { getDb } = await import("../loader-Dp6zLmQm.mjs").then((n) => n.i);
|
|
2650
|
+
const primaryDb = await getDb();
|
|
2651
|
+
let authenticated = !!user || !!locals.user || request.headers.has("authorization");
|
|
2652
|
+
return runWithContext({
|
|
2653
|
+
editMode: false,
|
|
2654
|
+
...parent,
|
|
2655
|
+
db: scoped.db,
|
|
2656
|
+
dbIsIsolated: false,
|
|
2657
|
+
primaryDb
|
|
2658
|
+
}, () => finishScoped({
|
|
2659
|
+
...scoped,
|
|
2660
|
+
commit: () => scoped.commit(authenticated)
|
|
2661
|
+
}, async () => {
|
|
2662
|
+
const response = await next();
|
|
2663
|
+
authenticated = url.pathname.startsWith("/_dineway/api/auth/") ? !!await resolveSessionUser(context.session) || request.headers.has("authorization") : !!locals.user || !!user || request.headers.has("authorization");
|
|
2664
|
+
return response;
|
|
2665
|
+
}));
|
|
2666
|
+
};
|
|
2513
2667
|
const handleRequest = async () => {
|
|
2514
2668
|
const isDinewayRoute = url.pathname.startsWith("/_dineway");
|
|
2515
2669
|
const isApplicationApiRoute = url.pathname.startsWith("/api/");
|
|
@@ -2523,7 +2677,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2523
2677
|
if (!isSetupVerified() && !context.isPrerendered) {
|
|
2524
2678
|
const setupStart = startServerTiming(serverTimings);
|
|
2525
2679
|
try {
|
|
2526
|
-
const { getDb } = await import("../loader-
|
|
2680
|
+
const { getDb } = await import("../loader-Dp6zLmQm.mjs").then((n) => n.i);
|
|
2527
2681
|
await (await getDb()).selectFrom("_dineway_migrations").selectAll().limit(1).execute();
|
|
2528
2682
|
markSetupVerified();
|
|
2529
2683
|
} catch (error) {
|
|
@@ -2546,6 +2700,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2546
2700
|
collectPageFragments: runtime.collectPageFragments.bind(runtime),
|
|
2547
2701
|
ensureSearchHealthy: runtime.ensureSearchHealthy.bind(runtime),
|
|
2548
2702
|
getPublicMediaUrl: createPublicMediaUrlResolver(runtime.storage),
|
|
2703
|
+
storage: runtime.storage,
|
|
2549
2704
|
config
|
|
2550
2705
|
};
|
|
2551
2706
|
} catch {}
|
|
@@ -2553,7 +2708,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2553
2708
|
if (serverTimings && initSubTimings) serverTimings.push(...initSubTimings);
|
|
2554
2709
|
}
|
|
2555
2710
|
const renderStart = startServerTiming(serverTimings);
|
|
2556
|
-
const response = await
|
|
2711
|
+
const response = await renderWithDatabase();
|
|
2557
2712
|
addServerTiming(serverTimings, "render", renderStart, "Page render");
|
|
2558
2713
|
addServerTiming(serverTimings, "mw", middlewareStart, "Total middleware");
|
|
2559
2714
|
addRequestMetricTimings(serverTimings, metrics);
|
|
@@ -2617,7 +2772,9 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2617
2772
|
ensureSearchHealthy: runtime.ensureSearchHealthy.bind(runtime),
|
|
2618
2773
|
runScheduledTasks: runtime.runScheduledTasks.bind(runtime),
|
|
2619
2774
|
storage: runtime.storage,
|
|
2620
|
-
db
|
|
2775
|
+
get db() {
|
|
2776
|
+
return runtime.db;
|
|
2777
|
+
},
|
|
2621
2778
|
getPublicMediaUrl: createPublicMediaUrlResolver(runtime.storage),
|
|
2622
2779
|
hooks: runtime.hooks,
|
|
2623
2780
|
email: runtime.email,
|
|
@@ -2634,7 +2791,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2634
2791
|
console.error("Dineway middleware error:", error);
|
|
2635
2792
|
}
|
|
2636
2793
|
const renderStart = startServerTiming(serverTimings);
|
|
2637
|
-
const response = await
|
|
2794
|
+
const response = await renderWithDatabase();
|
|
2638
2795
|
addServerTiming(serverTimings, "render", renderStart, "Page render");
|
|
2639
2796
|
addServerTiming(serverTimings, "mw", middlewareStart, "Total middleware");
|
|
2640
2797
|
addRequestMetricTimings(serverTimings, metrics);
|
|
@@ -2669,9 +2826,9 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2669
2826
|
return handleRequest();
|
|
2670
2827
|
});
|
|
2671
2828
|
const onRequest = defineMiddleware((context, next) => runWithPageCache(context.cache?.enabled && !context.locals.__dinewayRequestDb ? context.cache : void 0, () => runWithRuntimeEnvironment(getSecret, async () => {
|
|
2672
|
-
if (getConfig()?.database?.entrypoint !== "dineway/db/d1" || context.isPrerendered) return handleRequestWithRuntime(context, next);
|
|
2829
|
+
if (getConfig()?.database?.entrypoint !== "@dineway-ai/cloudflare/db/d1" || context.isPrerendered) return handleRequestWithRuntime(context, next);
|
|
2673
2830
|
try {
|
|
2674
|
-
const { getDb } = await import("../loader-
|
|
2831
|
+
const { getDb } = await import("../loader-Dp6zLmQm.mjs").then((n) => n.i);
|
|
2675
2832
|
await assertD1Release(await getDb(), d1ReleaseRevision(getPlugins()));
|
|
2676
2833
|
} catch (error) {
|
|
2677
2834
|
console.error("Dineway D1 release check failed:", error);
|
|
@@ -2685,6 +2842,18 @@ const onRequest = defineMiddleware((context, next) => runWithPageCache(context.c
|
|
|
2685
2842
|
}
|
|
2686
2843
|
return handleRequestWithRuntime(context, next);
|
|
2687
2844
|
})));
|
|
2845
|
+
/** Run maintenance from a platform scheduler, with the same release gate as HTTP requests. */
|
|
2846
|
+
async function runScheduledTasks(options = {}) {
|
|
2847
|
+
return withPrimaryDatabase(() => runWithRuntimeEnvironment(getSecret, async () => {
|
|
2848
|
+
const config = getConfig();
|
|
2849
|
+
if (!config) throw new Error("Dineway is not configured.");
|
|
2850
|
+
if (config.database?.entrypoint === "@dineway-ai/cloudflare/db/d1") {
|
|
2851
|
+
const { getDb } = await import("../loader-Dp6zLmQm.mjs").then((n) => n.i);
|
|
2852
|
+
await assertD1Release(await getDb(), d1ReleaseRevision(getPlugins()));
|
|
2853
|
+
}
|
|
2854
|
+
return (await getRuntime(config)).runScheduledTasks(options);
|
|
2855
|
+
}));
|
|
2856
|
+
}
|
|
2688
2857
|
|
|
2689
2858
|
//#endregion
|
|
2690
|
-
export { RUNTIME_INIT_DEADLINE_MS, onRequest as default, onRequest };
|
|
2859
|
+
export { RUNTIME_INIT_DEADLINE_MS, onRequest as default, onRequest, runScheduledTasks };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../../../context-types-
|
|
2
|
-
import "../../../../../public-discovery-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { S as allowedDomainUpdateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
7
|
-
import "../../../../../status-
|
|
1
|
+
import "../../../../../context-types-CPWAJRs5.mjs";
|
|
2
|
+
import "../../../../../public-discovery-BGyhuD5U.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-B5a45Tfb.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-THHCpJLB.mjs";
|
|
5
|
+
import { S as allowedDomainUpdateBody } from "../../../../../redirects-CVfxefrz.mjs";
|
|
6
|
+
import "../../../../../byline-fields-DZ46DF10.mjs";
|
|
7
|
+
import "../../../../../status-Bjf_uSrW.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { Role, roleFromLevel } from "@dineway-ai/auth";
|
|
10
10
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../../../context-types-
|
|
2
|
-
import "../../../../../public-discovery-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { x as allowedDomainCreateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
7
|
-
import "../../../../../status-
|
|
1
|
+
import "../../../../../context-types-CPWAJRs5.mjs";
|
|
2
|
+
import "../../../../../public-discovery-BGyhuD5U.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-B5a45Tfb.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-THHCpJLB.mjs";
|
|
5
|
+
import { x as allowedDomainCreateBody } from "../../../../../redirects-CVfxefrz.mjs";
|
|
6
|
+
import "../../../../../byline-fields-DZ46DF10.mjs";
|
|
7
|
+
import "../../../../../status-Bjf_uSrW.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { Role, roleFromLevel } from "@dineway-ai/auth";
|
|
10
10
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
-
import "../../../../../api-tokens-
|
|
3
|
-
import { i as handleApiTokenRevoke } from "../../../../../api-tokens-
|
|
4
|
-
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-
|
|
1
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-B5a45Tfb.mjs";
|
|
2
|
+
import "../../../../../api-tokens-0N3nafqZ.mjs";
|
|
3
|
+
import { i as handleApiTokenRevoke } from "../../../../../api-tokens-CNHnKO57.mjs";
|
|
4
|
+
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-DbjgJdlo.mjs";
|
|
5
5
|
import { Role } from "@dineway-ai/auth";
|
|
6
6
|
|
|
7
7
|
//#region src/astro/routes/api/admin/api-tokens/[id].ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
3
|
-
import { t as ALL_VALID_SCOPES } from "../../../../../api-tokens-
|
|
4
|
-
import { c as requestedExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, s as getExperimentalSiteContextWorkflowsDisabledMessage } from "../../../../../experimental-workflows-
|
|
5
|
-
import { n as handleApiTokenCreate, r as handleApiTokenList } from "../../../../../api-tokens-
|
|
6
|
-
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-
|
|
1
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-B5a45Tfb.mjs";
|
|
2
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-THHCpJLB.mjs";
|
|
3
|
+
import { t as ALL_VALID_SCOPES } from "../../../../../api-tokens-0N3nafqZ.mjs";
|
|
4
|
+
import { c as requestedExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, s as getExperimentalSiteContextWorkflowsDisabledMessage } from "../../../../../experimental-workflows-BbxpWwBy.mjs";
|
|
5
|
+
import { n as handleApiTokenCreate, r as handleApiTokenList } from "../../../../../api-tokens-CNHnKO57.mjs";
|
|
6
|
+
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-DbjgJdlo.mjs";
|
|
7
7
|
import { Role } from "@dineway-ai/auth";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|