dineway 0.2.40 → 0.2.41
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-Clitkhiv.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-CMbsIQ46.mjs} +41 -13
- package/dist/{api-tokens-CNHnKO57.mjs → api-tokens-ciHNTdN2.mjs} +1 -1
- package/dist/{apply-D4rZHDyg.mjs → apply-B5qoX19G.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-BzvBeIJh.mjs} +1 -1
- package/dist/{briefing-COw-WcYz.mjs → briefing-DYiV93rg.mjs} +995 -7
- package/dist/{bundle-bhiszAui.mjs → bundle-DWn5eFKz.mjs} +2 -2
- package/dist/{byline-TYk2kad6.mjs → byline-3qjp1-oa.mjs} +65 -14
- package/dist/{byline-fields-D-b9CWux.d.mts → byline-fields-Bne2v0ti.d.mts} +20 -16
- 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/{bylines-6T9iVC9j.mjs → bylines-BSn9O1Wx.mjs} +3 -3
- package/dist/{bylines-CvTSCAw9.mjs → bylines-CGuJi-zu.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-BigS8BAv.mjs} +302 -45
- package/dist/content-Dr22fzA_.mjs +390 -0
- package/dist/{content-refresh-BilzqcLt.mjs → content-refresh-DJuFIqQ4.mjs} +14 -8
- package/dist/content-storage/index.d.mts +180 -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-DAZCNKWl.mjs} +838 -131
- package/dist/{context-DAs_MZjJ.mjs → context-0806nV9h.mjs} +292 -23
- package/dist/{context-DVTvucNb.mjs → context-CCsI5nTK.mjs} +2 -2
- package/dist/{context-route-helpers-BP-UJ4u8.mjs → context-route-helpers-TP3EqxRQ.mjs} +2 -2
- package/dist/{dashboard-BAjWCGCP.mjs → dashboard-CSrnhBO6.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-49qXmdwv.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-B3O9_VKm.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-B5vOPseK.mjs} +2 -2
- package/dist/{hitl-route-helpers-sdnjpx2k.mjs → hitl-route-helpers-C3icmGdj.mjs} +5 -5
- package/dist/hook-events-BQw73jc7.d.mts +32 -0
- package/dist/{import-C2-v4FCs.mjs → import-CKnKQj3f.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-CN91qtDw.d.mts} +2 -2
- package/dist/{load-DvCVppOF.mjs → load-CiRTddkJ.mjs} +1 -1
- package/dist/{loader-Dp6zLmQm.mjs → loader-CCwWFQSh.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-DA6Q9sDc.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-CyNpBQrX.mjs → menus-CbBi7Ad7.mjs} +2 -2
- package/dist/{menus-w5xwT-f5.mjs → menus-D0c8CeVg.mjs} +7 -7
- package/dist/migration-DJuj7ZwN.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-BPmUjZqI.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-V0W65r3v.mjs} +16 -962
- package/dist/{policy-D2USlibj.mjs → policy-DbceGc4P.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-CKrUov8D.d.mts} +1 -1
- package/dist/{publication-authorization-B_HJSnzR.mjs → publication-authorization-wMR-tEQ_.mjs} +43 -17
- package/dist/{query-xspvw7Ui.mjs → query-DDi367tF.mjs} +14 -14
- package/dist/{query-DLeahg3x.mjs → query-DLnnpEuf.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-zXXZezu-.mjs} +7 -7
- package/dist/{release-Da2UFygt.mjs → release-Cpi0-Bzq.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-C-ScxD9n.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-B_HYO2AE.mjs} +42 -7
- package/dist/revisions-CQ7rMP5d.mjs +55 -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-BA05k0TN.mjs +8 -0
- package/dist/{search-BI9uKr7U.mjs → search-DMrzhfx_.mjs} +4 -98
- package/dist/{secrets-D_pergcD.mjs → secrets-CIYcw9T9.mjs} +4 -4
- package/dist/{sections-BqqYq9RW.mjs → sections-BTrSEhqB.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-Bs_DUxJf.mjs → seo-Cv7ud_m2.mjs} +44 -5
- package/dist/{seo-B-5PsaJO.mjs → seo-DkjtBh-y.mjs} +1 -1
- package/dist/{service-W2xuGLgw.mjs → service-BBJM08uD.mjs} +2 -2
- package/dist/{service-B65aJsN7.mjs → service-CkMuD5AE.mjs} +3 -3
- package/dist/{settings-DsBzKeUQ.mjs → settings-BUONaNnG.mjs} +7 -7
- package/dist/{settings-CyJ2-MKx.mjs → settings-CI-NtWEc.mjs} +2 -2
- package/dist/{setup-complete-t9yamqBb.mjs → setup-complete-DoVbVrHx.mjs} +1 -1
- package/dist/{site-activity-DU0UPDji.mjs → site-activity-hpfJkmxQ.mjs} +1 -1
- package/dist/{site-context-Dic2jHuw.mjs → site-context-BW3GRCJH.mjs} +15 -15
- package/dist/{site-url-Tw6CfBB2.mjs → site-url-CYatfe3q.mjs} +1 -1
- package/dist/{state-jx6Yiwsm.mjs → state-CKkqoA6i.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-DLgjQ_Ew.mjs +205 -0
- package/dist/{taxonomies-BFsUR7kc.mjs → taxonomies-C02-Vuh3.mjs} +3 -3
- package/dist/{taxonomies-lWGNLKgn.mjs → taxonomies-D5wO9zmB.mjs} +7 -7
- package/dist/{taxonomy-DN6i1upz.mjs → taxonomy-BK7JmHlo.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-RFzE_V1M.mjs → types-BI3ULB3A.mjs} +2 -2
- package/dist/{types-D5JfvPvx.d.mts → types-C3jUu4Bc.d.mts} +89 -33
- 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-BlE1LEPb.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-9xHBhL_L.mjs} +3 -3
- package/dist/{wordpress-slugs-ROzITIBK.mjs → wordpress-slugs-yaeD7cxn.mjs} +1 -1
- package/dist/{worker-CKU70ODm.mjs → worker-CC_Rt1pB.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-7IZ_NqWg.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-YzraapbX.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-C3RI5Z5t.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-ljHaxIHX.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-tQhvPLf1.mjs → portable-text-CSbRjM-T.mjs} +0 -0
- /package/dist/{portable-text-BE7nszX6.d.mts → portable-text-HNmwL-7L.d.mts} +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-D36BRaZY.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-BHYE4pox.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-4926MPc0.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as migrateD1, t as MIGRATION_NAMES } from "./runner-
|
|
1
|
+
import { s as migrateD1, t as MIGRATION_NAMES } from "./runner-CuG8o1uW.mjs";
|
|
2
2
|
import { atomicBatch, ensureAtomicBatchSchema, isD1Database } from "./database/batch.mjs";
|
|
3
|
-
import { t as pluginMigrationTableNames } from "./migrations-
|
|
4
|
-
import { n as d1ReleaseRevision } from "./state-
|
|
3
|
+
import { t as pluginMigrationTableNames } from "./migrations-BAjF60cl.mjs";
|
|
4
|
+
import { n as d1ReleaseRevision } from "./state-CKkqoA6i.mjs";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { CompiledQuery, sql } from "kysely";
|
|
7
7
|
|
|
@@ -4981,6 +4981,143 @@ var schema_125_default = [{
|
|
|
4981
4981
|
"sql": "CREATE TABLE \"_dineway_cron_tasks\" (\"id\" text primary key, \"plugin_id\" text not null, \"task_name\" text not null, \"schedule\" text not null, \"is_oneshot\" integer default 0 not null, \"data\" text, \"next_run_at\" text not null, \"last_run_at\" text, \"status\" text default 'idle' not null, \"locked_at\" text, \"enabled\" integer default 1 not null, \"created_at\" text default (datetime('now')), \"lease_token\" text, constraint \"uq_cron_tasks_plugin_task\" unique (\"plugin_id\", \"task_name\"))"
|
|
4982
4982
|
}];
|
|
4983
4983
|
|
|
4984
|
+
//#endregion
|
|
4985
|
+
//#region src/database/d1/schema-126.json
|
|
4986
|
+
var schema_126_default = [
|
|
4987
|
+
{
|
|
4988
|
+
"type": "table",
|
|
4989
|
+
"name": "_dineway_content_changes",
|
|
4990
|
+
"tableName": "_dineway_content_changes",
|
|
4991
|
+
"sql": "CREATE TABLE \"_dineway_content_changes\" (\"sequence\" integer primary key autoincrement, \"collection\" text not null, \"entry_id\" text not null, \"source\" text not null, \"action\" text not null, \"changed_at\" text not null)"
|
|
4992
|
+
},
|
|
4993
|
+
{
|
|
4994
|
+
"type": "table",
|
|
4995
|
+
"name": "_dineway_content_commit_events",
|
|
4996
|
+
"tableName": "_dineway_content_commit_events",
|
|
4997
|
+
"sql": "CREATE TABLE \"_dineway_content_commit_events\" (\"sequence\" integer primary key autoincrement, \"operation_id\" text not null unique, \"collection\" text not null, \"entry_id\" text not null, \"command\" text not null, \"created_at\" text not null, \"delivered_at\" text, \"payload_digest\" text, \"part_count\" integer default 0 not null)"
|
|
4998
|
+
},
|
|
4999
|
+
{
|
|
5000
|
+
"type": "table",
|
|
5001
|
+
"name": "_dineway_content_event_payloads",
|
|
5002
|
+
"tableName": "_dineway_content_event_payloads",
|
|
5003
|
+
"sql": "CREATE TABLE \"_dineway_content_event_payloads\" (\"operation_id\" text not null, \"part\" integer not null, \"data\" text not null, constraint \"pk_content_event_payloads\" primary key (\"operation_id\", \"part\"))"
|
|
5004
|
+
},
|
|
5005
|
+
{
|
|
5006
|
+
"type": "table",
|
|
5007
|
+
"name": "_dineway_content_hook_deliveries",
|
|
5008
|
+
"tableName": "_dineway_content_hook_deliveries",
|
|
5009
|
+
"sql": "CREATE TABLE \"_dineway_content_hook_deliveries\" (\"id\" text primary key, \"operation_id\" text not null, \"hook\" text not null, \"plugin_id\" text not null, \"ordinal\" integer not null, \"timeout_ms\" integer not null, \"attempts\" integer not null, \"next_attempt_at\" text not null, \"lease_owner\" text, \"lease_until\" text, \"created_at\" text not null, \"delivered_at\" text, \"last_error\" text)"
|
|
5010
|
+
},
|
|
5011
|
+
{
|
|
5012
|
+
"type": "table",
|
|
5013
|
+
"name": "_dineway_content_locations",
|
|
5014
|
+
"tableName": "_dineway_content_locations",
|
|
5015
|
+
"sql": "CREATE TABLE \"_dineway_content_locations\" (\"collection\" text not null, \"entry_id\" text not null, \"store\" text not null, \"partition\" text not null, \"routing_version\" text not null, \"version\" text not null, \"digest\" text not null, constraint \"pk_content_locations\" primary key (\"collection\", \"entry_id\"))"
|
|
5016
|
+
},
|
|
5017
|
+
{
|
|
5018
|
+
"type": "table",
|
|
5019
|
+
"name": "_dineway_content_migration_entries",
|
|
5020
|
+
"tableName": "_dineway_content_migration_entries",
|
|
5021
|
+
"sql": "CREATE TABLE \"_dineway_content_migration_entries\" (\"migration_id\" text not null, \"entry_id\" text not null, \"source_digest\" text not null, \"archive_key\" text not null, \"target_location\" text not null, \"state\" text not null, \"updated_at\" text not null, constraint \"pk_content_migration_entries\" primary key (\"migration_id\", \"entry_id\"))"
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
"type": "table",
|
|
5025
|
+
"name": "_dineway_content_migrations",
|
|
5026
|
+
"tableName": "_dineway_content_migrations",
|
|
5027
|
+
"sql": "CREATE TABLE \"_dineway_content_migrations\" (\"id\" text primary key, \"collection\" text not null, \"partition\" text not null, \"source_store\" text not null, \"target_store\" text not null, \"routing_version\" text not null, \"state\" text not null, \"manifest_digest\" text, \"verified_count\" integer, \"created_at\" text not null, \"updated_at\" text not null, \"retain_until\" text not null)"
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
"type": "table",
|
|
5031
|
+
"name": "_dineway_content_operations",
|
|
5032
|
+
"tableName": "_dineway_content_operations",
|
|
5033
|
+
"sql": "CREATE TABLE \"_dineway_content_operations\" (\"id\" text primary key, \"collection\" text not null, \"entry_id\" text not null, \"command\" text not null, \"state\" text not null, \"created_at\" text not null, \"updated_at\" text not null)"
|
|
5034
|
+
},
|
|
5035
|
+
{
|
|
5036
|
+
"type": "table",
|
|
5037
|
+
"name": "_dineway_content_partitions",
|
|
5038
|
+
"tableName": "_dineway_content_partitions",
|
|
5039
|
+
"sql": "CREATE TABLE \"_dineway_content_partitions\" (\"collection\" text not null, \"partition\" text not null, \"store\" text not null, \"target_store\" text not null, \"state\" text not null, \"epoch\" integer not null, \"migration_id\" text, \"updated_at\" text not null, constraint \"pk_content_partitions\" primary key (\"collection\", \"partition\"))"
|
|
5040
|
+
},
|
|
5041
|
+
{
|
|
5042
|
+
"type": "table",
|
|
5043
|
+
"name": "_dineway_content_storage_config",
|
|
5044
|
+
"tableName": "_dineway_content_storage_config",
|
|
5045
|
+
"sql": "CREATE TABLE \"_dineway_content_storage_config\" (\"id\" text primary key, \"version\" text not null, \"digest\" text not null)"
|
|
5046
|
+
},
|
|
5047
|
+
{
|
|
5048
|
+
"type": "table",
|
|
5049
|
+
"name": "_dineway_content_write_intents",
|
|
5050
|
+
"tableName": "_dineway_content_write_intents",
|
|
5051
|
+
"sql": "CREATE TABLE \"_dineway_content_write_intents\" (\"id\" text primary key, \"collection\" text not null, \"entry_id\" text not null, \"principal_id\" text not null, \"request_digest\" text not null, \"seed\" text not null, \"created_at\" text not null)"
|
|
5052
|
+
},
|
|
5053
|
+
{
|
|
5054
|
+
"type": "index",
|
|
5055
|
+
"name": "idx_content_changes_entry_sequence",
|
|
5056
|
+
"tableName": "_dineway_content_changes",
|
|
5057
|
+
"sql": "CREATE INDEX \"idx_content_changes_entry_sequence\" on \"_dineway_content_changes\" (\"collection\", \"entry_id\", \"sequence\")"
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
"type": "index",
|
|
5061
|
+
"name": "idx_content_commit_events_delivery",
|
|
5062
|
+
"tableName": "_dineway_content_commit_events",
|
|
5063
|
+
"sql": "CREATE INDEX \"idx_content_commit_events_delivery\" on \"_dineway_content_commit_events\" (\"delivered_at\", \"created_at\")"
|
|
5064
|
+
},
|
|
5065
|
+
{
|
|
5066
|
+
"type": "index",
|
|
5067
|
+
"name": "idx_content_commit_events_entry_sequence",
|
|
5068
|
+
"tableName": "_dineway_content_commit_events",
|
|
5069
|
+
"sql": "CREATE INDEX \"idx_content_commit_events_entry_sequence\" on \"_dineway_content_commit_events\" (\"collection\", \"entry_id\", \"sequence\")"
|
|
5070
|
+
},
|
|
5071
|
+
{
|
|
5072
|
+
"type": "index",
|
|
5073
|
+
"name": "idx_content_hook_deliveries_due",
|
|
5074
|
+
"tableName": "_dineway_content_hook_deliveries",
|
|
5075
|
+
"sql": "CREATE INDEX \"idx_content_hook_deliveries_due\" on \"_dineway_content_hook_deliveries\" (\"delivered_at\", \"next_attempt_at\")"
|
|
5076
|
+
},
|
|
5077
|
+
{
|
|
5078
|
+
"type": "index",
|
|
5079
|
+
"name": "idx_content_hook_deliveries_operation",
|
|
5080
|
+
"tableName": "_dineway_content_hook_deliveries",
|
|
5081
|
+
"sql": "CREATE INDEX \"idx_content_hook_deliveries_operation\" on \"_dineway_content_hook_deliveries\" (\"operation_id\", \"ordinal\")"
|
|
5082
|
+
},
|
|
5083
|
+
{
|
|
5084
|
+
"type": "index",
|
|
5085
|
+
"name": "idx_content_locations_collection_partition",
|
|
5086
|
+
"tableName": "_dineway_content_locations",
|
|
5087
|
+
"sql": "CREATE INDEX \"idx_content_locations_collection_partition\" on \"_dineway_content_locations\" (\"collection\", \"partition\", \"entry_id\")"
|
|
5088
|
+
},
|
|
5089
|
+
{
|
|
5090
|
+
"type": "index",
|
|
5091
|
+
"name": "idx_content_locations_store_partition",
|
|
5092
|
+
"tableName": "_dineway_content_locations",
|
|
5093
|
+
"sql": "CREATE INDEX \"idx_content_locations_store_partition\" on \"_dineway_content_locations\" (\"store\", \"partition\", \"entry_id\")"
|
|
5094
|
+
},
|
|
5095
|
+
{
|
|
5096
|
+
"type": "index",
|
|
5097
|
+
"name": "idx_content_migration_entries_state",
|
|
5098
|
+
"tableName": "_dineway_content_migration_entries",
|
|
5099
|
+
"sql": "CREATE INDEX \"idx_content_migration_entries_state\" on \"_dineway_content_migration_entries\" (\"migration_id\", \"state\", \"entry_id\")"
|
|
5100
|
+
},
|
|
5101
|
+
{
|
|
5102
|
+
"type": "index",
|
|
5103
|
+
"name": "idx_content_operations_entry",
|
|
5104
|
+
"tableName": "_dineway_content_operations",
|
|
5105
|
+
"sql": "CREATE INDEX \"idx_content_operations_entry\" on \"_dineway_content_operations\" (\"collection\", \"entry_id\", \"created_at\")"
|
|
5106
|
+
},
|
|
5107
|
+
{
|
|
5108
|
+
"type": "index",
|
|
5109
|
+
"name": "idx_content_operations_state",
|
|
5110
|
+
"tableName": "_dineway_content_operations",
|
|
5111
|
+
"sql": "CREATE INDEX \"idx_content_operations_state\" on \"_dineway_content_operations\" (\"state\", \"updated_at\")"
|
|
5112
|
+
},
|
|
5113
|
+
{
|
|
5114
|
+
"type": "index",
|
|
5115
|
+
"name": "idx_content_write_intents_entry",
|
|
5116
|
+
"tableName": "_dineway_content_write_intents",
|
|
5117
|
+
"sql": "CREATE INDEX \"idx_content_write_intents_entry\" on \"_dineway_content_write_intents\" (\"collection\", \"entry_id\")"
|
|
5118
|
+
}
|
|
5119
|
+
];
|
|
5120
|
+
|
|
4984
5121
|
//#endregion
|
|
4985
5122
|
//#region src/database/d1/schema.ts
|
|
4986
5123
|
/** Compile a checked-in empty schema snapshot, creating tables before their indexes and triggers. */
|
|
@@ -5014,28 +5151,41 @@ function d1HistoryChecks(table, names) {
|
|
|
5014
5151
|
const D1_CORE_JOURNAL = "_dineway_d1_core_migrations";
|
|
5015
5152
|
const BASELINE = "001_core_124";
|
|
5016
5153
|
const CRON_LEASES = "002_cron_leases_125";
|
|
5017
|
-
const
|
|
5154
|
+
const CONTENT_STORAGE = "003_content_storage_126";
|
|
5155
|
+
const LEGACY_PREVIOUS = [...migrations, "125_cron_task_leases"];
|
|
5156
|
+
const LEGACY_CURRENT = [...LEGACY_PREVIOUS, "126_content_storage"];
|
|
5018
5157
|
function coreD1Migrations(db) {
|
|
5019
5158
|
if (JSON.stringify(LEGACY_CURRENT) !== JSON.stringify(MIGRATION_NAMES)) throw new Error("This core release needs an explicit D1 migration plan.");
|
|
5020
|
-
return [
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5159
|
+
return [
|
|
5160
|
+
{
|
|
5161
|
+
name: BASELINE,
|
|
5162
|
+
statements: [
|
|
5163
|
+
...objects.map((object) => CompiledQuery.raw(object.sql)),
|
|
5164
|
+
...data.flatMap(({ table, rows }) => rows.map((row) => {
|
|
5165
|
+
const entries = Object.entries(row);
|
|
5166
|
+
return sql`INSERT INTO ${sql.table(table)} (${sql.join(entries.map(([key]) => sql.ref(key)))})
|
|
5027
5167
|
VALUES (${sql.join(entries.map(([, value]) => value))})`.compile(db);
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5168
|
+
})),
|
|
5169
|
+
...migrations.map((name) => sql`INSERT INTO _dineway_migrations (name, timestamp) VALUES (${name}, datetime('now'))`.compile(db))
|
|
5170
|
+
]
|
|
5171
|
+
},
|
|
5172
|
+
{
|
|
5173
|
+
name: CRON_LEASES,
|
|
5174
|
+
statements: [db.schema.alterTable("_dineway_cron_tasks").addColumn("lease_token", "text").compile(), sql`INSERT INTO _dineway_migrations (name, timestamp) VALUES ('125_cron_task_leases', datetime('now'))`.compile(db)]
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
name: CONTENT_STORAGE,
|
|
5178
|
+
statements: [...schema_126_default.map((object) => CompiledQuery.raw(object.sql)), sql`INSERT INTO _dineway_migrations (name, timestamp) VALUES ('126_content_storage', datetime('now'))`.compile(db)]
|
|
5179
|
+
}
|
|
5180
|
+
];
|
|
5035
5181
|
}
|
|
5036
5182
|
function coreD1Schema(current = true, overrides = []) {
|
|
5037
5183
|
const objects$1 = new Map(objects.map((object) => [object.name, object]));
|
|
5038
|
-
for (const object of [
|
|
5184
|
+
for (const object of [
|
|
5185
|
+
...current ? schema_125_default : [],
|
|
5186
|
+
...current === true ? schema_126_default : [],
|
|
5187
|
+
...overrides
|
|
5188
|
+
]) objects$1.set(object.name, object);
|
|
5039
5189
|
return [...objects$1.values()];
|
|
5040
5190
|
}
|
|
5041
5191
|
async function migrateD1Core(db, options = {}) {
|
|
@@ -5049,10 +5199,11 @@ async function migrateD1Core(db, options = {}) {
|
|
|
5049
5199
|
if (imported) {
|
|
5050
5200
|
const names = (await sql`SELECT name FROM _dineway_migrations ORDER BY name`.execute(db)).rows.map((row) => row.name);
|
|
5051
5201
|
const current = JSON.stringify(names) === JSON.stringify(LEGACY_CURRENT);
|
|
5052
|
-
|
|
5202
|
+
const previous = JSON.stringify(names) === JSON.stringify(LEGACY_PREVIOUS);
|
|
5203
|
+
if (!current && !previous && JSON.stringify(names) !== JSON.stringify(migrations)) throw new Error("Upgrade the source database with Node Dineway migrations before importing into D1.");
|
|
5053
5204
|
adoption = {
|
|
5054
|
-
through: current ? CRON_LEASES : BASELINE,
|
|
5055
|
-
checks: [...d1HistoryChecks("_dineway_migrations", names), ...d1SchemaChecks(coreD1Schema(current, options.schemaOverrides))]
|
|
5205
|
+
through: current ? CONTENT_STORAGE : previous ? CRON_LEASES : BASELINE,
|
|
5206
|
+
checks: [...d1HistoryChecks("_dineway_migrations", names), ...d1SchemaChecks(coreD1Schema(current ? true : previous ? 125 : false, options.schemaOverrides))]
|
|
5056
5207
|
};
|
|
5057
5208
|
}
|
|
5058
5209
|
return migrateD1(db, D1_CORE_JOURNAL, coreD1Migrations(db), {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as ContentStorageHookTarget } from "./hook-events-BQw73jc7.mjs";
|
|
1
2
|
import { QueryRecorder } from "./database/instrumentation.mjs";
|
|
2
3
|
import { Kysely, RawBuilder } from "kysely";
|
|
3
4
|
import { RoleLevel } from "@dineway-ai/auth";
|
|
@@ -11,6 +12,26 @@ import { RoleLevel } from "@dineway-ai/auth";
|
|
|
11
12
|
*/
|
|
12
13
|
interface RequestMetrics {
|
|
13
14
|
start: number;
|
|
15
|
+
d1?: {
|
|
16
|
+
roundTrips: number;
|
|
17
|
+
queueMs: number;
|
|
18
|
+
databaseMs: number;
|
|
19
|
+
sqlMs: number;
|
|
20
|
+
statements: number;
|
|
21
|
+
rowsRead: number;
|
|
22
|
+
rowsWritten: number;
|
|
23
|
+
};
|
|
24
|
+
contentStores?: {
|
|
25
|
+
calls: number;
|
|
26
|
+
queueMs: number;
|
|
27
|
+
totalMs: number;
|
|
28
|
+
serviceMs: number;
|
|
29
|
+
databaseMs: number;
|
|
30
|
+
sqlMs: number;
|
|
31
|
+
statements: number;
|
|
32
|
+
rowsRead: number;
|
|
33
|
+
rowsWritten: number;
|
|
34
|
+
};
|
|
14
35
|
dbCount: number;
|
|
15
36
|
dbTotalMs: number;
|
|
16
37
|
dbFirstOffset: number | null;
|
|
@@ -20,6 +41,15 @@ interface RequestMetrics {
|
|
|
20
41
|
}
|
|
21
42
|
declare function createRequestMetrics(start: number): RequestMetrics;
|
|
22
43
|
interface DinewayRequestContext {
|
|
44
|
+
/** Original request identity, retained while hooks normalize a routed content write. */
|
|
45
|
+
contentWriteRequest?: {
|
|
46
|
+
operationId: string;
|
|
47
|
+
digest: string;
|
|
48
|
+
};
|
|
49
|
+
contentWriteEffects?: {
|
|
50
|
+
targets: readonly ContentStorageHookTarget[];
|
|
51
|
+
previousContent?: Record<string, unknown>;
|
|
52
|
+
};
|
|
23
53
|
writePrincipal?: {
|
|
24
54
|
id: string;
|
|
25
55
|
role: RoleLevel;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { n as stableStringify, t as buildStableHash } from "./stable-hash-9RDJgfif.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/site-context/action-hash.ts
|
|
4
|
+
async function buildStableActionHash(value) {
|
|
5
|
+
return buildStableHash(value);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/site-context/review-payload.ts
|
|
10
|
+
var ReviewPayloadBuilder = class {
|
|
11
|
+
constructor(handlers) {
|
|
12
|
+
this.handlers = handlers;
|
|
13
|
+
}
|
|
14
|
+
async buildContentReviewPayload(input) {
|
|
15
|
+
const actionType = input.actionType ?? "content.publish";
|
|
16
|
+
const content = await this.loadContent(input.collection, input.id);
|
|
17
|
+
const compare = await this.loadCompare(input.collection, content.entryId);
|
|
18
|
+
const live = asRecord(compare.live);
|
|
19
|
+
const draft = asRecord(compare.draft) ?? content.data;
|
|
20
|
+
const displayTitle = stringOrNull(draft.title) ?? content.displayTitle;
|
|
21
|
+
const hasChanges = typeof compare.hasChanges === "boolean" ? compare.hasChanges : stableStringify(live) !== stableStringify(draft);
|
|
22
|
+
const actionHash = await buildStableActionHash({
|
|
23
|
+
actionType,
|
|
24
|
+
collection: input.collection,
|
|
25
|
+
entryId: content.entryId,
|
|
26
|
+
liveRevisionId: content.liveRevisionId,
|
|
27
|
+
draftRevisionId: content.draftRevisionId,
|
|
28
|
+
reviewedRev: content.reviewedRev,
|
|
29
|
+
live,
|
|
30
|
+
draft
|
|
31
|
+
});
|
|
32
|
+
const scope = `content:${input.collection}:${content.entryId}`;
|
|
33
|
+
const summary = input.summary ?? `Review ${actionType} for ${input.collection}/${displayTitle ?? content.entryId}`;
|
|
34
|
+
return {
|
|
35
|
+
collection: input.collection,
|
|
36
|
+
entryId: content.entryId,
|
|
37
|
+
scope,
|
|
38
|
+
liveRevisionId: content.liveRevisionId,
|
|
39
|
+
draftRevisionId: content.draftRevisionId,
|
|
40
|
+
reviewedRev: content.reviewedRev,
|
|
41
|
+
actionType,
|
|
42
|
+
actionHash,
|
|
43
|
+
reviewPayload: {
|
|
44
|
+
kind: "content_review",
|
|
45
|
+
actionType,
|
|
46
|
+
summary,
|
|
47
|
+
target: {
|
|
48
|
+
collection: input.collection,
|
|
49
|
+
entryId: content.entryId,
|
|
50
|
+
scope,
|
|
51
|
+
liveRevisionId: content.liveRevisionId,
|
|
52
|
+
draftRevisionId: content.draftRevisionId,
|
|
53
|
+
reviewedRev: content.reviewedRev,
|
|
54
|
+
actionHash
|
|
55
|
+
},
|
|
56
|
+
content: {
|
|
57
|
+
id: content.entryId,
|
|
58
|
+
slug: content.slug,
|
|
59
|
+
status: content.status,
|
|
60
|
+
title: displayTitle,
|
|
61
|
+
updatedAt: content.updatedAt
|
|
62
|
+
},
|
|
63
|
+
diff: {
|
|
64
|
+
hasChanges,
|
|
65
|
+
live,
|
|
66
|
+
draft
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async loadContent(collection, id) {
|
|
72
|
+
const result = await this.handlers.handleContentGet(collection, id);
|
|
73
|
+
if (!result.success) throw new Error(result.error?.message ?? `Content item not found: ${collection}/${id}`);
|
|
74
|
+
const payload = asRecord(result.data);
|
|
75
|
+
const item = asRecord(payload?.item);
|
|
76
|
+
if (!payload || !item) throw new Error("Content get response did not include an item");
|
|
77
|
+
const entryId = stringOrNull(item.id);
|
|
78
|
+
const reviewedRev = stringOrNull(payload._rev);
|
|
79
|
+
if (!entryId) throw new Error("Content item is missing id");
|
|
80
|
+
if (!reviewedRev) throw new Error("Content item is missing _rev for review binding");
|
|
81
|
+
const data = asRecord(item.data) ?? {};
|
|
82
|
+
const title = stringOrNull(data.title) ?? stringOrNull(item.title) ?? stringOrNull(item.slug);
|
|
83
|
+
return {
|
|
84
|
+
entryId,
|
|
85
|
+
reviewedRev,
|
|
86
|
+
liveRevisionId: stringOrNull(item.liveRevisionId),
|
|
87
|
+
draftRevisionId: stringOrNull(item.draftRevisionId),
|
|
88
|
+
slug: stringOrNull(item.slug),
|
|
89
|
+
status: stringOrNull(item.status),
|
|
90
|
+
updatedAt: stringOrNull(item.updatedAt),
|
|
91
|
+
displayTitle: title,
|
|
92
|
+
data
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async loadCompare(collection, id) {
|
|
96
|
+
const result = await this.handlers.handleContentCompare(collection, id);
|
|
97
|
+
if (!result.success) throw new Error(result.error?.message ?? `Failed to compare content: ${collection}/${id}`);
|
|
98
|
+
return asRecord(result.data) ?? {};
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
function asRecord(value) {
|
|
102
|
+
return isRecord(value) ? value : null;
|
|
103
|
+
}
|
|
104
|
+
function isRecord(value) {
|
|
105
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
106
|
+
}
|
|
107
|
+
function stringOrNull(value) {
|
|
108
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { buildStableActionHash as n, ReviewPayloadBuilder as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as RejectedReviewContentError, r as ReviewRequestRepository } from "./review-requests-
|
|
2
|
-
import { r as submitAutomatedReview, t as ReviewSubmissionError } from "./submission-
|
|
1
|
+
import { n as RejectedReviewContentError, r as ReviewRequestRepository } from "./review-requests-DZYM51yI.mjs";
|
|
2
|
+
import { r as submitAutomatedReview, t as ReviewSubmissionError } from "./submission-DLgjQ_Ew.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/review-requests.ts
|
|
5
5
|
async function handleReviewRequestCreate(db, handlers, input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AtomicWriteConflict, atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
|
-
import { i as encodeCursor, r as decodeCursor } from "./types-
|
|
3
|
-
import { t as buildStableHash } from "./stable-hash-
|
|
2
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-BI3ULB3A.mjs";
|
|
3
|
+
import { t as buildStableHash } from "./stable-hash-9RDJgfif.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
import { ulid } from "ulidx";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as resolveActorIdentity } from "./actor-
|
|
2
|
-
import { p as logSiteActivitySafely } from "./activity-events-
|
|
1
|
+
import { i as resolveActorIdentity } from "./actor-D0AW80ld.mjs";
|
|
2
|
+
import { p as logSiteActivitySafely } from "./activity-events-DkHsy7Y0.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/review-route-helpers.ts
|
|
5
5
|
function resolveReviewRouteActor(locals) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { atomicBatch } from "./database/batch.mjs";
|
|
1
2
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
3
|
+
import { d as contentPartitionWritable, r as getContentStorage } from "./runtime-Ch5G-tnG.mjs";
|
|
4
|
+
import { n as readRevisionDataBatch, t as readRevisionData } from "./revisions-CQ7rMP5d.mjs";
|
|
5
|
+
import { t as DinewayValidationError } from "./types-BI3ULB3A.mjs";
|
|
2
6
|
import { sql } from "kysely";
|
|
3
7
|
import { monotonicFactory } from "ulidx";
|
|
4
8
|
|
|
@@ -11,14 +15,19 @@ const monotonic = monotonicFactory();
|
|
|
11
15
|
* Used when collection has `supports: ["revisions"]` enabled.
|
|
12
16
|
*/
|
|
13
17
|
var RevisionRepository = class {
|
|
14
|
-
constructor(db) {
|
|
18
|
+
constructor(db, options = {}) {
|
|
15
19
|
this.db = db;
|
|
20
|
+
this.options = options;
|
|
21
|
+
}
|
|
22
|
+
assertIndexWrite(collection) {
|
|
23
|
+
if (!this.options.prepareIndexWrites && getContentStorage(this.db, collection)) throw new DinewayValidationError("Use prepareContentWrite for partitioned content revisions.");
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* Create a new revision
|
|
19
27
|
*/
|
|
20
|
-
prepareCreateSnapshot(input) {
|
|
21
|
-
|
|
28
|
+
prepareCreateSnapshot(input, options = {}) {
|
|
29
|
+
this.assertIndexWrite(input.collection);
|
|
30
|
+
const id = options.id ?? monotonic();
|
|
22
31
|
return {
|
|
23
32
|
id,
|
|
24
33
|
statement: this.db.insertInto("revisions").values({
|
|
@@ -26,7 +35,8 @@ var RevisionRepository = class {
|
|
|
26
35
|
collection: input.collection,
|
|
27
36
|
entry_id: input.entryId,
|
|
28
37
|
data: input.data,
|
|
29
|
-
author_id: input.authorId ?? null
|
|
38
|
+
author_id: input.authorId ?? null,
|
|
39
|
+
...options.createdAt ? { created_at: options.createdAt } : {}
|
|
30
40
|
}).compile()
|
|
31
41
|
};
|
|
32
42
|
}
|
|
@@ -56,7 +66,16 @@ var RevisionRepository = class {
|
|
|
56
66
|
async findByEntry(collection, entryId, options = {}) {
|
|
57
67
|
let query = this.db.selectFrom("revisions").selectAll().where("collection", "=", collection).where("entry_id", "=", entryId).orderBy("id", "desc");
|
|
58
68
|
if (options.limit) query = query.limit(options.limit);
|
|
59
|
-
|
|
69
|
+
const rows = await query.execute();
|
|
70
|
+
const data = await readRevisionDataBatch(this.db, rows);
|
|
71
|
+
return rows.map((row, index) => ({
|
|
72
|
+
id: row.id,
|
|
73
|
+
collection: row.collection,
|
|
74
|
+
entryId: row.entry_id,
|
|
75
|
+
data: data[index],
|
|
76
|
+
authorId: row.author_id,
|
|
77
|
+
createdAt: row.created_at
|
|
78
|
+
}));
|
|
60
79
|
}
|
|
61
80
|
/**
|
|
62
81
|
* Get the most recent revision for an entry
|
|
@@ -76,6 +95,13 @@ var RevisionRepository = class {
|
|
|
76
95
|
* Delete all revisions for an entry (use when entry is deleted)
|
|
77
96
|
*/
|
|
78
97
|
async deleteByEntry(collection, entryId) {
|
|
98
|
+
if (getContentStorage(this.db, collection)) {
|
|
99
|
+
const [result] = await atomicBatch(this.db, {
|
|
100
|
+
checks: [contentPartitionWritable(collection, entryId)],
|
|
101
|
+
statements: [this.db.deleteFrom("revisions").where("collection", "=", collection).where("entry_id", "=", entryId).compile()]
|
|
102
|
+
});
|
|
103
|
+
return Number(result?.numAffectedRows ?? 0);
|
|
104
|
+
}
|
|
79
105
|
const result = await this.db.deleteFrom("revisions").where("collection", "=", collection).where("entry_id", "=", entryId).executeTakeFirst();
|
|
80
106
|
return Number(result.numDeletedRows ?? 0);
|
|
81
107
|
}
|
|
@@ -95,6 +121,13 @@ var RevisionRepository = class {
|
|
|
95
121
|
AND (content.live_revision_id = revisions.id OR content.draft_revision_id = revisions.id)
|
|
96
122
|
)`);
|
|
97
123
|
}
|
|
124
|
+
if (getContentStorage(this.db, collection)) {
|
|
125
|
+
const [result] = await atomicBatch(this.db, {
|
|
126
|
+
checks: [contentPartitionWritable(collection, entryId)],
|
|
127
|
+
statements: [query.compile()]
|
|
128
|
+
});
|
|
129
|
+
return Number(result?.numAffectedRows ?? 0);
|
|
130
|
+
}
|
|
98
131
|
const result = await query.executeTakeFirst();
|
|
99
132
|
return Number(result.numDeletedRows ?? 0);
|
|
100
133
|
}
|
|
@@ -103,17 +136,19 @@ var RevisionRepository = class {
|
|
|
103
136
|
* Used for autosave to avoid creating many small revisions.
|
|
104
137
|
*/
|
|
105
138
|
async updateData(id, data) {
|
|
139
|
+
const row = await this.db.selectFrom("revisions").select("collection").where("id", "=", id).executeTakeFirst();
|
|
140
|
+
if (row) this.assertIndexWrite(row.collection);
|
|
106
141
|
await this.db.updateTable("revisions").set({ data: JSON.stringify(data) }).where("id", "=", id).execute();
|
|
107
142
|
}
|
|
108
143
|
/**
|
|
109
144
|
* Convert database row to Revision object
|
|
110
145
|
*/
|
|
111
|
-
rowToRevision(row) {
|
|
146
|
+
async rowToRevision(row) {
|
|
112
147
|
return {
|
|
113
148
|
id: row.id,
|
|
114
149
|
collection: row.collection,
|
|
115
150
|
entryId: row.entry_id,
|
|
116
|
-
data:
|
|
151
|
+
data: await readRevisionData(this.db, row),
|
|
117
152
|
authorId: row.author_id,
|
|
118
153
|
createdAt: row.created_at
|
|
119
154
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { o as ContentStorageError } from "./config-6R0bchVE.mjs";
|
|
2
|
+
import { r as getContentStorage } from "./runtime-Ch5G-tnG.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/content-storage/revisions.ts
|
|
6
|
+
const locationSchema = z.object({
|
|
7
|
+
collection: z.string(),
|
|
8
|
+
entryId: z.string(),
|
|
9
|
+
store: z.string(),
|
|
10
|
+
partition: z.string(),
|
|
11
|
+
routingVersion: z.string(),
|
|
12
|
+
version: z.string(),
|
|
13
|
+
digest: z.string()
|
|
14
|
+
}).strict();
|
|
15
|
+
function storedRevisionIndex({ collection, entryId, store, partition, routingVersion, version, digest }) {
|
|
16
|
+
return JSON.stringify({ __dineway_content_storage__: locationSchema.parse({
|
|
17
|
+
collection,
|
|
18
|
+
entryId,
|
|
19
|
+
store,
|
|
20
|
+
partition,
|
|
21
|
+
routingVersion,
|
|
22
|
+
version,
|
|
23
|
+
digest
|
|
24
|
+
}) });
|
|
25
|
+
}
|
|
26
|
+
async function readRevisionData(db, row) {
|
|
27
|
+
return (await readRevisionDataBatch(db, [row]))[0];
|
|
28
|
+
}
|
|
29
|
+
/** Keep revision history and comparisons bounded by store batches, not revision count. */
|
|
30
|
+
async function readRevisionDataBatch(db, rows) {
|
|
31
|
+
const result = rows.map((row) => z.record(z.string(), z.unknown()).parse(JSON.parse(row.data)));
|
|
32
|
+
const groups = /* @__PURE__ */ new Map();
|
|
33
|
+
for (const [index, row] of rows.entries()) {
|
|
34
|
+
const data = result[index];
|
|
35
|
+
if (!Object.hasOwn(data, "__dineway_content_storage__")) continue;
|
|
36
|
+
const location = locationSchema.parse(data.__dineway_content_storage__);
|
|
37
|
+
if (location.collection !== row.collection || location.entryId !== row.entry_id) throw new ContentStorageError("CONFLICT", "The revision location belongs to another content entry.");
|
|
38
|
+
const group = groups.get(row.collection) ?? [];
|
|
39
|
+
group.push({
|
|
40
|
+
index,
|
|
41
|
+
location
|
|
42
|
+
});
|
|
43
|
+
groups.set(row.collection, group);
|
|
44
|
+
}
|
|
45
|
+
for (const [collection, group] of groups) {
|
|
46
|
+
const storage = getContentStorage(db, collection);
|
|
47
|
+
if (!storage) throw new ContentStorageError("UNAVAILABLE", "The revision's content store is not configured.");
|
|
48
|
+
const values = await storage.coordinator.readLocations(group.map((item) => item.location));
|
|
49
|
+
for (const [offset, item] of group.entries()) result[item.index] = values[offset].data;
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { readRevisionDataBatch as n, storedRevisionIndex as r, readRevisionData as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AtomicWriteConflict, atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
|
-
import { t as SiteActivityRepository } from "./site-activity-
|
|
3
|
-
import { r as ReviewRequestRepository } from "./review-requests-
|
|
2
|
+
import { t as SiteActivityRepository } from "./site-activity-hpfJkmxQ.mjs";
|
|
3
|
+
import { r as ReviewRequestRepository } from "./review-requests-DZYM51yI.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
|
|
6
6
|
//#region src/review-automation/revocation.ts
|