dineway 0.2.40 → 0.2.42
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-LXZdjKwI.mjs → activity-BuhkMdv8.mjs} +2 -2
- package/dist/{activity-events-DoqeOM8x.mjs → activity-events-DkHsy7Y0.mjs} +1 -1
- package/dist/{allowed-origins-B4zstd2d.mjs → allowed-origins-DASdFW-l.mjs} +1 -1
- package/dist/api/route-utils.d.mts +15 -12
- package/dist/api/route-utils.mjs +27 -20
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +10 -5
- package/dist/{api-CQishNjZ.mjs → api-BBXfpMJw.mjs} +41 -13
- package/dist/{api-tokens-CNHnKO57.mjs → api-tokens-ciHNTdN2.mjs} +1 -1
- package/dist/{apply-D4rZHDyg.mjs → apply-CZDKUvZ4.mjs} +62 -18
- package/dist/astro/index.d.mts +16 -13
- package/dist/astro/index.mjs +31 -5
- package/dist/astro/middleware/auth.d.mts +14 -11
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs +10 -6
- package/dist/astro/middleware/request-context.mjs +5 -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.d.mts +2 -2
- package/dist/astro/middleware.mjs +266 -176
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +12 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +12 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
- package/dist/astro/routes/api/admin/briefing.mjs +41 -22
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +14 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/index.mjs +25 -19
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +20 -16
- package/dist/astro/routes/api/admin/comments/_id_.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +18 -13
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +57 -44
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +57 -44
- package/dist/astro/routes/api/admin/context/diff.mjs +56 -43
- package/dist/astro/routes/api/admin/context/index.mjs +57 -44
- package/dist/astro/routes/api/admin/context/stale.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +56 -43
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +52 -40
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/updates.mjs +71 -60
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +38 -23
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +46 -36
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +63 -52
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +9 -9
- package/dist/astro/routes/api/admin/review-requests/index.mjs +61 -50
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +12 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +14 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +16 -11
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +17 -12
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +14 -11
- 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 +12 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +19 -14
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +16 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/setup-token/index.mjs +6 -6
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +14 -11
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +23 -19
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +23 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +25 -20
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +14 -9
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +30 -20
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/trash.mjs +13 -8
- package/dist/astro/routes/api/dashboard.mjs +21 -13
- 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 +30 -23
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +13 -10
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +58 -47
- package/dist/astro/routes/api/import/wordpress/media.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/media.mjs +17 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +61 -48
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +15 -12
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +58 -45
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +32 -26
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +63 -52
- package/dist/astro/routes/api/integration/artifact.mjs +9 -9
- package/dist/astro/routes/api/integration/dispatch.mjs +14 -14
- package/dist/astro/routes/api/integrations/_provider_.mjs +9 -9
- package/dist/astro/routes/api/integrations/index.mjs +8 -8
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +141 -93
- package/dist/astro/routes/api/media/_id_/confirm.mjs +15 -12
- package/dist/astro/routes/api/media/_id_.mjs +14 -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 +16 -13
- package/dist/astro/routes/api/media.mjs +19 -16
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/items.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/translations.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_.mjs +57 -44
- package/dist/astro/routes/api/menus/index.mjs +57 -44
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- 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 +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +10 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +15 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs +15 -13
- package/dist/astro/routes/api/redirects/_id_.mjs +57 -44
- package/dist/astro/routes/api/redirects/index.mjs +57 -44
- 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 +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/index.mjs +73 -62
- package/dist/astro/routes/api/schema/index.mjs +13 -10
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +71 -60
- package/dist/astro/routes/api/schema/orphans/index.mjs +71 -60
- package/dist/astro/routes/api/search/enable.mjs +20 -13
- package/dist/astro/routes/api/search/index.mjs +19 -12
- package/dist/astro/routes/api/search/rebuild.mjs +20 -13
- package/dist/astro/routes/api/search/stats.mjs +12 -7
- package/dist/astro/routes/api/search/suggest.mjs +19 -12
- package/dist/astro/routes/api/sections/_slug_.mjs +57 -44
- package/dist/astro/routes/api/sections/index.mjs +57 -44
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings/reviews.mjs +11 -11
- package/dist/astro/routes/api/settings.mjs +57 -44
- package/dist/astro/routes/api/setup/admin-verify.mjs +19 -14
- package/dist/astro/routes/api/setup/admin.mjs +17 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +44 -32
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +47 -34
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/index.mjs +60 -47
- package/dist/astro/routes/api/themes/preview.mjs +7 -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 +56 -43
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_.mjs +53 -41
- package/dist/astro/routes/api/widget-areas/index.mjs +57 -44
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +14 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +20 -16
- package/dist/astro/routes/sitemap.xml.mjs +19 -15
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +8 -3
- package/dist/astro/types.d.mts +21 -14
- package/dist/{atomic-authority-CnBQJ14T.mjs → atomic-authority-Bf5QZboB.mjs} +2 -2
- package/dist/{audit-Cl495Ze3.mjs → audit-hXJBTPY0.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-DbjgJdlo.mjs → auth-control-guard-DpUP6Fs_.mjs} +1 -1
- package/dist/{authorize-DDmgmnW-.mjs → authorize-DWNOqMKq.mjs} +1 -1
- package/dist/{briefing-DsD-Ouwc.mjs → briefing-BShyAm_Z.mjs} +1 -1
- package/dist/{briefing-COw-WcYz.mjs → briefing-CaeEFvkD.mjs} +995 -7
- package/dist/{bundle-bhiszAui.mjs → bundle-DWn5eFKz.mjs} +2 -2
- package/dist/{byline-fields-D-b9CWux.d.mts → byline-fields-B7pQ3LMi.d.mts} +14 -10
- package/dist/{byline-fields-BKj5f3Ub.mjs → byline-fields-DRMCc0V_.mjs} +1 -1
- package/dist/{byline-fields-DZ46DF10.mjs → byline-fields-wWu2Cb3l.mjs} +3 -3
- package/dist/{byline-registry-CJihchD1.mjs → byline-registry-Caj0_gbU.mjs} +1 -1
- package/dist/{byline-TYk2kad6.mjs → byline-uuVB2B3E.mjs} +65 -14
- package/dist/{bylines-6T9iVC9j.mjs → bylines-PLlsL31L.mjs} +3 -3
- package/dist/{bylines-CvTSCAw9.mjs → bylines-XGlNK0Lo.mjs} +5 -5
- package/dist/{patterns-Ay-4KImK.mjs → cache-DsEbwFVE.mjs} +51 -1
- package/dist/{chunks-C8vSD_5L.mjs → chunks-Bb56aCtB.mjs} +1 -1
- package/dist/cli/index.mjs +486 -48
- package/dist/cli/plugin-kit.d.mts +14 -11
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +16 -13
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-C1ZQCMog.mjs → client-factory-BLbm250o.mjs} +1 -1
- package/dist/{comment-DAQfUjqt.mjs → comment-BWDG1nQm.mjs} +2 -2
- package/dist/{comment-reaction-Dp3G7UZc.mjs → comment-reaction-B7pLTlQ7.mjs} +1 -1
- package/dist/{comments-BrvIaRAx.mjs → comments-xkten8nV.mjs} +1 -1
- package/dist/config-6R0bchVE.mjs +125 -0
- package/dist/{content-CIKsrvU9.mjs → content-BNeuaVCS.mjs} +302 -45
- package/dist/content-Dr22fzA_.mjs +390 -0
- package/dist/{content-refresh-BilzqcLt.mjs → content-refresh-D7wpVFJ_.mjs} +14 -8
- package/dist/content-storage/index.d.mts +193 -0
- package/dist/content-storage/index.mjs +29 -0
- package/dist/content-storage/store.d.mts +3 -0
- package/dist/content-storage/store.mjs +5 -0
- package/dist/{review-payload-Bap86e75.mjs → content-write-43KZZ7dz.mjs} +838 -131
- package/dist/{context-DAs_MZjJ.mjs → context-Cjz0y4Al.mjs} +292 -23
- package/dist/{context-DVTvucNb.mjs → context-DuYXPlfZ.mjs} +2 -2
- package/dist/{context-route-helpers-BP-UJ4u8.mjs → context-route-helpers-TP3EqxRQ.mjs} +2 -2
- package/dist/{dashboard-BAjWCGCP.mjs → dashboard-BquGX1ue.mjs} +4 -4
- package/dist/database/batch.d.mts +1 -1
- package/dist/database/batch.mjs +1 -1
- package/dist/database/d1/index.d.mts +14 -11
- package/dist/database/d1/index.mjs +4 -4
- package/dist/database/instrumentation.mjs +3 -2
- 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-Dh0rNlh1.mjs → device-flow-SoZh-HvN.mjs} +3 -3
- package/dist/{discovery-V0e0Gg8j.mjs → discovery-BwCZFUXm.mjs} +4 -4
- package/dist/{enrich-B7PIJ8Iy.mjs → enrich-CAMsD1aT.mjs} +1 -1
- package/dist/{error-B5a45Tfb.mjs → error-sL4aemcW.mjs} +2 -0
- package/dist/{evidence-Vnp_fQbC.mjs → evidence-1Gr8TlTf.mjs} +7 -7
- package/dist/{field-defs-cache-aXUeXJdC.mjs → field-defs-cache-dn5Tw79A.mjs} +4 -4
- package/dist/{fts-manager-BrPpYtK0.mjs → fts-manager-Zu5ITic0.mjs} +1 -1
- package/dist/{hitl-requests-BxMMON3s.mjs → hitl-requests-Bdab4DhO.mjs} +2 -2
- package/dist/{hitl-route-helpers-sdnjpx2k.mjs → hitl-route-helpers-DGMLQajA.mjs} +5 -5
- package/dist/hook-events-BQw73jc7.d.mts +32 -0
- package/dist/{import-C2-v4FCs.mjs → import-DJFlvQey.mjs} +9 -9
- package/dist/{index-BVGe04wF.d.mts → index-CLj17kW9.d.mts} +12 -5
- package/dist/index.d.mts +19 -16
- package/dist/index.mjs +107 -98
- package/dist/{integration-credentials-DMEXZU2J.mjs → integration-credentials-DpuRw1kx.mjs} +2 -2
- package/dist/{jsonld-wRF85RXo.d.mts → jsonld-CPijKSUe.d.mts} +2 -2
- package/dist/{load-DvCVppOF.mjs → load-CiRTddkJ.mjs} +1 -1
- package/dist/{loader-Dp6zLmQm.mjs → loader-Bq1aW12P.mjs} +16 -5
- package/dist/{manifest-schema-CCvogfrP.mjs → manifest-schema-DaQpgyTB.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-B8Gbin3T.mjs → mcp-reviewed-executor-DtTnFcqC.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 +16 -13
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-C5ba8fvI.mjs → media-BjH5OD-A.mjs} +1 -1
- package/dist/{media-allowlist-DQvscVkS.mjs → media-allowlist-C8HJ2O61.mjs} +1 -1
- package/dist/{menus-w5xwT-f5.mjs → menus-BXkfzNR1.mjs} +7 -7
- package/dist/{menus-CyNpBQrX.mjs → menus-CbBi7Ad7.mjs} +2 -2
- package/dist/migration-D9OY6vI9.mjs +526 -0
- package/dist/{migrations-CLlX25HO.mjs → migrations-BAjF60cl.mjs} +1 -1
- package/dist/{oauth-authorization-CdqJZUMf.mjs → oauth-authorization-CSSRMOKn.mjs} +4 -4
- package/dist/{oauth-clients-CHNb9MAZ.mjs → oauth-clients-DX5HIJJv.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-mxCW-Rpt.mjs → object-cache-DyI1SOBK.mjs} +3 -1
- package/dist/owned-metadata-C99DzQuq.mjs +69 -0
- package/dist/page/index.d.mts +15 -12
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-THHCpJLB.mjs → parse-C6kCR1OT.mjs} +1 -1
- package/dist/plugin-utils.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-pfraURNp.mjs → plugins-LtyuDuIb.mjs} +16 -962
- package/dist/{policy-D2USlibj.mjs → policy-Drg5yr1-.mjs} +2 -2
- package/dist/{preview-Bh7D7F27.mjs → preview-CWiIjMDi.mjs} +2 -2
- package/dist/{provider-loader-DT7vQ5FI.d.mts → provider-loader-oLKm1AU8.d.mts} +1 -1
- package/dist/{public-url-Ccv0Xmue.d.mts → public-url-CEC1vj02.d.mts} +2 -2
- package/dist/{public-url-CG5YbNqB.d.mts → public-url-cMnsBUZB.d.mts} +1 -1
- package/dist/{publication-authorization-B_HJSnzR.mjs → publication-authorization-CJ4Jr5Hg.mjs} +43 -17
- package/dist/{query-xspvw7Ui.mjs → query-CLWTwcTr.mjs} +14 -14
- package/dist/{query-DLeahg3x.mjs → query-CP9M8xxX.mjs} +4 -4
- package/dist/{rate-limit-BsBr_U9g.mjs → rate-limit-DeVLLe4z.mjs} +2 -2
- package/dist/{redirect-BQFa1THe.mjs → redirect-CJ-FAbNK.mjs} +2 -2
- package/dist/{redirects-DJcsgz_X.mjs → redirects-BKi6mek4.mjs} +4 -5
- package/dist/{redirects-CVfxefrz.mjs → redirects-I78-ZYLV.mjs} +5 -386
- package/dist/{registry-Dclv9iHv.mjs → registry-B-HULaJI.mjs} +7 -7
- package/dist/{release-Da2UFygt.mjs → release-D615eKav.mjs} +173 -22
- package/dist/request-context.d.mts +30 -0
- package/dist/{request-meta-CjORiJQ_.mjs → request-meta-DZYuLXx_.mjs} +1 -1
- package/dist/review-payload-Bhi52CbI.mjs +112 -0
- package/dist/{review-requests-CcSUTm_l.mjs → review-requests-CGQ1u7uY.mjs} +2 -2
- package/dist/{review-requests-CUVn0RBl.mjs → review-requests-DZYM51yI.mjs} +2 -2
- package/dist/{review-route-helpers-CKBfGKCi.mjs → review-route-helpers-DXNDyx_q.mjs} +2 -2
- package/dist/{revision-W6FDfDqx.mjs → revision-DlxUfOD5.mjs} +42 -7
- package/dist/revisions-qNkae-Dq.mjs +57 -0
- package/dist/{revocation-C_ZQvGRT.mjs → revocation-4we8kfBg.mjs} +2 -2
- package/dist/{runner-CRU7BXjr.mjs → runner-CuG8o1uW.mjs} +558 -487
- package/dist/{runner-SoP1rphP.d.mts → runner-DXQkyPeX.d.mts} +1 -1
- package/dist/{runs-BtaAiLTw.mjs → runs-BjgLfqCn.mjs} +5 -5
- package/dist/runtime-Bs2JMbb2.d.mts +45 -0
- package/dist/runtime-Ch5G-tnG.mjs +400 -0
- package/dist/runtime.d.mts +15 -12
- package/dist/runtime.mjs +9 -4
- package/dist/schema-DVeOJpqA.mjs +8 -0
- package/dist/{search-BI9uKr7U.mjs → search-zMoM2_uq.mjs} +4 -98
- package/dist/{secrets-D_pergcD.mjs → secrets-CIYcw9T9.mjs} +4 -4
- package/dist/{sections-BqqYq9RW.mjs → sections-BtO0Zdv5.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +38 -26
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +12 -9
- package/dist/{seo-B-5PsaJO.mjs → seo-DwcULb78.mjs} +1 -1
- package/dist/{seo-Bs_DUxJf.mjs → seo-uliFa7s-.mjs} +44 -5
- package/dist/{service-W2xuGLgw.mjs → service-BBJM08uD.mjs} +2 -2
- package/dist/{service-B65aJsN7.mjs → service-CkMuD5AE.mjs} +3 -3
- package/dist/{settings-CyJ2-MKx.mjs → settings-D31Y4msD.mjs} +2 -2
- package/dist/{settings-DsBzKeUQ.mjs → settings-DDOB3gW1.mjs} +7 -7
- package/dist/{setup-complete-t9yamqBb.mjs → setup-complete-5GxB7hiF.mjs} +1 -1
- package/dist/{site-activity-DU0UPDji.mjs → site-activity-hpfJkmxQ.mjs} +1 -1
- package/dist/{site-context-Dic2jHuw.mjs → site-context-D3AmDdpQ.mjs} +15 -15
- package/dist/{site-url-Tw6CfBB2.mjs → site-url-CYatfe3q.mjs} +1 -1
- package/dist/{state-jx6Yiwsm.mjs → state-ClG1I4wl.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-32e6dfD-.mjs → store-BzaAtszy.mjs} +3 -3
- package/dist/submission-DgLES24O.mjs +205 -0
- package/dist/{taxonomies-BFsUR7kc.mjs → taxonomies-B4hE8Yb3.mjs} +3 -3
- package/dist/{taxonomies-lWGNLKgn.mjs → taxonomies-BI26Bk-M.mjs} +7 -7
- package/dist/{taxonomy-DN6i1upz.mjs → taxonomy-B8w8F2Cs.mjs} +53 -3
- package/dist/terms-EskuqbKE.mjs +104 -0
- package/dist/text-extraction-CdqMGYQK.mjs +96 -0
- package/dist/{tokens-D-StaTAQ.mjs → tokens-D8HEH277.mjs} +1 -1
- package/dist/{trusted-proxy-hYufGFPK.mjs → trusted-proxy-Dg3U9Lrv.mjs} +1 -1
- package/dist/{types-D5JfvPvx.d.mts → types-0gRlZbhN.d.mts} +88 -32
- package/dist/{types-RFzE_V1M.mjs → types-BI3ULB3A.mjs} +2 -2
- package/dist/{types-B--VyN3n.d.mts → types-Dpv_MvwZ.d.mts} +1 -1
- package/dist/{types-CgcOeaiQ.d.mts → types-ex-UrNlz.d.mts} +1 -1
- package/dist/types-qOEot0UQ.d.mts +83 -0
- package/dist/ui/server-runtime.d.mts +18 -15
- package/dist/ui/server-runtime.mjs +29 -25
- package/dist/{user-Btai9rl3.mjs → user-Bl2_8rhJ.mjs} +2 -2
- package/dist/{utils-CYxGuO_P.mjs → utils-CklSLz9F.mjs} +2 -2
- package/dist/{validate-C05z0m7M.mjs → validate-C-yk7mmX.mjs} +3 -3
- package/dist/{validate-kmN2lS8H.d.mts → validate-DUscf6VG.d.mts} +3 -3
- package/dist/version-Co258u70.mjs +6 -0
- package/dist/version-store-BXv2D0de.mjs +208 -0
- package/dist/version-store-B_THJCc0.d.mts +98 -0
- package/dist/{widgets-BOrDZdQ3.mjs → widgets-B99mnftw.mjs} +3 -3
- package/dist/{wordpress-slugs-ROzITIBK.mjs → wordpress-slugs-yaeD7cxn.mjs} +1 -1
- package/dist/{worker-CKU70ODm.mjs → worker-DdI-KtvF.mjs} +10 -10
- package/dist/write-intent-DuHVqks9.mjs +108 -0
- package/dist/{zod-generator-DkrWuID7.mjs → zod-generator-B5Pt8fv0.mjs} +2 -2
- package/package.json +16 -4
- package/dist/cache-B5NSHhxG.mjs +0 -52
- package/dist/cron-C7HCJPPl.mjs +0 -271
- package/dist/schema-CosVhHJt.mjs +0 -8
- package/dist/submission-DJmRejGR.mjs +0 -411
- package/dist/version-CISd4wX_.mjs +0 -6
- /package/dist/{actor-DxUAJgQX.mjs → actor-D0AW80ld.mjs} +0 -0
- /package/dist/{adapter-symbols-Bq3JsWGM.d.mts → adapter-symbols-B9mi-BUh.d.mts} +0 -0
- /package/dist/{adapters-C8nRpUuj.d.mts → adapters-lDnJjNDz.d.mts} +0 -0
- /package/dist/{api-tokens-0N3nafqZ.mjs → api-tokens-CdfsE9PL.mjs} +0 -0
- /package/dist/{base64-Cz-aU0X1.mjs → base64-qvSs0Gxy.mjs} +0 -0
- /package/dist/{challenge-store-DFGsDtCj.mjs → challenge-store-Dq5HiMO3.mjs} +0 -0
- /package/dist/{components-rFN8NH3N.mjs → components-JA6tFHmE.mjs} +0 -0
- /package/dist/{context-types-CPWAJRs5.mjs → context-types-DDIJhGLs.mjs} +0 -0
- /package/dist/{default-BS6VQRkB.mjs → default-C2azCFSB.mjs} +0 -0
- /package/dist/{email-console-GqK6hgMJ.mjs → email-console-BYQp_5Qr.mjs} +0 -0
- /package/dist/{escape-CE7xOWzJ.mjs → escape-4_NNa6GR.mjs} +0 -0
- /package/dist/{experimental-workflows-BbxpWwBy.mjs → experimental-workflows-CPNiI2EL.mjs} +0 -0
- /package/dist/{forgeway-account-DcTxh3Gw.mjs → forgeway-account-7N-3srH-.mjs} +0 -0
- /package/dist/{hash-D2Rqd2J2.mjs → hash-qSYPMJ8w.mjs} +0 -0
- /package/dist/{media-url-D9kdpoLS.mjs → media-url-D5E1a47B.mjs} +0 -0
- /package/dist/{mime-BnVhH671.mjs → mime-FkfazULS.mjs} +0 -0
- /package/dist/{mode-BJwb_MgK.mjs → mode-B_m1BGFh.mjs} +0 -0
- /package/dist/{normalize-aTwryvvi.mjs → normalize-DrmlLn40.mjs} +0 -0
- /package/dist/{oauth-authority-P5YMSk2z.mjs → oauth-authority-DVlLFhsZ.mjs} +0 -0
- /package/dist/{oauth-state-store-CMqLdo4I.mjs → oauth-state-store-nf-78RbK.mjs} +0 -0
- /package/dist/{options-JiLWB6Bt.mjs → options-yFkLUuTw.mjs} +0 -0
- /package/dist/{output-7HDrYTSQ.mjs → output-B1GiXeT8.mjs} +0 -0
- /package/dist/{parser-kettsjWc.mjs → parser-CTlxybRo.mjs} +0 -0
- /package/dist/{passkey-config-DVzQ3dv3.mjs → passkey-config-BLon3ct9.mjs} +0 -0
- /package/dist/{placeholder-DJLP_HY7.d.mts → placeholder-DdZV3I8x.d.mts} +0 -0
- /package/dist/{portable-text-BE7nszX6.d.mts → portable-text-HNmwL-7L.d.mts} +0 -0
- /package/dist/{portable-text-tQhvPLf1.mjs → portable-text-p0Ojfpfo.mjs} +0 -0
- /package/dist/{process-cache-C19OA3am.mjs → process-cache-CMy5M80h.mjs} +0 -0
- /package/dist/{provider-loader-DERzBMUz.mjs → provider-loader-DlaT1usE.mjs} +0 -0
- /package/dist/{public-discovery-BGyhuD5U.mjs → public-discovery-BnqYofSK.mjs} +0 -0
- /package/dist/{public-url-DFXUU6Wp.mjs → public-url-BHjYWuaN.mjs} +0 -0
- /package/dist/{public-url-sR8SVmTt.mjs → public-url-GQygrYmg.mjs} +0 -0
- /package/dist/{redirect-BxacnBYL.mjs → redirect-CokmLN5o.mjs} +0 -0
- /package/dist/{request-cache-8_ifFzVw.mjs → request-cache-CizvDoxV.mjs} +0 -0
- /package/dist/{resolve-DEKC4qVa.mjs → resolve-BxFGSKYu.mjs} +0 -0
- /package/dist/{runtime-env-CPTzh0mZ.mjs → runtime-env-DpYGy4pT.mjs} +0 -0
- /package/dist/{scheduled-publish-BxdShRGs.d.mts → scheduled-publish-eCNGpvNm.d.mts} +0 -0
- /package/dist/{seo-contributions-LEFs1d7w.mjs → seo-contributions-ZKqrqsdT.mjs} +0 -0
- /package/dist/{service-kQ5ljRzX.mjs → service-DeX1PRNt.mjs} +0 -0
- /package/dist/{session-user-B8yYh0g5.mjs → session-user-B0XMp1GC.mjs} +0 -0
- /package/dist/{setup-nonce-B6A5Y1ea.mjs → setup-nonce-B9IO7PbK.mjs} +0 -0
- /package/dist/{sidecar-client-BwPhhz-F.mjs → sidecar-client-2hx5G46s.mjs} +0 -0
- /package/dist/{slugify-kD31VIv2.mjs → slugify-DvoaEPtL.mjs} +0 -0
- /package/dist/{ssrf-C9dyjU8O.mjs → ssrf-DcD8vn3E.mjs} +0 -0
- /package/dist/{stable-hash-B9Tbb2f_.mjs → stable-hash-9RDJgfif.mjs} +0 -0
- /package/dist/{status-Bjf_uSrW.mjs → status-B2xUokyJ.mjs} +0 -0
- /package/dist/{transport-BrU1aDY5.mjs → transport-BK_me2MZ.mjs} +0 -0
- /package/dist/{transport-CZbtxgKZ.d.mts → transport-CVU5rp7W.d.mts} +0 -0
- /package/dist/{types-DNBL-4Sn.mjs → types-B3Uq7Czg.mjs} +0 -0
- /package/dist/{types-DsJTXStN.d.mts → types-BJztoTbF.d.mts} +0 -0
- /package/dist/{types-COvyXIp7.mjs → types-BgUxCuwu.mjs} +0 -0
- /package/dist/{types-KFzuijKE.d.mts → types-C0heD9oI.d.mts} +0 -0
- /package/dist/{types-B03h5jt_.d.mts → types-DheoByey.d.mts} +0 -0
- /package/dist/{types-SlLXjRpg.d.mts → types-I5LHzk_M.d.mts} +0 -0
- /package/dist/{types-PLJ9hlhh.mjs → types-Nm0cMxEh.mjs} +0 -0
- /package/dist/{types-CtGSEKEJ.d.mts → types-PxxPTFSl.d.mts} +0 -0
- /package/dist/{url-DGG3hw_h.mjs → url-Coamqvs4.mjs} +0 -0
- /package/dist/{url-DUz3LbCs.mjs → url-dn4mFfCI.mjs} +0 -0
- /package/dist/{workers-build-BkmPhclj.mjs → workers-build-XNBt1wGF.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
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-CuG8o1uW.mjs";
|
|
2
2
|
import "../../d1-binding-DrLMBUxu.mjs";
|
|
3
3
|
import { AtomicWriteConflict, atomicBatch, isD1Database, rowUnchanged } from "../../database/batch.mjs";
|
|
4
4
|
import "../../dialect-helpers-C6xtO-Ui.mjs";
|
|
5
|
-
import { t as readRuntimeEnv } from "../../runtime-env-
|
|
5
|
+
import { t as readRuntimeEnv } from "../../runtime-env-DpYGy4pT.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
import { ulid } from "ulidx";
|
|
8
8
|
import { defineMiddleware } from "astro:middleware";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { t as PublishedRef } from "../scheduled-publish-
|
|
1
|
+
import "../types-Dpv_MvwZ.mjs";
|
|
2
|
+
import { t as PublishedRef } from "../scheduled-publish-eCNGpvNm.mjs";
|
|
3
3
|
import * as astro from "astro";
|
|
4
4
|
|
|
5
5
|
//#region src/astro/middleware.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
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-CuG8o1uW.mjs";
|
|
2
2
|
import { createRequestMetrics, getRequestContext, runWithContext, runWithPageCache, withPrimaryDatabase } from "../request-context.mjs";
|
|
3
3
|
import { after, hasBackgroundTaskContext } from "../after.mjs";
|
|
4
4
|
import "../connection-DJ3GzHVH.mjs";
|
|
@@ -6,113 +6,123 @@ import { t as d1Database } from "../d1-binding-DrLMBUxu.mjs";
|
|
|
6
6
|
import { atomicBatch, isD1Database } from "../database/batch.mjs";
|
|
7
7
|
import { s as isSqlite } from "../dialect-helpers-C6xtO-Ui.mjs";
|
|
8
8
|
import { i as setI18nConfig } from "../config-XW5tMrH8.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { d as EmailPipeline, f as definePlugin, m as readBoundedPluginRouteBody, p as DEFAULT_PLUGIN_RAW_BODY_LIMIT_BYTES, u as PluginRouteRegistry } from "../plugins-LtyuDuIb.mjs";
|
|
10
|
+
import "../config-6R0bchVE.mjs";
|
|
11
|
+
import { i as getContentStorageRuntime, o as registerContentStorage, r as getContentStorage, t as assertContentStorageConfiguration } from "../runtime-Ch5G-tnG.mjs";
|
|
12
|
+
import "../revisions-qNkae-Dq.mjs";
|
|
13
|
+
import { n as runWithRuntimeEnvironment } from "../runtime-env-DpYGy4pT.mjs";
|
|
10
14
|
import { createRecorder, flushRecorder, formatServerTimingHeader, isInstrumentationEnabled, isServerTimingEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
11
|
-
import "../base64-
|
|
12
|
-
import "../types-
|
|
13
|
-
import { o as isMissingTableError, r as getDb } from "../loader-
|
|
14
|
-
import "../actor-
|
|
15
|
-
import "../atomic-authority-
|
|
16
|
-
import "../
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import { t as
|
|
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 "../
|
|
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 "../
|
|
74
|
-
import "../
|
|
75
|
-
import {
|
|
76
|
-
import "../
|
|
77
|
-
import "../
|
|
78
|
-
import "../
|
|
79
|
-
import "../
|
|
80
|
-
import {
|
|
81
|
-
import "../
|
|
82
|
-
import
|
|
83
|
-
import "../
|
|
84
|
-
import "../
|
|
85
|
-
import
|
|
86
|
-
import {
|
|
87
|
-
import
|
|
88
|
-
import {
|
|
89
|
-
import "../
|
|
90
|
-
import
|
|
91
|
-
import { n as
|
|
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 "../
|
|
15
|
+
import "../base64-qvSs0Gxy.mjs";
|
|
16
|
+
import "../types-BI3ULB3A.mjs";
|
|
17
|
+
import { o as isMissingTableError, r as getDb } from "../loader-Bq1aW12P.mjs";
|
|
18
|
+
import "../actor-D0AW80ld.mjs";
|
|
19
|
+
import "../atomic-authority-Bf5QZboB.mjs";
|
|
20
|
+
import { i as drainContentHookEvents, t as ContentRepository } from "../content-BNeuaVCS.mjs";
|
|
21
|
+
import { r as requestCached } from "../request-cache-CizvDoxV.mjs";
|
|
22
|
+
import "../byline-registry-Caj0_gbU.mjs";
|
|
23
|
+
import { a as initWithLock, i as createInitLock, r as processCachedAsync, t as createProcessCache } from "../process-cache-CMy5M80h.mjs";
|
|
24
|
+
import "../field-defs-cache-dn5Tw79A.mjs";
|
|
25
|
+
import "../object-cache-DyI1SOBK.mjs";
|
|
26
|
+
import "../byline-uuVB2B3E.mjs";
|
|
27
|
+
import "../owned-metadata-C99DzQuq.mjs";
|
|
28
|
+
import { t as RevisionRepository } from "../revision-DlxUfOD5.mjs";
|
|
29
|
+
import { t as MediaRepository } from "../media-BjH5OD-A.mjs";
|
|
30
|
+
import "../user-Bl2_8rhJ.mjs";
|
|
31
|
+
import "../terms-EskuqbKE.mjs";
|
|
32
|
+
import "../taxonomy-B8w8F2Cs.mjs";
|
|
33
|
+
import "../comment-BWDG1nQm.mjs";
|
|
34
|
+
import { t as OptionsRepository } from "../options-yFkLUuTw.mjs";
|
|
35
|
+
import "../audit-hXJBTPY0.mjs";
|
|
36
|
+
import "../site-activity-hpfJkmxQ.mjs";
|
|
37
|
+
import { r as ReviewRequestRepository } from "../review-requests-DZYM51yI.mjs";
|
|
38
|
+
import { n as PublicationAuthorizationService, r as publicationReceipt, s as ContentReleaseGrantRepository, t as PublicationAuthorizationError } from "../publication-authorization-CJ4Jr5Hg.mjs";
|
|
39
|
+
import "../site-context-D3AmDdpQ.mjs";
|
|
40
|
+
import { i as CronExecutor, t as PluginContextFactory } from "../context-Cjz0y4Al.mjs";
|
|
41
|
+
import "../menus-CbBi7Ad7.mjs";
|
|
42
|
+
import "../redirect-CJ-FAbNK.mjs";
|
|
43
|
+
import { n as normalizeMediaValue } from "../normalize-DrmlLn40.mjs";
|
|
44
|
+
import "../enrich-CAMsD1aT.mjs";
|
|
45
|
+
import { C as handleContentUnschedule, D as encodeRev, E as decodeRev, O as validateRev, S as handleContentUnpublish, _ as handleContentPermanentDelete, a as handleContentAuthors, b as handleContentSchedule, c as handleContentCountTrashed, d as handleContentDiscardDraft, f as handleContentDuplicate, g as handleContentListTrashed, h as handleContentList, l as handleContentCreate, m as handleContentGetIncludingTrashed, o as handleContentCompare, p as handleContentGet, s as handleContentCountScheduled, u as handleContentDelete, v as handleContentPublish, w as handleContentUpdate, x as handleContentTranslations, y as handleContentRestore } from "../content-write-43KZZ7dz.mjs";
|
|
46
|
+
import "../text-extraction-CdqMGYQK.mjs";
|
|
47
|
+
import "../version-store-BXv2D0de.mjs";
|
|
48
|
+
import { i as runIdempotentContentWrite, n as isContentWriteReplay } from "../write-intent-DuHVqks9.mjs";
|
|
49
|
+
import "../seo-uliFa7s-.mjs";
|
|
50
|
+
import { t as ReviewPayloadBuilder } from "../review-payload-Bhi52CbI.mjs";
|
|
51
|
+
import "../context-types-DDIJhGLs.mjs";
|
|
52
|
+
import { f as createHookPipeline, p as resolveExclusiveHooks, u as PluginStateRepository } from "../briefing-CaeEFvkD.mjs";
|
|
53
|
+
import { a as SiteAiGateway, t as SiteIntegrationRuns } from "../runs-BjgLfqCn.mjs";
|
|
54
|
+
import { o as validateEncryptionKeyAtStartup } from "../secrets-CIYcw9T9.mjs";
|
|
55
|
+
import { i as markContentMediaUsageCollectionStale, r as findNonTranslatableSiblingContentIds, s as refreshContentMediaUsageAfterWrite, t as deleteContentMediaUsage } from "../content-refresh-D7wpVFJ_.mjs";
|
|
56
|
+
import "../ssrf-DcD8vn3E.mjs";
|
|
57
|
+
import { n as hashString } from "../hash-qSYPMJ8w.mjs";
|
|
58
|
+
import { t as FTSManager } from "../fts-manager-Zu5ITic0.mjs";
|
|
59
|
+
import "../public-discovery-BnqYofSK.mjs";
|
|
60
|
+
import { n as SchemaRegistry } from "../registry-B-HULaJI.mjs";
|
|
61
|
+
import { r as createPublicMediaUrlResolver } from "../url-dn4mFfCI.mjs";
|
|
62
|
+
import "../settings-DDOB3gW1.mjs";
|
|
63
|
+
import "../evidence-1Gr8TlTf.mjs";
|
|
64
|
+
import "../submission-DgLES24O.mjs";
|
|
65
|
+
import "../dashboard-BquGX1ue.mjs";
|
|
66
|
+
import "../briefing-BShyAm_Z.mjs";
|
|
67
|
+
import "../review-requests-CGQ1u7uY.mjs";
|
|
68
|
+
import { n as VERSION, t as COMMIT } from "../version-Co258u70.mjs";
|
|
69
|
+
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-BBXfpMJw.mjs";
|
|
70
|
+
import "../query-CP9M8xxX.mjs";
|
|
71
|
+
import "../zod-generator-B5Pt8fv0.mjs";
|
|
72
|
+
import "../schema-DVeOJpqA.mjs";
|
|
73
|
+
import "../discovery-BwCZFUXm.mjs";
|
|
74
|
+
import "../seo-DwcULb78.mjs";
|
|
75
|
+
import "../bylines-PLlsL31L.mjs";
|
|
76
|
+
import "../byline-fields-DRMCc0V_.mjs";
|
|
77
|
+
import "../sections-BtO0Zdv5.mjs";
|
|
78
|
+
import "../settings-D31Y4msD.mjs";
|
|
79
|
+
import { t as IntegrationCredentialStore } from "../store-BzaAtszy.mjs";
|
|
80
|
+
import "../integration-credentials-DpuRw1kx.mjs";
|
|
81
|
+
import "../resolve-BxFGSKYu.mjs";
|
|
82
|
+
import "../taxonomies-BI26Bk-M.mjs";
|
|
83
|
+
import "../taxonomies-B4hE8Yb3.mjs";
|
|
84
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-DaQpgyTB.mjs";
|
|
85
|
+
import "../parse-C6kCR1OT.mjs";
|
|
86
|
+
import "../content-Dr22fzA_.mjs";
|
|
87
|
+
import "../redirects-I78-ZYLV.mjs";
|
|
88
|
+
import "../byline-fields-wWu2Cb3l.mjs";
|
|
89
|
+
import "../status-B2xUokyJ.mjs";
|
|
90
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-Dg3U9Lrv.mjs";
|
|
91
|
+
import "../rate-limit-DeVLLe4z.mjs";
|
|
92
|
+
import { a as invalidateUrlPatternCache } from "../query-CLWTwcTr.mjs";
|
|
93
|
+
import "../preview-CWiIjMDi.mjs";
|
|
94
|
+
import "../parser-CTlxybRo.mjs";
|
|
95
|
+
import { n as runPluginMigrations } from "../migrations-BAjF60cl.mjs";
|
|
96
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-DZYuLXx_.mjs";
|
|
97
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-BYQp_5Qr.mjs";
|
|
98
|
+
import "../api-tokens-CdfsE9PL.mjs";
|
|
99
|
+
import { n as createActivePluginMcpRegistry } from "../mcp-reviewed-executor-DtTnFcqC.mjs";
|
|
100
|
+
import { n as redactActivityRecord } from "../activity-BuhkMdv8.mjs";
|
|
101
|
+
import "../activity-events-DkHsy7Y0.mjs";
|
|
102
|
+
import { i as experimentalSiteContextWorkflowsEnabled } from "../experimental-workflows-CPNiI2EL.mjs";
|
|
103
|
+
import "../utils-CklSLz9F.mjs";
|
|
104
|
+
import "../search-zMoM2_uq.mjs";
|
|
105
|
+
import "../import-DJFlvQey.mjs";
|
|
106
|
+
import "../tokens-D8HEH277.mjs";
|
|
107
|
+
import "../comment-reaction-B7pLTlQ7.mjs";
|
|
108
|
+
import "../menus-BXkfzNR1.mjs";
|
|
109
|
+
import "../bylines-XGlNK0Lo.mjs";
|
|
110
|
+
import "../widgets-B99mnftw.mjs";
|
|
111
|
+
import "../validate-C-yk7mmX.mjs";
|
|
112
|
+
import "../apply-CZDKUvZ4.mjs";
|
|
113
|
+
import "../load-CiRTddkJ.mjs";
|
|
105
114
|
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-
|
|
115
|
+
import { n as d1ReleaseRevision, t as assertD1Release } from "../state-ClG1I4wl.mjs";
|
|
116
|
+
import { t as getAuthMode } from "../mode-B_m1BGFh.mjs";
|
|
117
|
+
import { i as runPublicationTransaction, r as validateReviewMedia, t as ReviewAutomationWorker } from "../worker-DdI-KtvF.mjs";
|
|
118
|
+
import "../policy-Drg5yr1-.mjs";
|
|
119
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-Dq5HiMO3.mjs";
|
|
120
|
+
import { t as resolveSessionUser } from "../session-user-B0XMp1GC.mjs";
|
|
112
121
|
import { Kysely, sql } from "kysely";
|
|
113
122
|
import { getSecret } from "astro:env/server";
|
|
114
123
|
import { defineMiddleware } from "astro:middleware";
|
|
115
124
|
import virtualConfig from "virtual:dineway/config";
|
|
125
|
+
import { contentStorageRuntime } from "virtual:dineway/content-storage";
|
|
116
126
|
import { createCoalescingDialect, createDialect, createRequestScopedDb } from "virtual:dineway/dialect";
|
|
117
127
|
import { mediaProviders } from "virtual:dineway/media-providers";
|
|
118
128
|
import { plugins } from "virtual:dineway/plugins";
|
|
@@ -650,6 +660,14 @@ async function publishConfirmedBatch(db, input, authorize, policies) {
|
|
|
650
660
|
|
|
651
661
|
//#endregion
|
|
652
662
|
//#region src/dineway-runtime.ts
|
|
663
|
+
/**
|
|
664
|
+
* DinewayRuntime - Core runtime for Dineway Agentic Web builder
|
|
665
|
+
*
|
|
666
|
+
* Manages database, storage, plugins (trusted + sandboxed), hooks, and
|
|
667
|
+
* provides handlers for content/media operations.
|
|
668
|
+
*
|
|
669
|
+
* Created once per worker lifetime, cached and reused across requests.
|
|
670
|
+
*/
|
|
653
671
|
const LEADING_SLASH_PATTERN = /^\//;
|
|
654
672
|
const VALID_METADATA_KINDS = new Set([
|
|
655
673
|
"meta",
|
|
@@ -921,6 +939,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
921
939
|
return this.runSystemTasks(options);
|
|
922
940
|
}
|
|
923
941
|
async runSystemTasks(options = {}) {
|
|
942
|
+
if (this.config.contentStorage) await this.drainContentHooks();
|
|
924
943
|
try {
|
|
925
944
|
await new SiteIntegrationRuns({
|
|
926
945
|
db: this.db,
|
|
@@ -1009,6 +1028,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1009
1028
|
* Exclusive hook selections are re-resolved after each rebuild.
|
|
1010
1029
|
*/
|
|
1011
1030
|
async setPluginStatus(pluginId, status) {
|
|
1031
|
+
if (status === "active" && this.config.contentStorage && Object.keys(this.config.contentStorage.rules).length) createHookPipeline(this.allPipelinePlugins.filter((plugin) => this.enabledPlugins.has(plugin.id) || plugin.id === pluginId), this.pipelineFactoryOptions).assertContentStorageHooks();
|
|
1012
1032
|
this.pluginStates.set(pluginId, status);
|
|
1013
1033
|
if (status === "active") {
|
|
1014
1034
|
this.enabledPlugins.add(pluginId);
|
|
@@ -1031,6 +1051,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1031
1051
|
*/
|
|
1032
1052
|
async rebuildHookPipeline() {
|
|
1033
1053
|
const newPipeline = createHookPipeline(this.allPipelinePlugins.filter((p) => this.enabledPlugins.has(p.id)), this.pipelineFactoryOptions);
|
|
1054
|
+
if (this.config.contentStorage && Object.keys(this.config.contentStorage.rules).length) newPipeline.assertContentStorageHooks();
|
|
1034
1055
|
await DinewayRuntime.resolveExclusiveHooks(newPipeline, this.db, this.runtimeDeps);
|
|
1035
1056
|
if (this.email) newPipeline.setContextFactory({ emailPipeline: this.email });
|
|
1036
1057
|
if (this.cronScheduler) {
|
|
@@ -1144,6 +1165,11 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1144
1165
|
}
|
|
1145
1166
|
};
|
|
1146
1167
|
const db = await phase("rt.db", "DB init + migrations", () => DinewayRuntime.getDatabase(deps));
|
|
1168
|
+
if (d1Database(db) || deps.config.contentStorage) await assertContentStorageConfiguration(db, deps.config.contentStorage);
|
|
1169
|
+
if (deps.config.contentStorage) {
|
|
1170
|
+
if (!deps.contentStorageRuntime) throw new Error("Content storage adapters are not loaded.");
|
|
1171
|
+
registerContentStorage(db, deps.contentStorageRuntime);
|
|
1172
|
+
}
|
|
1147
1173
|
const resolveDb = () => getRequestContextDatabase() ?? db;
|
|
1148
1174
|
await phase("rt.plugin-migrations", "Trusted plugin migrations", () => runPluginMigrations(db, deps.plugins));
|
|
1149
1175
|
await phase("rt.secrets", "Validate encryption key", () => validateEncryptionKeyAtStartup());
|
|
@@ -1294,6 +1320,17 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1294
1320
|
});
|
|
1295
1321
|
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);
|
|
1296
1322
|
runtimeRef.current = runtime;
|
|
1323
|
+
if (deps.contentStorageRuntime && Object.keys(deps.contentStorageRuntime.config.rules).length) {
|
|
1324
|
+
pipeline.assertContentStorageHooks();
|
|
1325
|
+
if ([...runtime.sandboxedPlugins.keys()].some((key) => runtime.isPluginEnabled(key.split(":")[0]))) throw new Error("Sandboxed plugins are not supported with content storage routing.");
|
|
1326
|
+
registerContentStorage(db, {
|
|
1327
|
+
...deps.contentStorageRuntime,
|
|
1328
|
+
hookTargets: (names) => {
|
|
1329
|
+
if ([...runtime.sandboxedPlugins.keys()].some((key) => runtime.isPluginEnabled(key.split(":")[0]))) throw new Error("Routed content hooks require native plugins with declared idempotent delivery; sandboxed content hooks are not supported.");
|
|
1330
|
+
return runtime.hooks.contentStorageTargets(names);
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1297
1334
|
return runtime;
|
|
1298
1335
|
}
|
|
1299
1336
|
/**
|
|
@@ -1344,9 +1381,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1344
1381
|
}
|
|
1345
1382
|
})();
|
|
1346
1383
|
if (collectionCount.count === 0 && !setupDone) {
|
|
1347
|
-
const { applySeed } = await import("../apply-
|
|
1348
|
-
const { loadSeed } = await import("../load-
|
|
1349
|
-
const { validateSeed } = await import("../validate-
|
|
1384
|
+
const { applySeed } = await import("../apply-CZDKUvZ4.mjs").then((n) => n.n);
|
|
1385
|
+
const { loadSeed } = await import("../load-CiRTddkJ.mjs").then((n) => n.r);
|
|
1386
|
+
const { validateSeed } = await import("../validate-C-yk7mmX.mjs").then((n) => n.n);
|
|
1350
1387
|
const seed = await loadSeed();
|
|
1351
1388
|
if (validateSeed(seed).valid) {
|
|
1352
1389
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1628,77 +1665,88 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1628
1665
|
return handleContentGetIncludingTrashed(this.db, collection, id, locale);
|
|
1629
1666
|
}
|
|
1630
1667
|
async handleContentCreate(collection, body) {
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1668
|
+
return runIdempotentContentWrite(this.db, collection, body.operationId, {
|
|
1669
|
+
action: "create",
|
|
1670
|
+
body
|
|
1671
|
+
}, async () => {
|
|
1672
|
+
let processedData = body.data;
|
|
1673
|
+
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
|
|
1674
|
+
processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
|
|
1675
|
+
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1676
|
+
const result = await handleContentCreate(this.db, collection, {
|
|
1677
|
+
...body,
|
|
1678
|
+
data: processedData,
|
|
1679
|
+
authorId: body.authorId,
|
|
1680
|
+
bylines: body.bylines
|
|
1681
|
+
});
|
|
1682
|
+
if (result.success && result.data && !isContentWriteReplay(result)) {
|
|
1683
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, [result.data.item.id]);
|
|
1684
|
+
this.runAfterSaveHooks(contentItemToRecord(result.data.item), collection, true);
|
|
1685
|
+
}
|
|
1686
|
+
return result;
|
|
1687
|
+
}, (entryId) => this.handleContentGet(collection, entryId));
|
|
1646
1688
|
}
|
|
1647
1689
|
async handleContentUpdate(collection, id, body) {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
if (
|
|
1689
|
-
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1690
|
+
return runIdempotentContentWrite(this.db, collection, body.operationId, {
|
|
1691
|
+
action: "update",
|
|
1692
|
+
id,
|
|
1693
|
+
body
|
|
1694
|
+
}, async () => {
|
|
1695
|
+
const resolvedItem = await new ContentRepository(this.db).findByIdOrSlug(collection, id, body.locale);
|
|
1696
|
+
const resolvedId = resolvedItem?.id ?? id;
|
|
1697
|
+
if (body._rev) {
|
|
1698
|
+
if (!resolvedItem) return {
|
|
1699
|
+
success: false,
|
|
1700
|
+
error: {
|
|
1701
|
+
code: "NOT_FOUND",
|
|
1702
|
+
message: `Content item not found: ${id}`
|
|
1703
|
+
}
|
|
1704
|
+
};
|
|
1705
|
+
const revCheck = validateRev(body._rev, resolvedItem);
|
|
1706
|
+
if (!revCheck.valid) return {
|
|
1707
|
+
success: false,
|
|
1708
|
+
error: {
|
|
1709
|
+
code: "CONFLICT",
|
|
1710
|
+
message: revCheck.message
|
|
1711
|
+
}
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
const previousContent = await this.previousContentForNotification(collection, resolvedId);
|
|
1715
|
+
let processedData = body.data;
|
|
1716
|
+
if (body.data) {
|
|
1717
|
+
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, false)).content;
|
|
1718
|
+
processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
|
|
1719
|
+
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1720
|
+
}
|
|
1721
|
+
const usesDraftRevisions = !!processedData && (await this.schemaRegistry.getCollection(collection))?.supports.includes("revisions") === true;
|
|
1722
|
+
const result = await handleContentUpdate(this.db, collection, resolvedId, {
|
|
1723
|
+
...body,
|
|
1724
|
+
data: processedData,
|
|
1725
|
+
_rev: body._rev ?? (resolvedItem ? encodeRev(resolvedItem) : void 0)
|
|
1726
|
+
}, {
|
|
1727
|
+
stageDraft: true,
|
|
1728
|
+
skipRevision: body.skipRevision
|
|
1729
|
+
});
|
|
1730
|
+
if (result.success && usesDraftRevisions && !body.skipRevision) after(async () => {
|
|
1731
|
+
await new RevisionRepository(this.db).pruneOldRevisions(collection, resolvedId, 50);
|
|
1732
|
+
});
|
|
1733
|
+
if (result.success && result.data && !isContentWriteReplay(result)) {
|
|
1734
|
+
const contentIdsToRefresh = [resolvedId];
|
|
1735
|
+
if (!usesDraftRevisions && processedData) try {
|
|
1736
|
+
contentIdsToRefresh.push(...await findNonTranslatableSiblingContentIds(this.db, collection, resolvedId, result.data.item.translationGroup, processedData));
|
|
1737
|
+
} catch (error) {
|
|
1738
|
+
console.error(`[media-usage] Failed to discover synced i18n siblings for ${collection}/${resolvedId}:`, error);
|
|
1739
|
+
try {
|
|
1740
|
+
await markContentMediaUsageCollectionStale(this.db, collection, "CONTENT_USAGE_REFRESH_ERROR");
|
|
1741
|
+
} catch (staleError) {
|
|
1742
|
+
console.error(`[media-usage] Failed to mark ${collection} stale:`, staleError);
|
|
1743
|
+
}
|
|
1696
1744
|
}
|
|
1745
|
+
await this.refreshContentUsageAfterSuccessfulWrite(collection, contentIdsToRefresh);
|
|
1746
|
+
this.runAfterSaveHooks(contentItemToRecord(result.data.item), collection, false, previousContent);
|
|
1697
1747
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
}
|
|
1701
|
-
return result;
|
|
1748
|
+
return result;
|
|
1749
|
+
}, (entryId) => this.handleContentGet(collection, entryId));
|
|
1702
1750
|
}
|
|
1703
1751
|
async handleContentDelete(collection, id) {
|
|
1704
1752
|
if (this.hooks.hasHooks("content:beforeDelete")) {
|
|
@@ -2084,7 +2132,27 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
2084
2132
|
const result = await handleContentGet(this.db, collection, id);
|
|
2085
2133
|
return result.success ? contentItemToRecord(result.data.item) : void 0;
|
|
2086
2134
|
}
|
|
2135
|
+
async drainContentHooks(limit = 5) {
|
|
2136
|
+
if (!this.config.contentStorage || !Object.keys(this.config.contentStorage.rules).length) return;
|
|
2137
|
+
try {
|
|
2138
|
+
await withPrimaryDatabase(() => runWithContext({
|
|
2139
|
+
editMode: false,
|
|
2140
|
+
...getRequestContext(),
|
|
2141
|
+
writePrincipal: void 0,
|
|
2142
|
+
contentWriteRequest: void 0,
|
|
2143
|
+
contentWriteEffects: void 0,
|
|
2144
|
+
prepareWriteChecks: void 0,
|
|
2145
|
+
afterPublicationCommit: void 0
|
|
2146
|
+
}, () => drainContentHookEvents(this.db, (target, event) => this.hooks.deliverContentStorageHook(target, event), { limit })));
|
|
2147
|
+
} catch (error) {
|
|
2148
|
+
console.error("[content-storage] Durable hook delivery could not run", error);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2087
2151
|
runAfterSaveHooks(content, collection, isNew, previousContent) {
|
|
2152
|
+
if (getContentStorage(this.db, collection)) {
|
|
2153
|
+
after(() => this.drainContentHooks(1));
|
|
2154
|
+
return;
|
|
2155
|
+
}
|
|
2088
2156
|
after(async () => {
|
|
2089
2157
|
if (this.hooks.hasHooks("content:afterSave")) try {
|
|
2090
2158
|
await this.hooks.runContentAfterSave(content, collection, isNew, previousContent);
|
|
@@ -2112,6 +2180,10 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
2112
2180
|
});
|
|
2113
2181
|
}
|
|
2114
2182
|
runAfterDeleteHooks(id, collection, permanent, previousContent) {
|
|
2183
|
+
if (getContentStorage(this.db, collection)) {
|
|
2184
|
+
after(() => this.drainContentHooks(1));
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2115
2187
|
if (this.hooks.hasHooks("content:afterDelete")) this.hooks.runContentAfterDelete(id, collection, permanent, previousContent).catch((err) => console.error("Dineway afterDelete hook error:", err));
|
|
2116
2188
|
for (const [pluginKey, plugin] of this.sandboxedPlugins) {
|
|
2117
2189
|
const [pluginId] = pluginKey.split(":");
|
|
@@ -2145,6 +2217,10 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
2145
2217
|
afterCommit.push(() => this.runDeferredContentHook(name, content, collection, previousContent));
|
|
2146
2218
|
return;
|
|
2147
2219
|
}
|
|
2220
|
+
if (getContentStorage(this.db, collection)) {
|
|
2221
|
+
after(() => this.drainContentHooks(1));
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2148
2224
|
after(async () => {
|
|
2149
2225
|
if (this.hooks.hasHooks(name)) try {
|
|
2150
2226
|
switch (name) {
|
|
@@ -2529,6 +2605,7 @@ function getPlugins() {
|
|
|
2529
2605
|
function buildDependencies(config) {
|
|
2530
2606
|
return {
|
|
2531
2607
|
config,
|
|
2608
|
+
contentStorageRuntime,
|
|
2532
2609
|
plugins: getPlugins(),
|
|
2533
2610
|
createDialect,
|
|
2534
2611
|
createCoalescingDialect,
|
|
@@ -2610,6 +2687,14 @@ function addRequestMetricTimings(timings, metrics) {
|
|
|
2610
2687
|
desc: "Last query at"
|
|
2611
2688
|
});
|
|
2612
2689
|
}
|
|
2690
|
+
if (metrics.d1) for (const [name, value] of Object.entries(metrics.d1)) timings.push({
|
|
2691
|
+
name: `d1.${name}`,
|
|
2692
|
+
dur: value
|
|
2693
|
+
});
|
|
2694
|
+
if (metrics.contentStores) for (const [name, value] of Object.entries(metrics.contentStores)) timings.push({
|
|
2695
|
+
name: `content.${name}`,
|
|
2696
|
+
dur: value
|
|
2697
|
+
});
|
|
2613
2698
|
if (metrics.cacheHits + metrics.cacheMisses > 0) {
|
|
2614
2699
|
timings.push({
|
|
2615
2700
|
name: "cache.hit",
|
|
@@ -2646,8 +2731,13 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2646
2731
|
url
|
|
2647
2732
|
});
|
|
2648
2733
|
if (!scoped) return next();
|
|
2649
|
-
const { getDb } = await import("../loader-
|
|
2734
|
+
const { getDb } = await import("../loader-Bq1aW12P.mjs").then((n) => n.i);
|
|
2650
2735
|
const primaryDb = await getDb();
|
|
2736
|
+
const runtimeStorage = locals.dineway?.db ? getContentStorageRuntime(locals.dineway.db) : void 0;
|
|
2737
|
+
if (runtimeStorage) {
|
|
2738
|
+
registerContentStorage(primaryDb, runtimeStorage);
|
|
2739
|
+
registerContentStorage(scoped.db, runtimeStorage);
|
|
2740
|
+
}
|
|
2651
2741
|
let authenticated = !!user || !!locals.user || request.headers.has("authorization");
|
|
2652
2742
|
return runWithContext({
|
|
2653
2743
|
editMode: false,
|
|
@@ -2677,7 +2767,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2677
2767
|
if (!isSetupVerified() && !context.isPrerendered) {
|
|
2678
2768
|
const setupStart = startServerTiming(serverTimings);
|
|
2679
2769
|
try {
|
|
2680
|
-
const { getDb } = await import("../loader-
|
|
2770
|
+
const { getDb } = await import("../loader-Bq1aW12P.mjs").then((n) => n.i);
|
|
2681
2771
|
await (await getDb()).selectFrom("_dineway_migrations").selectAll().limit(1).execute();
|
|
2682
2772
|
markSetupVerified();
|
|
2683
2773
|
} catch (error) {
|
|
@@ -2828,7 +2918,7 @@ const handleRequestWithRuntime = defineMiddleware(async (context, next) => {
|
|
|
2828
2918
|
const onRequest = defineMiddleware((context, next) => runWithPageCache(context.cache?.enabled && !context.locals.__dinewayRequestDb ? context.cache : void 0, () => runWithRuntimeEnvironment(getSecret, async () => {
|
|
2829
2919
|
if (getConfig()?.database?.entrypoint !== "@dineway-ai/cloudflare/db/d1" || context.isPrerendered) return handleRequestWithRuntime(context, next);
|
|
2830
2920
|
try {
|
|
2831
|
-
const { getDb } = await import("../loader-
|
|
2921
|
+
const { getDb } = await import("../loader-Bq1aW12P.mjs").then((n) => n.i);
|
|
2832
2922
|
await assertD1Release(await getDb(), d1ReleaseRevision(getPlugins()));
|
|
2833
2923
|
} catch (error) {
|
|
2834
2924
|
console.error("Dineway D1 release check failed:", error);
|
|
@@ -2848,7 +2938,7 @@ async function runScheduledTasks(options = {}) {
|
|
|
2848
2938
|
const config = getConfig();
|
|
2849
2939
|
if (!config) throw new Error("Dineway is not configured.");
|
|
2850
2940
|
if (config.database?.entrypoint === "@dineway-ai/cloudflare/db/d1") {
|
|
2851
|
-
const { getDb } = await import("../loader-
|
|
2941
|
+
const { getDb } = await import("../loader-Bq1aW12P.mjs").then((n) => n.i);
|
|
2852
2942
|
await assertD1Release(await getDb(), d1ReleaseRevision(getPlugins()));
|
|
2853
2943
|
}
|
|
2854
2944
|
return (await getRuntime(config)).runScheduledTasks(options);
|