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,8 +1,8 @@
|
|
|
1
1
|
import { after } from "./after.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as processCachedAsync, t as createProcessCache } from "./process-cache-
|
|
5
|
-
import { t as
|
|
2
|
+
import { t as readRuntimeEnv } from "./runtime-env-DpYGy4pT.mjs";
|
|
3
|
+
import { i as encodeBase64url, n as decodeBase64url } from "./base64-qvSs0Gxy.mjs";
|
|
4
|
+
import { r as processCachedAsync, t as createProcessCache } from "./process-cache-CMy5M80h.mjs";
|
|
5
|
+
import { t as OptionsRepository } from "./options-yFkLUuTw.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/config/secrets.ts
|
|
8
8
|
const ENCRYPTION_KEY_PREFIX = "dineway_enc_v1_";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as encodeCursor, r as decodeCursor } from "./types-
|
|
2
|
-
import { r as getDb } from "./loader-
|
|
1
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-BI3ULB3A.mjs";
|
|
2
|
+
import { r as getDb } from "./loader-CCwWFQSh.mjs";
|
|
3
3
|
import { ulid } from "ulidx";
|
|
4
4
|
|
|
5
5
|
//#region src/sections/index.ts
|
package/dist/seed/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, h as SeedSection, i as defaultSeed, l as SeedContentEntry, m as SeedRedirect, n as loadSeed, o as SeedApplyOptions, p as SeedMenuItem, r as loadUserSeed, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "../validate-
|
|
1
|
+
import "../types-Dpv_MvwZ.mjs";
|
|
2
|
+
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, h as SeedSection, i as defaultSeed, l as SeedContentEntry, m as SeedRedirect, n as loadSeed, o as SeedApplyOptions, p as SeedMenuItem, r as loadUserSeed, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "../validate-DUscf6VG.mjs";
|
|
3
3
|
export { type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedRedirect, type SeedSection, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type ValidationResult, applySeed, defaultSeed, loadSeed, loadUserSeed, validateSeed };
|
package/dist/seed/index.mjs
CHANGED
|
@@ -1,30 +1,42 @@
|
|
|
1
1
|
import "../d1-binding-DrLMBUxu.mjs";
|
|
2
2
|
import "../dialect-helpers-C6xtO-Ui.mjs";
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
3
|
+
import "../config-6R0bchVE.mjs";
|
|
4
|
+
import "../runtime-Ch5G-tnG.mjs";
|
|
5
|
+
import "../revisions-CQ7rMP5d.mjs";
|
|
6
|
+
import "../runtime-env-DpYGy4pT.mjs";
|
|
7
|
+
import "../base64-qvSs0Gxy.mjs";
|
|
8
|
+
import "../types-BI3ULB3A.mjs";
|
|
9
|
+
import "../loader-CCwWFQSh.mjs";
|
|
10
|
+
import "../actor-D0AW80ld.mjs";
|
|
11
|
+
import "../atomic-authority-Bf5QZboB.mjs";
|
|
12
|
+
import "../content-BigS8BAv.mjs";
|
|
13
|
+
import "../request-cache-CizvDoxV.mjs";
|
|
14
|
+
import "../byline-registry-Caj0_gbU.mjs";
|
|
15
|
+
import "../field-defs-cache-dn5Tw79A.mjs";
|
|
16
|
+
import "../object-cache-DyI1SOBK.mjs";
|
|
17
|
+
import "../byline-3qjp1-oa.mjs";
|
|
18
|
+
import "../owned-metadata-BPmUjZqI.mjs";
|
|
19
|
+
import "../revision-B_HYO2AE.mjs";
|
|
20
|
+
import "../media-BjH5OD-A.mjs";
|
|
21
|
+
import "../user-Bl2_8rhJ.mjs";
|
|
22
|
+
import "../terms-EskuqbKE.mjs";
|
|
23
|
+
import "../taxonomy-BK7JmHlo.mjs";
|
|
24
|
+
import "../options-yFkLUuTw.mjs";
|
|
25
|
+
import "../redirect-CJ-FAbNK.mjs";
|
|
26
|
+
import "../content-write-DAZCNKWl.mjs";
|
|
27
|
+
import "../text-extraction-CdqMGYQK.mjs";
|
|
28
|
+
import "../version-store-BXv2D0de.mjs";
|
|
29
|
+
import "../write-intent-DuHVqks9.mjs";
|
|
30
|
+
import "../seo-Cv7ud_m2.mjs";
|
|
31
|
+
import "../content-refresh-DJuFIqQ4.mjs";
|
|
32
|
+
import "../ssrf-DcD8vn3E.mjs";
|
|
33
|
+
import "../fts-manager-Zu5ITic0.mjs";
|
|
34
|
+
import "../public-discovery-BnqYofSK.mjs";
|
|
35
|
+
import "../registry-zXXZezu-.mjs";
|
|
36
|
+
import "../settings-BUONaNnG.mjs";
|
|
37
|
+
import { t as validateSeed } from "../validate-C-yk7mmX.mjs";
|
|
38
|
+
import { t as applySeed } from "../apply-B5qoX19G.mjs";
|
|
39
|
+
import { t as defaultSeed } from "../default-C2azCFSB.mjs";
|
|
40
|
+
import { n as loadUserSeed, t as loadSeed } from "../load-CiRTddkJ.mjs";
|
|
29
41
|
|
|
30
42
|
export { applySeed, defaultSeed, loadSeed, loadUserSeed, validateSeed };
|
package/dist/seo/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ContentSeo } from "../types-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { a as PublicContentEntry, i as resolveCanonicalUrl, n as resolveContentUrl, o as PublicContentOptions, r as satisfiesPublicDiscoveryRules, s as listPublicContent, t as ResolveContentUrlInput } from "../public-url-
|
|
1
|
+
import { a as ContentSeo } from "../types-ex-UrNlz.mjs";
|
|
2
|
+
import "../types-Dpv_MvwZ.mjs";
|
|
3
|
+
import { a as PublicContentEntry, i as resolveCanonicalUrl, n as resolveContentUrl, o as PublicContentOptions, r as satisfiesPublicDiscoveryRules, s as listPublicContent, t as ResolveContentUrlInput } from "../public-url-CEC1vj02.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/seo/index.d.ts
|
|
6
6
|
/**
|
package/dist/seo/index.mjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import "../d1-binding-DrLMBUxu.mjs";
|
|
2
2
|
import "../dialect-helpers-C6xtO-Ui.mjs";
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
3
|
+
import "../config-6R0bchVE.mjs";
|
|
4
|
+
import "../runtime-Ch5G-tnG.mjs";
|
|
5
|
+
import "../revisions-CQ7rMP5d.mjs";
|
|
6
|
+
import "../base64-qvSs0Gxy.mjs";
|
|
7
|
+
import "../types-BI3ULB3A.mjs";
|
|
8
|
+
import "../content-refresh-DJuFIqQ4.mjs";
|
|
9
|
+
import "../fts-manager-Zu5ITic0.mjs";
|
|
10
|
+
import { i as satisfiesPublicDiscoveryRules } from "../public-discovery-BnqYofSK.mjs";
|
|
11
|
+
import "../registry-zXXZezu-.mjs";
|
|
12
|
+
import { n as resolveCanonicalUrl, t as listPublicContent } from "../discovery-49qXmdwv.mjs";
|
|
13
|
+
import { t as resolveContentUrl } from "../public-url-BHjYWuaN.mjs";
|
|
14
|
+
import { t as buildSeoImageUrl } from "../media-url-D5E1a47B.mjs";
|
|
12
15
|
|
|
13
16
|
//#region src/seo/index.ts
|
|
14
17
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { atomicBatch } from "./database/batch.mjs";
|
|
2
|
+
import { r as getContentStorage } from "./runtime-Ch5G-tnG.mjs";
|
|
3
|
+
import { o as invalidateCollectionCache } from "./object-cache-DyI1SOBK.mjs";
|
|
4
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-Bb56aCtB.mjs";
|
|
3
5
|
import { sql } from "kysely";
|
|
4
6
|
|
|
5
7
|
//#region src/database/repositories/seo.ts
|
|
@@ -26,8 +28,9 @@ function hasAnyField(input) {
|
|
|
26
28
|
* responsible for checking the flag before reading/writing.
|
|
27
29
|
*/
|
|
28
30
|
var SeoRepository = class {
|
|
29
|
-
constructor(db) {
|
|
31
|
+
constructor(db, options = {}) {
|
|
30
32
|
this.db = db;
|
|
33
|
+
this.options = options;
|
|
31
34
|
}
|
|
32
35
|
/**
|
|
33
36
|
* Check whether a collection has SEO enabled (`has_seo = 1`).
|
|
@@ -79,9 +82,9 @@ var SeoRepository = class {
|
|
|
79
82
|
* Upsert SEO data for a content item using INSERT ON CONFLICT DO UPDATE
|
|
80
83
|
* for atomicity. Skips no-op writes when input has no fields set.
|
|
81
84
|
*/
|
|
82
|
-
prepareUpsert(collection, contentId, input) {
|
|
85
|
+
prepareUpsert(collection, contentId, input, now = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
86
|
+
if (getContentStorage(this.db, collection) && !this.options.prepareIndexWrites) throw new Error("Prepare routed content with its SEO metadata instead of writing a primary index separately.");
|
|
83
87
|
if (!hasAnyField(input)) return null;
|
|
84
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
85
88
|
return sql`
|
|
86
89
|
INSERT INTO _dineway_seo (
|
|
87
90
|
collection, content_id,
|
|
@@ -104,6 +107,17 @@ var SeoRepository = class {
|
|
|
104
107
|
`.compile(this.db);
|
|
105
108
|
}
|
|
106
109
|
async upsert(collection, contentId, input) {
|
|
110
|
+
if (getContentStorage(this.db, collection)) {
|
|
111
|
+
const { prepareContentWrite } = await import("./content-write-DAZCNKWl.mjs").then((n) => n.t);
|
|
112
|
+
const write = await prepareContentWrite(this.db, collection, {
|
|
113
|
+
id: contentId,
|
|
114
|
+
seo: input,
|
|
115
|
+
stageDraft: false
|
|
116
|
+
});
|
|
117
|
+
await atomicBatch(this.db, write.batch);
|
|
118
|
+
write.afterCommit();
|
|
119
|
+
return this.get(collection, contentId);
|
|
120
|
+
}
|
|
107
121
|
const statement = this.prepareUpsert(collection, contentId, input);
|
|
108
122
|
if (statement) {
|
|
109
123
|
await this.db.executeQuery(statement);
|
|
@@ -115,6 +129,10 @@ var SeoRepository = class {
|
|
|
115
129
|
* Delete SEO data for a content item.
|
|
116
130
|
*/
|
|
117
131
|
async delete(collection, contentId) {
|
|
132
|
+
if (getContentStorage(this.db, collection) && (await sql`SELECT id FROM ${sql.table(`ec_${collection}`)} WHERE id=${contentId}`.execute(this.db)).rows.length) {
|
|
133
|
+
await this.upsert(collection, contentId, SEO_DEFAULTS);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
118
136
|
await this.db.deleteFrom("_dineway_seo").where("collection", "=", collection).where("content_id", "=", contentId).execute();
|
|
119
137
|
invalidateCollectionCache(collection);
|
|
120
138
|
}
|
|
@@ -123,6 +141,7 @@ var SeoRepository = class {
|
|
|
123
141
|
* Used by duplicate. Clears canonical (it pointed to the original).
|
|
124
142
|
*/
|
|
125
143
|
prepareCopyForDuplicate(collection, sourceId, targetId) {
|
|
144
|
+
if (getContentStorage(this.db, collection)) throw new Error("Prepare a routed duplicate with its SEO metadata instead of copying a primary index separately.");
|
|
126
145
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
127
146
|
return sql`INSERT INTO _dineway_seo (collection, content_id, seo_title, seo_description, seo_image, seo_canonical, seo_no_index, created_at, updated_at)
|
|
128
147
|
SELECT collection, ${targetId}, seo_title, seo_description, seo_image, NULL, seo_no_index, ${now}, ${now}
|
|
@@ -133,6 +152,26 @@ var SeoRepository = class {
|
|
|
133
152
|
seo_canonical = NULL, seo_no_index = excluded.seo_no_index, updated_at = excluded.updated_at`.compile(this.db);
|
|
134
153
|
}
|
|
135
154
|
async copyForDuplicate(collection, sourceId, targetId) {
|
|
155
|
+
if (getContentStorage(this.db, collection)) {
|
|
156
|
+
const { snapshotOwnedContentMetadata } = await import("./owned-metadata-BPmUjZqI.mjs").then((n) => n.n);
|
|
157
|
+
const { prepareContentWrite } = await import("./content-write-DAZCNKWl.mjs").then((n) => n.t);
|
|
158
|
+
const source = await snapshotOwnedContentMetadata(this.db, collection, sourceId);
|
|
159
|
+
const seo = await this.get(collection, sourceId);
|
|
160
|
+
const write = await prepareContentWrite(this.db, collection, {
|
|
161
|
+
id: targetId,
|
|
162
|
+
seo: {
|
|
163
|
+
...seo,
|
|
164
|
+
canonical: null
|
|
165
|
+
},
|
|
166
|
+
stageDraft: false
|
|
167
|
+
});
|
|
168
|
+
await atomicBatch(this.db, {
|
|
169
|
+
checks: [...write.batch.checks ?? [], ...source.checks],
|
|
170
|
+
statements: write.batch.statements
|
|
171
|
+
});
|
|
172
|
+
write.afterCommit();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
136
175
|
await this.db.executeQuery(this.prepareCopyForDuplicate(collection, sourceId, targetId));
|
|
137
176
|
invalidateCollectionCache(collection);
|
|
138
177
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as DinewayToolsService, r as integrationResponse } from "./service-
|
|
2
|
-
import { r as getSiteIntegrationCatalog, t as SiteIntegrationRuns } from "./runs-
|
|
1
|
+
import { n as DinewayToolsService, r as integrationResponse } from "./service-DeX1PRNt.mjs";
|
|
2
|
+
import { r as getSiteIntegrationCatalog, t as SiteIntegrationRuns } from "./runs-BjgLfqCn.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/integrations/service.ts
|
|
5
5
|
function createSiteIntegrationService(options, actorId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
2
|
-
import { s as invalidateCommentObjectCache } from "./object-cache-
|
|
3
|
-
import { t as CommentRepository } from "./comment-
|
|
4
|
-
import { t as escapeHtml } from "./escape-
|
|
2
|
+
import { s as invalidateCommentObjectCache } from "./object-cache-DyI1SOBK.mjs";
|
|
3
|
+
import { t as CommentRepository } from "./comment-BWDG1nQm.mjs";
|
|
4
|
+
import { t as escapeHtml } from "./escape-4_NNa6GR.mjs";
|
|
5
5
|
import { sql } from "kysely";
|
|
6
6
|
|
|
7
7
|
//#region src/comments/notifications.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getRequestContext } from "./request-context.mjs";
|
|
2
2
|
import { after } from "./after.mjs";
|
|
3
|
-
import { r as getDb } from "./loader-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { i as resolvePublicMediaUrl } from "./url-
|
|
3
|
+
import { r as getDb } from "./loader-CCwWFQSh.mjs";
|
|
4
|
+
import { n as peekRequestCache, r as requestCached } from "./request-cache-CizvDoxV.mjs";
|
|
5
|
+
import { n as invalidateProcessCache, r as processCachedAsync, t as createProcessCache } from "./process-cache-CMy5M80h.mjs";
|
|
6
|
+
import { l as invalidateObjectCache, n as cachedQuery, t as CacheNamespace } from "./object-cache-DyI1SOBK.mjs";
|
|
7
|
+
import { t as MediaRepository } from "./media-BjH5OD-A.mjs";
|
|
8
|
+
import { t as OptionsRepository } from "./options-yFkLUuTw.mjs";
|
|
9
|
+
import { i as resolvePublicMediaUrl } from "./url-dn4mFfCI.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/settings/index.ts
|
|
12
12
|
/** Prefix for site settings in the options table */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
2
|
-
import { a as getSiteSettingsWithDb, s as setSiteSettings } from "./settings-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
|
+
import { a as getSiteSettingsWithDb, s as setSiteSettings } from "./settings-BUONaNnG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/settings.ts
|
|
5
5
|
var settings_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
3
|
-
import { i as encodeCursor, r as decodeCursor } from "./types-
|
|
4
|
-
import { t as ContentRepository } from "./content-
|
|
5
|
-
import { t as SiteActivityRepository } from "./site-activity-
|
|
6
|
-
import { r as ReviewRequestRepository } from "./review-requests-
|
|
7
|
-
import { o as HitlRequestRepository } from "./publication-authorization-
|
|
8
|
-
import {
|
|
9
|
-
import { n as buildStableActionHash, t as ReviewPayloadBuilder } from "./review-payload-
|
|
10
|
-
import {
|
|
11
|
-
import { t as FTSManager } from "./fts-manager-
|
|
12
|
-
import { n as SchemaRegistry } from "./registry-
|
|
13
|
-
import { a as getSiteSettingsWithDb } from "./settings-
|
|
14
|
-
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-
|
|
15
|
-
import { m as normalizeUrl } from "./utils-
|
|
16
|
-
import { t as sanitizeWordPressImportSlug } from "./wordpress-slugs-
|
|
17
|
-
import {
|
|
3
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-BI3ULB3A.mjs";
|
|
4
|
+
import { t as ContentRepository } from "./content-BigS8BAv.mjs";
|
|
5
|
+
import { t as SiteActivityRepository } from "./site-activity-hpfJkmxQ.mjs";
|
|
6
|
+
import { r as ReviewRequestRepository } from "./review-requests-DZYM51yI.mjs";
|
|
7
|
+
import { o as HitlRequestRepository } from "./publication-authorization-wMR-tEQ_.mjs";
|
|
8
|
+
import { l as isPattern } from "./cache-DsEbwFVE.mjs";
|
|
9
|
+
import { n as buildStableActionHash, t as ReviewPayloadBuilder } from "./review-payload-Bhi52CbI.mjs";
|
|
10
|
+
import { i as parseSiteBriefingScope, l as handlePluginList, m as ContextRepository } from "./briefing-DYiV93rg.mjs";
|
|
11
|
+
import { t as FTSManager } from "./fts-manager-Zu5ITic0.mjs";
|
|
12
|
+
import { n as SchemaRegistry } from "./registry-zXXZezu-.mjs";
|
|
13
|
+
import { a as getSiteSettingsWithDb } from "./settings-BUONaNnG.mjs";
|
|
14
|
+
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-CPNiI2EL.mjs";
|
|
15
|
+
import { m as normalizeUrl } from "./utils-CklSLz9F.mjs";
|
|
16
|
+
import { t as sanitizeWordPressImportSlug } from "./wordpress-slugs-yaeD7cxn.mjs";
|
|
17
|
+
import { a as searchCollection } from "./search-DMrzhfx_.mjs";
|
|
18
18
|
import { sql } from "kysely";
|
|
19
19
|
import { ulid } from "ulidx";
|
|
20
20
|
import { Role } from "@dineway-ai/auth";
|
package/dist/storage/local.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ListOptions, d as Storage, l as SignedUploadOptions, o as ListResult, p as UploadResult, r as DownloadResult, s as LocalStorageConfig, u as SignedUploadUrl } from "../types-
|
|
1
|
+
import { a as ListOptions, d as Storage, l as SignedUploadOptions, o as ListResult, p as UploadResult, r as DownloadResult, s as LocalStorageConfig, u as SignedUploadUrl } from "../types-C0heD9oI.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/storage/local.d.ts
|
|
4
4
|
/**
|
package/dist/storage/local.mjs
CHANGED
package/dist/storage/s3.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ListOptions, c as S3StorageConfig, d as Storage, l as SignedUploadOptions, o as ListResult, p as UploadResult, r as DownloadResult, u as SignedUploadUrl } from "../types-
|
|
1
|
+
import { a as ListOptions, c as S3StorageConfig, d as Storage, l as SignedUploadOptions, o as ListResult, p as UploadResult, r as DownloadResult, u as SignedUploadUrl } from "../types-C0heD9oI.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/storage/s3.d.ts
|
|
4
4
|
/**
|
package/dist/storage/s3.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as readRuntimeEnv } from "../runtime-env-
|
|
2
|
-
import { t as DinewayStorageError } from "../types-
|
|
1
|
+
import { t as readRuntimeEnv } from "../runtime-env-DpYGy4pT.mjs";
|
|
2
|
+
import { t as DinewayStorageError } from "../types-Nm0cMxEh.mjs";
|
|
3
3
|
import { DeleteObjectCommand, GetObjectCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
4
4
|
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as parseEncryptionKeys, t as DinewaySecretsError } from "./secrets-
|
|
2
|
+
import { t as readRuntimeEnv } from "./runtime-env-DpYGy4pT.mjs";
|
|
3
|
+
import { i as encodeBase64url, n as decodeBase64url } from "./base64-qvSs0Gxy.mjs";
|
|
4
|
+
import { i as parseEncryptionKeys, t as DinewaySecretsError } from "./secrets-CIYcw9T9.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/database/repositories/integration-credentials.ts
|
|
7
7
|
var IntegrationCredentialRepository = class {
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { AtomicWriteConflict, atomicBatch, prepareAtomicChecks, rowUnchanged } from "./database/batch.mjs";
|
|
2
|
+
import { n as contentDigest } from "./config-6R0bchVE.mjs";
|
|
3
|
+
import { r as getContentStorage } from "./runtime-Ch5G-tnG.mjs";
|
|
4
|
+
import { t as ContentRepository } from "./content-BigS8BAv.mjs";
|
|
5
|
+
import { t as buildStableHash } from "./stable-hash-9RDJgfif.mjs";
|
|
6
|
+
import { i as isSupersededReview, r as ReviewRequestRepository, t as REVIEW_SUPERSESSION_ACTOR } from "./review-requests-DZYM51yI.mjs";
|
|
7
|
+
import { D as encodeRev, r as preparedContentReview } from "./content-write-DAZCNKWl.mjs";
|
|
8
|
+
import { t as ReviewPayloadBuilder } from "./review-payload-Bhi52CbI.mjs";
|
|
9
|
+
import { i as reviewDraft } from "./evidence-B3O9_VKm.mjs";
|
|
10
|
+
import { sql } from "kysely";
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
|
|
13
|
+
//#region src/review-automation/submission.ts
|
|
14
|
+
var ReviewSubmissionError = class extends Error {
|
|
15
|
+
constructor(message, code = "REVIEW_SUBMISSION_INVALID") {
|
|
16
|
+
super(message);
|
|
17
|
+
this.code = code;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
async function prepareAutomatedReview(db, handlers, input, options = {}) {
|
|
21
|
+
const projected = options.draft ? preparedContentReview(options.draft) : null;
|
|
22
|
+
if (projected && (projected.item.id !== input.id || projected.item.type !== input.collection)) throw new ReviewSubmissionError("Prepared draft does not match the review target.");
|
|
23
|
+
const contentRepo = new ContentRepository(db);
|
|
24
|
+
const entry = projected ? projected.item : await contentRepo.findByIdOrSlug(input.collection, input.id);
|
|
25
|
+
const snapshot = projected ? {
|
|
26
|
+
item: projected.item,
|
|
27
|
+
check: sql`true`
|
|
28
|
+
} : entry ? await contentRepo.snapshot(input.collection, entry.id) : null;
|
|
29
|
+
if (!snapshot) throw new ReviewSubmissionError("The submitted content could not be read.");
|
|
30
|
+
const revisionIds = projected ? [] : [snapshot.item.liveRevisionId, snapshot.item.draftRevisionId].filter((id) => id !== null);
|
|
31
|
+
const revisions = revisionIds.length ? await db.selectFrom("revisions").selectAll().where("id", "in", revisionIds).execute() : [];
|
|
32
|
+
const built = await new ReviewPayloadBuilder(projected ? {
|
|
33
|
+
handleContentGet: async () => ({
|
|
34
|
+
success: true,
|
|
35
|
+
data: {
|
|
36
|
+
item: projected.item,
|
|
37
|
+
_rev: encodeRev(projected.item)
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
handleContentCompare: async () => ({
|
|
41
|
+
success: true,
|
|
42
|
+
data: {
|
|
43
|
+
live: projected.live,
|
|
44
|
+
draft: projected.draft,
|
|
45
|
+
hasChanges: projected.item.draftRevisionId !== null && projected.item.draftRevisionId !== projected.item.liveRevisionId
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
} : handlers).buildContentReviewPayload(input);
|
|
49
|
+
if (input.expectedRev !== void 0 && input.expectedRev !== built.reviewedRev) throw new ReviewSubmissionError("Reload the latest draft before submitting it.", "REVIEW_REVISION_CHANGED");
|
|
50
|
+
const contentHash = await buildStableHash(reviewDraft(built));
|
|
51
|
+
const targetKey = await buildStableHash({
|
|
52
|
+
collection: built.collection,
|
|
53
|
+
id: built.entryId,
|
|
54
|
+
actionHash: built.actionHash
|
|
55
|
+
});
|
|
56
|
+
if (built.reviewedRev !== encodeRev(snapshot.item) || built.draftRevisionId !== snapshot.item.draftRevisionId || built.liveRevisionId !== snapshot.item.liveRevisionId) throw new ReviewSubmissionError("The submitted content changed. Review the latest draft.");
|
|
57
|
+
const scheduledAt = snapshot.item.scheduledAt;
|
|
58
|
+
const checks = [...options.draft?.batch.checks ?? [snapshot.check], ...revisions.map((revision) => rowUnchanged("revisions", revision))];
|
|
59
|
+
const projectedGuard = [];
|
|
60
|
+
if (projected) {
|
|
61
|
+
const contentFuture = rowUnchanged(`ec_${input.collection}`, {
|
|
62
|
+
id: projected.item.id,
|
|
63
|
+
version: projected.item.version,
|
|
64
|
+
updated_at: projected.item.updatedAt,
|
|
65
|
+
live_revision_id: projected.item.liveRevisionId,
|
|
66
|
+
draft_revision_id: projected.item.draftRevisionId,
|
|
67
|
+
status: projected.item.status,
|
|
68
|
+
scheduled_at: projected.item.scheduledAt
|
|
69
|
+
});
|
|
70
|
+
const storedDraft = projected.draft && getContentStorage(db, input.collection) ? sql`json_extract(data,'$.__dineway_content_storage__.collection')=${input.collection} AND json_extract(data,'$.__dineway_content_storage__.entryId')=${input.id} AND json_extract(data,'$.__dineway_content_storage__.digest')=${await contentDigest(projected.draft)} AND EXISTS (SELECT 1 FROM _dineway_content_locations l WHERE l.collection=${input.collection} AND l.entry_id=${input.id} AND l.store=json_extract(revisions.data,'$.__dineway_content_storage__.store'))` : sql`false`;
|
|
71
|
+
const future = sql`${contentFuture} AND ${projected.item.draftRevisionId && projected.draft ? sql`EXISTS(SELECT 1 FROM revisions WHERE id=${projected.item.draftRevisionId} AND collection=${input.collection} AND entry_id=${input.id} AND (json(data)=json(${JSON.stringify(projected.draft)}) OR (${storedDraft})))` : sql`true`}`;
|
|
72
|
+
projectedGuard.push(...prepareAtomicChecks(db, [future]));
|
|
73
|
+
}
|
|
74
|
+
const reviews = new ReviewRequestRepository(db);
|
|
75
|
+
const prepareSupersession = async () => {
|
|
76
|
+
const statements = [];
|
|
77
|
+
if (!input.supersedePending) return {
|
|
78
|
+
checks: [],
|
|
79
|
+
statements
|
|
80
|
+
};
|
|
81
|
+
const query = db.selectFrom("_dineway_review_requests").where("collection", "=", built.collection).where("entry_id", "=", built.entryId).where("action_type", "=", built.actionType).where("requested_by_actor_type", "=", input.actor.actorType).where("requested_by_actor_id", "=", input.actor.actorId).where("status", "=", "pending").where("revoked_at", "is", null).where((eb) => eb.or([eb("reviewed_rev", "!=", built.reviewedRev), eb("action_hash", "!=", built.actionHash)]));
|
|
82
|
+
const previous = await query.select("id").execute();
|
|
83
|
+
const supersessionChecks = [sql`${query.select((eb) => eb.fn.countAll().as("count"))} = ${previous.length}`];
|
|
84
|
+
for (const prior of previous) {
|
|
85
|
+
const batch = await reviews.prepareResolve(prior.id, {
|
|
86
|
+
decision: "rejected",
|
|
87
|
+
resolvedByActorType: "system",
|
|
88
|
+
resolvedByActorId: REVIEW_SUPERSESSION_ACTOR,
|
|
89
|
+
reviewNote: "Superseded by a newer submission. This is not an editorial rejection."
|
|
90
|
+
});
|
|
91
|
+
if (!batch) throw new AtomicWriteConflict();
|
|
92
|
+
supersessionChecks.push(...batch.checks ?? []);
|
|
93
|
+
statements.push(...batch.statements);
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
checks: supersessionChecks,
|
|
97
|
+
statements
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
const reuseReview = async (item) => {
|
|
101
|
+
const batch = await prepareSupersession();
|
|
102
|
+
return {
|
|
103
|
+
id: item.id,
|
|
104
|
+
targetKey,
|
|
105
|
+
created: false,
|
|
106
|
+
batch: {
|
|
107
|
+
checks: [
|
|
108
|
+
...checks,
|
|
109
|
+
rowUnchanged("_dineway_review_requests", {
|
|
110
|
+
id: item.id,
|
|
111
|
+
status: item.status,
|
|
112
|
+
revoked_at: item.revokedAt ?? null
|
|
113
|
+
}),
|
|
114
|
+
...batch.checks
|
|
115
|
+
],
|
|
116
|
+
statements: [...projectedGuard, ...batch.statements]
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const findExisting = async () => {
|
|
121
|
+
const existing = await db.selectFrom("_dineway_review_jobs").select("review_id").where("target_key", "=", targetKey).executeTakeFirst();
|
|
122
|
+
if (existing) {
|
|
123
|
+
const item = await reviews.findById(existing.review_id);
|
|
124
|
+
if (!item || item.status === "rejected" || item.revokedAt) throw new ReviewSubmissionError("Edit the content before submitting a rejected or revoked target again.");
|
|
125
|
+
return item;
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
};
|
|
129
|
+
const existingReview = await findExisting();
|
|
130
|
+
if (existingReview) return reuseReview(existingReview);
|
|
131
|
+
const rejected = await db.selectFrom("_dineway_review_requests").select([
|
|
132
|
+
"id",
|
|
133
|
+
"status",
|
|
134
|
+
"review_payload",
|
|
135
|
+
"resolved_by_actor_type",
|
|
136
|
+
"resolved_by_actor_id"
|
|
137
|
+
]).where("collection", "=", built.collection).where("entry_id", "=", built.entryId).where("status", "=", "rejected").execute();
|
|
138
|
+
checks.push(sql`NOT EXISTS (SELECT 1 FROM _dineway_review_jobs WHERE target_key = ${targetKey})`, sql`(SELECT COUNT(*) FROM _dineway_review_requests WHERE collection = ${built.collection} AND entry_id = ${built.entryId} AND status = 'rejected') = ${rejected.length}`, ...rejected.map((row) => rowUnchanged("_dineway_review_requests", row)));
|
|
139
|
+
for (const row of rejected) {
|
|
140
|
+
if (isSupersededReview(row)) continue;
|
|
141
|
+
if (await buildStableHash(z.object({ diff: z.object({ draft: z.unknown().optional() }).optional() }).parse(JSON.parse(row.review_payload)).diff?.draft) === contentHash) throw new ReviewSubmissionError("This content was rejected. Change it before submitting a new review.");
|
|
142
|
+
}
|
|
143
|
+
const approved = await reviews.findApprovedForTarget(built);
|
|
144
|
+
if (approved) return reuseReview(approved);
|
|
145
|
+
const pendingQuery = db.selectFrom("_dineway_review_requests").where("collection", "=", built.collection).where("entry_id", "=", built.entryId).where("action_type", "=", built.actionType).where("reviewed_rev", "=", built.reviewedRev).where("action_hash", "=", built.actionHash).where("status", "=", "pending").where("revoked_at", "is", null);
|
|
146
|
+
const pending = await pendingQuery.selectAll().orderBy("created_at").orderBy("id").executeTakeFirst();
|
|
147
|
+
checks.push(pending ? rowUnchanged("_dineway_review_requests", pending) : sql`NOT EXISTS ${pendingQuery.select("id")}`);
|
|
148
|
+
const prepared = pending ? null : reviews.prepareCreate({
|
|
149
|
+
...built,
|
|
150
|
+
riskReason: input.riskReason,
|
|
151
|
+
requestedByActorType: input.actor.actorType,
|
|
152
|
+
requestedByActorId: input.actor.actorId,
|
|
153
|
+
requestedAuthMetadata: input.actor.authMetadata
|
|
154
|
+
});
|
|
155
|
+
const reviewId = pending?.id ?? prepared.id;
|
|
156
|
+
const supersession = await prepareSupersession();
|
|
157
|
+
checks.push(...supersession.checks);
|
|
158
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
159
|
+
const job = db.insertInto("_dineway_review_jobs").values({
|
|
160
|
+
review_id: reviewId,
|
|
161
|
+
target_key: targetKey,
|
|
162
|
+
content_hash: contentHash,
|
|
163
|
+
state: "queued",
|
|
164
|
+
release_state: "none",
|
|
165
|
+
evidence_json: null,
|
|
166
|
+
reason: "Automated review in progress",
|
|
167
|
+
release_reason: null,
|
|
168
|
+
scheduled_at: scheduledAt,
|
|
169
|
+
created_at: now,
|
|
170
|
+
updated_at: now
|
|
171
|
+
}).compile();
|
|
172
|
+
return {
|
|
173
|
+
id: reviewId,
|
|
174
|
+
targetKey,
|
|
175
|
+
created: !pending,
|
|
176
|
+
batch: {
|
|
177
|
+
checks,
|
|
178
|
+
statements: [
|
|
179
|
+
...projectedGuard,
|
|
180
|
+
...supersession.statements,
|
|
181
|
+
...prepared ? [prepared.statement] : [],
|
|
182
|
+
job
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
async function submitAutomatedReview(db, handlers, input) {
|
|
188
|
+
let prepared = await prepareAutomatedReview(db, handlers, input);
|
|
189
|
+
try {
|
|
190
|
+
await atomicBatch(db, prepared.batch);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
if (!(error instanceof AtomicWriteConflict)) throw error;
|
|
193
|
+
const existing = await prepareAutomatedReview(db, handlers, input);
|
|
194
|
+
if (existing.created || existing.targetKey !== prepared.targetKey) throw error;
|
|
195
|
+
await atomicBatch(db, existing.batch);
|
|
196
|
+
prepared = existing;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
item: await new ReviewRequestRepository(db).findById(prepared.id),
|
|
200
|
+
created: prepared.created
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
//#endregion
|
|
205
|
+
export { prepareAutomatedReview as n, submitAutomatedReview as r, ReviewSubmissionError as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
2
|
-
import { t as TaxonomyRepository } from "./taxonomy-
|
|
3
|
-
import { c as invalidateTaxonomyDefsCache, l as invalidateTermCache } from "./taxonomies-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
|
+
import { t as TaxonomyRepository } from "./taxonomy-BK7JmHlo.mjs";
|
|
3
|
+
import { c as invalidateTaxonomyDefsCache, l as invalidateTermCache } from "./taxonomies-D5wO9zmB.mjs";
|
|
4
4
|
import { ulid } from "ulidx";
|
|
5
5
|
|
|
6
6
|
//#region src/api/handlers/taxonomies.ts
|