dineway 0.2.34 → 0.2.35
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-events-D-yGV7cW.mjs → activity-events-CiFN61xq.mjs} +1 -1
- package/dist/{allowed-origins-DV3LWuWW.mjs → allowed-origins-Cp7BI3L9.mjs} +1 -1
- package/dist/api/route-utils.d.mts +10 -10
- package/dist/api/route-utils.mjs +11 -11
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-CL4pG2zf.mjs → api-CwhrR7H5.mjs} +8 -8
- package/dist/{api-tokens-_6tMD1W4.mjs → api-tokens-OAgvq4xg.mjs} +1 -1
- package/dist/{apply-CYLUMiZg.mjs → apply-BTfAReIv.mjs} +13 -13
- package/dist/astro/index.d.mts +11 -11
- package/dist/astro/index.mjs +4 -4
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/redirect.mjs +2 -2
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +82 -83
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/briefing.mjs +14 -14
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +11 -11
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +11 -11
- package/dist/astro/routes/api/admin/bylines/index.mjs +11 -11
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +13 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -24
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -24
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +28 -29
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +28 -29
- package/dist/astro/routes/api/admin/context/diff.mjs +27 -28
- package/dist/astro/routes/api/admin/context/index.mjs +28 -29
- package/dist/astro/routes/api/admin/context/stale.mjs +27 -28
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -24
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +27 -28
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +27 -28
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -25
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +50 -51
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +50 -51
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -43
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +49 -50
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +49 -50
- package/dist/astro/routes/api/admin/plugins/index.mjs +42 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +42 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +49 -50
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -43
- package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -43
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +15 -15
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +25 -19
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +36 -37
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +4 -4
- package/dist/astro/routes/api/admin/review-requests/index.mjs +34 -35
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -43
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -43
- 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 +7 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/invite/index.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/register-options.mjs +10 -10
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +11 -11
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +7 -7
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +13 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/setup-token/index.mjs +3 -3
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/request.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +73 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +85 -46
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +16 -16
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +15 -16
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -16
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +5 -5
- 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 +16 -16
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +29 -30
- package/dist/astro/routes/api/import/wordpress/media.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -32
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +28 -29
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +33 -34
- package/dist/astro/routes/api/integration/artifact.mjs +5 -5
- package/dist/astro/routes/api/integration/dispatch.mjs +9 -9
- package/dist/astro/routes/api/integrations/_provider_.mjs +7 -7
- package/dist/astro/routes/api/integrations/index.mjs +6 -6
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +61 -62
- package/dist/astro/routes/api/media/_id_/confirm.mjs +9 -9
- package/dist/astro/routes/api/media/_id_.mjs +9 -9
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +10 -10
- package/dist/astro/routes/api/media.mjs +12 -12
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +27 -28
- package/dist/astro/routes/api/menus/_name_/items.mjs +27 -28
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +27 -28
- package/dist/astro/routes/api/menus/_name_/translations.mjs +27 -28
- package/dist/astro/routes/api/menus/_name_.mjs +27 -28
- package/dist/astro/routes/api/menus/index.mjs +27 -28
- 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 +5 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +9 -9
- package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
- package/dist/astro/routes/api/redirects/_id_.mjs +28 -29
- package/dist/astro/routes/api/redirects/index.mjs +28 -29
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +44 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +44 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +44 -45
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +44 -45
- package/dist/astro/routes/api/schema/collections/index.mjs +44 -45
- package/dist/astro/routes/api/schema/index.mjs +8 -8
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -43
- package/dist/astro/routes/api/schema/orphans/index.mjs +42 -43
- package/dist/astro/routes/api/search/enable.mjs +10 -10
- package/dist/astro/routes/api/search/index.mjs +9 -9
- package/dist/astro/routes/api/search/rebuild.mjs +10 -10
- package/dist/astro/routes/api/search/stats.mjs +4 -4
- package/dist/astro/routes/api/search/suggest.mjs +9 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +28 -29
- package/dist/astro/routes/api/sections/index.mjs +28 -29
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings/reviews.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +28 -29
- package/dist/astro/routes/api/setup/admin-verify.mjs +13 -13
- package/dist/astro/routes/api/setup/admin.mjs +11 -11
- package/dist/astro/routes/api/setup/dev-bypass.mjs +17 -17
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +19 -19
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +7 -7
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +30 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +30 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +30 -31
- package/dist/astro/routes/api/taxonomies/index.mjs +30 -31
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- 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 +27 -28
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +28 -29
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +28 -29
- package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -26
- package/dist/astro/routes/api/widget-areas/index.mjs +28 -29
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +3 -3
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -10
- package/dist/astro/routes/sitemap.xml.mjs +9 -9
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/types.d.mts +12 -12
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-D4WW-wFF.mjs → auth-control-guard-DPOSBNFI.mjs} +1 -1
- package/dist/{authorize-EnP57AQl.mjs → authorize-CXIjxIfC.mjs} +1 -1
- package/dist/{briefing-CkCi6S-W.mjs → briefing-5zf0YZbR.mjs} +3 -3
- package/dist/{briefing-BXsVwd4P.mjs → briefing-DiupPvyN.mjs} +1 -1
- package/dist/{bundle-Cgak1zGE.mjs → bundle-DImnxo71.mjs} +1 -1
- package/dist/{byline-fields-BmkhEDFF.d.mts → byline-fields-BO96fXLv.d.mts} +14 -14
- package/dist/{byline-fields-BGEIA9dZ.mjs → byline-fields-DGNKitg3.mjs} +2 -2
- package/dist/{bylines-LqNRjma2.mjs → bylines-CXyKpVLQ.mjs} +2 -2
- package/dist/cli/index.mjs +28 -28
- package/dist/cli/plugin-kit.d.mts +9 -9
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +11 -11
- package/dist/client/index.mjs +2 -2
- package/dist/{comment-Bi7cJ9SS.mjs → comment-kgLTdtQD.mjs} +13 -6
- package/dist/{comments-Dg_gWBEB.mjs → comments-ZYK_cZvx.mjs} +1 -1
- package/dist/{content-NobcQti0.mjs → content-D9xKUSno.mjs} +50 -7
- package/dist/{content-refresh-l4mPoGeX.mjs → content-refresh-9M9cc55-.mjs} +1 -1
- package/dist/{context-B0SG9Xkc.mjs → context-BU8AbLmY.mjs} +2 -2
- package/dist/{context-6uqzU-M9.mjs → context-C5lPtfeh.mjs} +6 -6
- package/dist/{context-route-helpers-C8s26uDT.mjs → context-route-helpers-CWAHJFl3.mjs} +1 -1
- package/dist/{dashboard-B-OybCMw.mjs → dashboard-BnD5krLg.mjs} +2 -2
- package/dist/database/batch.d.mts +3 -1
- package/dist/database/batch.mjs +25 -2
- package/dist/database/d1/index.d.mts +9 -9
- package/dist/database/d1/index.mjs +3 -3
- package/dist/db/d1.d.mts +1 -1
- package/dist/db/d1.mjs +1 -1
- package/dist/db/index.d.mts +3 -3
- 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-DhpCzMo0.mjs → device-flow-Prqg6ycD.mjs} +3 -3
- package/dist/{discovery-CqXbN0WZ.mjs → discovery-CYcZJ1o3.mjs} +3 -3
- package/dist/{evidence-xJf8hQgH.mjs → evidence-krrA3uiG.mjs} +5 -5
- package/dist/{hitl-requests-evSsel48.mjs → hitl-requests-CGjA1jND.mjs} +2 -2
- package/dist/{hitl-route-helpers-D2kJSOFX.mjs → hitl-route-helpers-BxSL0iZB.mjs} +4 -4
- package/dist/{import-Jpta-CYE.mjs → import-CayDCPaH.mjs} +6 -6
- package/dist/{index-CSUSBfdD.d.mts → index-mlJSqFkG.d.mts} +3 -3
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +75 -76
- package/dist/{integration-credentials-BrQr0fb_.mjs → integration-credentials-Br16M1VE.mjs} +2 -2
- package/dist/{jsonld-CqIVIeZK.d.mts → jsonld-BUiFEiCZ.d.mts} +2 -2
- package/dist/{manifest-schema-DG29meRy.mjs → manifest-schema-DBXM_g8l.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-DAZL3Ckt.mjs → mcp-reviewed-executor-RJ71uyQb.mjs} +5 -5
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +1 -1
- package/dist/{media-3fK0u-bo.mjs → media-BZqwtRTZ.mjs} +11 -3
- package/dist/{menus-CbR_J8cJ.mjs → menus-2o-DVcwA.mjs} +4 -4
- package/dist/{oauth-authorization--0UtTZpv.mjs → oauth-authorization-B_mmz7O2.mjs} +4 -4
- package/dist/{oauth-clients-D4WBYaYW.mjs → oauth-clients-Cr4pdIAE.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/page/index.d.mts +10 -10
- package/dist/page/index.mjs +1 -1
- package/dist/{parse--7nG62_h.mjs → parse-BscLr3p2.mjs} +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-DK1wLuao.mjs → plugins-f48yrwfI.mjs} +5 -5
- package/dist/{preview-q0pkibNO.mjs → preview-E1xKZGsX.mjs} +2 -2
- package/dist/{provider-loader-C0GaLwKB.d.mts → provider-loader-H2wdGD0o.d.mts} +1 -1
- package/dist/{public-url-B9zEdO8p.d.mts → public-url-CI700CW4.d.mts} +1 -1
- package/dist/{public-url-BV-YQ_LF.d.mts → public-url-zoO-QbN6.d.mts} +2 -2
- package/dist/{publication-authorization-BrEZ2TsE.mjs → publication-authorization-Dq_20SZR.mjs} +5 -6
- package/dist/{query-DAS6VbMS.mjs → query-BkWWdxyb.mjs} +1 -1
- package/dist/{query-CEn9HXnf.mjs → query-D6oNo9iz.mjs} +5 -5
- package/dist/{rate-limit-Dd1TnzZP.mjs → rate-limit-RaBJEgyt.mjs} +2 -2
- package/dist/{redirects-DmOdfRjI.mjs → redirects-D16GFaOa.mjs} +2 -2
- package/dist/{redirects-UCXyL0lP.mjs → redirects-DpRiuRWn.mjs} +3 -3
- package/dist/{registry-RD9qTnYL.mjs → registry-DcV93OL_.mjs} +3 -3
- package/dist/{release-BR08Slqf.mjs → release-CZfAeyXm.mjs} +2 -2
- package/dist/{request-meta-BOcuHAXD.mjs → request-meta-C6yGqnGD.mjs} +1 -1
- package/dist/{content-De_XeXy_.mjs → review-payload-LLIi1sxO.mjs} +161 -5
- package/dist/{review-requests-CyfWbJ6W.mjs → review-requests-C7prIbCo.mjs} +1 -1
- package/dist/{review-route-helpers-lKA-CXms.mjs → review-route-helpers-BYx3Px90.mjs} +1 -1
- package/dist/{runner-JnJSGXEB.d.mts → runner-Cxl-vyk2.d.mts} +1 -1
- package/dist/{runs-B5BExdKO.mjs → runs-B8kCirJ6.mjs} +2 -2
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-DLMkODQc.mjs → schema-DFeC5axi.mjs} +1 -1
- package/dist/{search-CRzWNfxX.mjs → search-C9qOBgvo.mjs} +1 -1
- package/dist/{secrets-Cg0D2gQW.mjs → secrets-BP2YTPWn.mjs} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +12 -12
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +7 -7
- package/dist/{seo-B_tBFyud.mjs → seo-Bypxm1iD.mjs} +1 -1
- package/dist/{service-DilVsWGD.mjs → service-DOFqfUVv.mjs} +45 -20
- package/dist/{service--bQht6oN.mjs → service-mJBl4ZP4.mjs} +2 -2
- package/dist/{settings-Deqx3Upy.mjs → settings-2p7TuNWG.mjs} +1 -1
- package/dist/{settings-DFzevIrU.mjs → settings-DRFy8JQx.mjs} +2 -2
- package/dist/{site-context-vCiDRr4H.mjs → site-context-D9oETfxF.mjs} +11 -11
- 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-C1yDxxfv.mjs → store-CjmmGlVw.mjs} +2 -2
- package/dist/submission-BLvkvewK.mjs +411 -0
- package/dist/{taxonomies-4cnTcbD6.mjs → taxonomies-C5ayPp3T.mjs} +1 -1
- package/dist/{taxonomies-CllxqaH0.mjs → taxonomies-DW6Fps-w.mjs} +2 -2
- package/dist/{trusted-proxy-CAW9o4Dw.mjs → trusted-proxy-CvDP0g0F.mjs} +1 -1
- package/dist/{types-CFgTpfPk.d.mts → types-BFoQ5a1v.d.mts} +1 -1
- package/dist/{types-QjOcidFc.d.mts → types-Tt_IGMno.d.mts} +75 -15
- package/dist/ui/server-runtime.d.mts +13 -13
- package/dist/ui/server-runtime.mjs +19 -19
- package/dist/{validate-A27peRc4.d.mts → validate-CCOsvPg2.d.mts} +3 -3
- package/dist/{validate-Wl4MSf3V.mjs → validate-CupwWNWL.mjs} +1 -1
- package/dist/version-DpT-k_Ny.mjs +6 -0
- package/dist/{widgets-Di-6yDH7.mjs → widgets-DbOctkXv.mjs} +1 -1
- package/dist/{worker-RpaMP71d.mjs → worker-wjRq4FI9.mjs} +7 -7
- package/dist/{zod-generator-Cylvl_SM.mjs → zod-generator-BzACAoR5.mjs} +1 -1
- package/package.json +2 -2
- package/dist/review-payload-DEylbssM.mjs +0 -159
- package/dist/submission-BsHNfHc7.mjs +0 -155
- package/dist/version-BWxyC5s4.mjs +0 -6
- /package/dist/{activity-CZnq5YlZ.mjs → activity-BbtYp_4V.mjs} +0 -0
- /package/dist/{adapters-BQ8CQbBm.d.mts → adapters-Rol-inz6.d.mts} +0 -0
- /package/dist/{api-tokens-D5K_Csub.mjs → api-tokens-DA18zxza.mjs} +0 -0
- /package/dist/{byline-fields-Qg8TesxL.mjs → byline-fields-CY6V0ew1.mjs} +0 -0
- /package/dist/{bylines-7BQxRGyG.mjs → bylines-gSAfpHl4.mjs} +0 -0
- /package/dist/{cache-CSTy-R-K.mjs → cache-DZDOBJv3.mjs} +0 -0
- /package/dist/{challenge-store-D-_-VavY.mjs → challenge-store-DFGsDtCj.mjs} +0 -0
- /package/dist/{client-factory-BLSkgsTg.mjs → client-factory-6vLLT06O.mjs} +0 -0
- /package/dist/{comment-reaction-BLqIj5mx.mjs → comment-reaction-Cun5eIXL.mjs} +0 -0
- /package/dist/{components-BWQUCJEr.mjs → components-gMTtJqHg.mjs} +0 -0
- /package/dist/{context-types-DqTo6C79.mjs → context-types-DLD_HnKT.mjs} +0 -0
- /package/dist/{cron-D7zB6m8i.mjs → cron-BVYo08mi.mjs} +0 -0
- /package/dist/{d1-dialect-B1b8cmxX.mjs → d1-dialect-BBxPg6Om.mjs} +0 -0
- /package/dist/{default-D9zxuUU7.mjs → default-w3MwLng7.mjs} +0 -0
- /package/dist/{email-console-BONByQiC.mjs → email-console-CpvgEN1w.mjs} +0 -0
- /package/dist/{error-Dd8LtpG5.mjs → error-B-44r5TD.mjs} +0 -0
- /package/dist/{escape-BWC4s5bV.mjs → escape-B1GM0yJU.mjs} +0 -0
- /package/dist/{experimental-workflows-M5D3RTFo.mjs → experimental-workflows-fzJHB3ZI.mjs} +0 -0
- /package/dist/{forgeway-account-BeKJlKh1.mjs → forgeway-account-CnWOIusE.mjs} +0 -0
- /package/dist/{fts-manager-BeWtB7ZD.mjs → fts-manager-DA74x_uP.mjs} +0 -0
- /package/dist/{hash-lNx3KJis.mjs → hash-DvMZXj2L.mjs} +0 -0
- /package/dist/{load-Dc5ttyg4.mjs → load-B2oitobd.mjs} +0 -0
- /package/dist/{media-allowlist-rN4qIF6W.mjs → media-allowlist-CyByjUXh.mjs} +0 -0
- /package/dist/{media-url-B4YtTY6c.mjs → media-url-D-elxQjL.mjs} +0 -0
- /package/dist/{migrations-CMdxWKx-.mjs → migrations-C7YXse7V.mjs} +0 -0
- /package/dist/{mode-CPf_KZ37.mjs → mode-BJwb_MgK.mjs} +0 -0
- /package/dist/{oauth-authority-CCqo4eBm.mjs → oauth-authority-DOjME4Hh.mjs} +0 -0
- /package/dist/{oauth-state-store-CMgcimzA.mjs → oauth-state-store-D2H9hKcN.mjs} +0 -0
- /package/dist/{output-BYpiVUBf.mjs → output-CdmbQioY.mjs} +0 -0
- /package/dist/{parser-BV0wzQHo.mjs → parser-ehIlj32k.mjs} +0 -0
- /package/dist/{passkey-config-BG4GO4OO.mjs → passkey-config-sUQoLEj_.mjs} +0 -0
- /package/dist/{placeholder-BHTaoCYx.d.mts → placeholder-CQKI6vLd.d.mts} +0 -0
- /package/dist/{policy-Dej7NJFD.mjs → policy-CrK1vl8l.mjs} +0 -0
- /package/dist/{portable-text-FKf3IrPz.d.mts → portable-text-BE7nszX6.d.mts} +0 -0
- /package/dist/{portable-text-B9YuySom.mjs → portable-text-DH3Om_2D.mjs} +0 -0
- /package/dist/{provider-loader-3MY1SjzA.mjs → provider-loader-Dnv2neOu.mjs} +0 -0
- /package/dist/{public-discovery-BAbOvKiR.mjs → public-discovery-CTql6jdZ.mjs} +0 -0
- /package/dist/{public-url-D5Wjq0sy.mjs → public-url-4sMO36Gw.mjs} +0 -0
- /package/dist/{public-url-C7pbmS_7.mjs → public-url-DNt9A1yS.mjs} +0 -0
- /package/dist/{redirect-Bx96u2nS.mjs → redirect-Cjjb5VYr.mjs} +0 -0
- /package/dist/{resolve-C80Pm2DW.mjs → resolve-CpOV2jt_.mjs} +0 -0
- /package/dist/{revocation-B7GL5fMl.mjs → revocation-DZ8e4JCS.mjs} +0 -0
- /package/dist/{runtime-env-CQVAWHzH.mjs → runtime-env-v-1UXPAH.mjs} +0 -0
- /package/dist/{sections-BwUjOGqn.mjs → sections-CkoQY7Z9.mjs} +0 -0
- /package/dist/{seo-BOTuCeh-.mjs → seo-DYpc_rQ1.mjs} +0 -0
- /package/dist/{seo-contributions-Dt57p6Sq.mjs → seo-contributions-atY3jZEV.mjs} +0 -0
- /package/dist/{service-wYQ_ePZ4.mjs → service-CeEi6nax.mjs} +0 -0
- /package/dist/{session-user-DeqTcAmR.mjs → session-user-DacoiKrJ.mjs} +0 -0
- /package/dist/{setup-complete-BFqudwbW.mjs → setup-complete-CWMnrNFN.mjs} +0 -0
- /package/dist/{setup-nonce-CAqDUxxU.mjs → setup-nonce-BUmfCiY1.mjs} +0 -0
- /package/dist/{sidecar-client-CnpGTvYq.mjs → sidecar-client-CbrX8nuw.mjs} +0 -0
- /package/dist/{site-url-wXFqbm9c.mjs → site-url-DoTPKRND.mjs} +0 -0
- /package/dist/{ssrf-LN16WMip.mjs → ssrf-COxLChKv.mjs} +0 -0
- /package/dist/{state-jyNZ6-7L.mjs → state-D8AogXCV.mjs} +0 -0
- /package/dist/{status-Bwkeuz8g.mjs → status-DBSB6tdS.mjs} +0 -0
- /package/dist/{tokens-Bjuf1HID.mjs → tokens-I3tSjoFI.mjs} +0 -0
- /package/dist/{transport-C0jj-Nc8.d.mts → transport-CZbtxgKZ.d.mts} +0 -0
- /package/dist/{transport-472KVGBe.mjs → transport-aPKvM53n.mjs} +0 -0
- /package/dist/{types-Bs-7Geuh.d.mts → types-1qU0-N1P.d.mts} +0 -0
- /package/dist/{types-BDq9t5lG.mjs → types-BKsk4nnM.mjs} +0 -0
- /package/dist/{types-CwkJp6zr.d.mts → types-BWsEjujW.d.mts} +0 -0
- /package/dist/{types-DTjrkhKU.d.mts → types-CAD4OvmF.d.mts} +0 -0
- /package/dist/{types-7Th6Mwz3.d.mts → types-CVRNRAA5.d.mts} +0 -0
- /package/dist/{types-D17dJRht.mjs → types-ChSk0dmw.mjs} +0 -0
- /package/dist/{types-b2sq7ZDk.d.mts → types-DNPP-eu4.d.mts} +0 -0
- /package/dist/{types-DkXuBo8k.d.mts → types-SddyDti7.d.mts} +0 -0
- /package/dist/{url-D375-6LM.mjs → url-Ce0qtSdB.mjs} +0 -0
- /package/dist/{url-bv5i4JN0.mjs → url-DfqolpO2.mjs} +0 -0
- /package/dist/{utils-Cglcqpm2.mjs → utils-BoWkoty8.mjs} +0 -0
- /package/dist/{wordpress-slugs-vOx7R1dM.mjs → wordpress-slugs-pQlLXbKn.mjs} +0 -0
- /package/dist/{workers-build-BaQCrSmf.mjs → workers-build-QVrquLLe.mjs} +0 -0
package/dist/client/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../runner-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../types-
|
|
6
|
-
import "../public-url-
|
|
7
|
-
import "../validate-
|
|
8
|
-
import "../byline-fields-
|
|
9
|
-
import "../types-
|
|
10
|
-
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-
|
|
11
|
-
import { n as markdownToPortableText, r as portableTextToMarkdown, t as PortableTextBlock } from "../portable-text-
|
|
1
|
+
import { Ns as ReviewRequest, Ps as ReviewRequestStatus, Wt as PublicationPolicyOverride, Yt as PublicationReadinessResult, Zt as PublicationReceipt } from "../types-Tt_IGMno.mjs";
|
|
2
|
+
import "../types-CVRNRAA5.mjs";
|
|
3
|
+
import "../runner-Cxl-vyk2.mjs";
|
|
4
|
+
import "../index-mlJSqFkG.mjs";
|
|
5
|
+
import "../types-SddyDti7.mjs";
|
|
6
|
+
import "../public-url-zoO-QbN6.mjs";
|
|
7
|
+
import "../validate-CCOsvPg2.mjs";
|
|
8
|
+
import "../byline-fields-BO96fXLv.mjs";
|
|
9
|
+
import "../types-CAD4OvmF.mjs";
|
|
10
|
+
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-CZbtxgKZ.mjs";
|
|
11
|
+
import { n as markdownToPortableText, r as portableTextToMarkdown, t as PortableTextBlock } from "../portable-text-BE7nszX6.mjs";
|
|
12
12
|
|
|
13
13
|
//#region src/client/index.d.ts
|
|
14
14
|
interface DinewayClientOptions {
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-
|
|
2
|
-
import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-
|
|
1
|
+
import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-DH3Om_2D.mjs";
|
|
2
|
+
import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-aPKvM53n.mjs";
|
|
3
3
|
import mime from "mime/lite";
|
|
4
4
|
|
|
5
5
|
//#region src/client/index.ts
|
|
@@ -13,10 +13,10 @@ var CommentRepository = class CommentRepository {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create a new comment
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
prepareCreate(input) {
|
|
17
17
|
const id = ulid();
|
|
18
18
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
19
|
-
|
|
19
|
+
const row = {
|
|
20
20
|
id,
|
|
21
21
|
collection: input.collection,
|
|
22
22
|
content_id: input.contentId,
|
|
@@ -31,11 +31,18 @@ var CommentRepository = class CommentRepository {
|
|
|
31
31
|
moderation_metadata: input.moderationMetadata ? JSON.stringify(input.moderationMetadata) : null,
|
|
32
32
|
created_at: now,
|
|
33
33
|
updated_at: now
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
id,
|
|
37
|
+
comment: this.rowToComment(row),
|
|
38
|
+
statement: this.db.insertInto("_dineway_comments").values(row).compile()
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async create(input) {
|
|
42
|
+
const prepared = this.prepareCreate(input);
|
|
43
|
+
await this.db.executeQuery(prepared.statement);
|
|
35
44
|
invalidateCommentObjectCache();
|
|
36
|
-
|
|
37
|
-
if (!comment) throw new Error("Failed to create comment");
|
|
38
|
-
return comment;
|
|
45
|
+
return prepared.comment;
|
|
39
46
|
}
|
|
40
47
|
/**
|
|
41
48
|
* Find comment by ID
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as __exportAll } from "./runner-CVeq0266.mjs";
|
|
2
|
-
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
|
+
import { atomicBatch, isD1Database, rowUnchanged } from "./database/batch.mjs";
|
|
3
3
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
4
4
|
import { o as isPostgres } from "./dialect-helpers-C6xtO-Ui.mjs";
|
|
5
5
|
import { i as encodeCursor, n as ScheduledNotDueError, r as decodeCursor, t as DinewayValidationError } from "./types-BqxIv8Il.mjs";
|
|
@@ -13,6 +13,9 @@ import { ulid } from "ulidx";
|
|
|
13
13
|
//#region src/database/repositories/content.ts
|
|
14
14
|
var content_exports = /* @__PURE__ */ __exportAll({ ContentRepository: () => ContentRepository });
|
|
15
15
|
const ULID_PATTERN = /^[0-9A-Z]{26}$/;
|
|
16
|
+
const NUMERIC_TEXT = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
|
|
17
|
+
const BLOB_AFFINITY = /BLOB/i;
|
|
18
|
+
const TEXT_AFFINITY = /TEXT|CHAR|CLOB/i;
|
|
16
19
|
const LIKE_WILDCARD_RE = /[\\%_]/g;
|
|
17
20
|
const DATE_FILTER_COLUMNS = {
|
|
18
21
|
createdAt: "created_at",
|
|
@@ -57,6 +60,17 @@ function serializeValue(value) {
|
|
|
57
60
|
if (typeof value === "object") return JSON.stringify(value);
|
|
58
61
|
return value;
|
|
59
62
|
}
|
|
63
|
+
function normalizeAffinity(value, type) {
|
|
64
|
+
if (value === null || value === void 0) return null;
|
|
65
|
+
if (TEXT_AFFINITY.test(type)) return typeof value === "number" ? String(value) : value;
|
|
66
|
+
if (!type || BLOB_AFFINITY.test(type)) return value;
|
|
67
|
+
if (typeof value === "string" && NUMERIC_TEXT.test(value.trim())) {
|
|
68
|
+
const number = Number(value);
|
|
69
|
+
if (!Number.isFinite(number) || Number.isInteger(number) && !Number.isSafeInteger(number)) throw new DinewayValidationError("Numeric content must fit the supported JavaScript precision.");
|
|
70
|
+
return number;
|
|
71
|
+
}
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
60
74
|
/**
|
|
61
75
|
* Deserialize a value from database storage
|
|
62
76
|
* Attempts to parse JSON strings that look like objects/arrays
|
|
@@ -89,10 +103,18 @@ var ContentRepository = class {
|
|
|
89
103
|
constructor(db) {
|
|
90
104
|
this.db = db;
|
|
91
105
|
}
|
|
106
|
+
async normalizePreparedData(type, data) {
|
|
107
|
+
if (isPostgres(this.db)) return data;
|
|
108
|
+
const columns = await sql`SELECT name,type FROM pragma_table_info(${getTableName(type)})`.execute(this.db);
|
|
109
|
+
return Object.fromEntries(Object.entries(data).map(([name, value]) => {
|
|
110
|
+
const column = columns.rows.find((candidate) => candidate.name === name);
|
|
111
|
+
return [name, deserializeValue(column ? normalizeAffinity(serializeValue(value), column.type) : value)];
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
92
114
|
/**
|
|
93
115
|
* Create a new content item
|
|
94
116
|
*/
|
|
95
|
-
async prepareCreate(input) {
|
|
117
|
+
async prepareCreate(input, options = {}) {
|
|
96
118
|
const id = ulid();
|
|
97
119
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
98
120
|
const { type, slug, data, status = "draft", authorId, primaryBylineId, locale, translationOf, publishedAt, createdAt } = input;
|
|
@@ -139,10 +161,29 @@ var ContentRepository = class {
|
|
|
139
161
|
values.push(serializeValue(value));
|
|
140
162
|
}
|
|
141
163
|
}
|
|
164
|
+
let item;
|
|
165
|
+
if (options.captureDefaults) {
|
|
166
|
+
if (isPostgres(this.db)) throw new Error("Prepared content defaults require SQLite or D1.");
|
|
167
|
+
const schema = await sql`SELECT m.sql AS definition, p.name, p.type, p.dflt_value FROM sqlite_master m JOIN pragma_table_info(m.name) p WHERE m.name=${tableName} AND m.type='table'`.execute(this.db);
|
|
168
|
+
const definition = schema.rows[0]?.definition;
|
|
169
|
+
if (!definition) throw new DinewayValidationError("Content table not found");
|
|
170
|
+
const expressions = schema.rows.map((column) => {
|
|
171
|
+
const position = columns.indexOf(column.name);
|
|
172
|
+
const value = position >= 0 ? sql`${values[position]}` : column.dflt_value === null ? sql`NULL` : sql.raw(column.dflt_value);
|
|
173
|
+
return (TEXT_AFFINITY.test(column.type) ? sql`CAST(${value} AS TEXT)` : value).as(column.name);
|
|
174
|
+
});
|
|
175
|
+
const row = (await sql`SELECT ${sql.join(expressions)}`.execute(this.db)).rows[0];
|
|
176
|
+
for (const column of schema.rows) row[column.name] = normalizeAffinity(row[column.name], column.type);
|
|
177
|
+
columns.splice(0, columns.length, ...Object.keys(row));
|
|
178
|
+
values.splice(0, values.length, ...Object.values(row));
|
|
179
|
+
checks.push(sql`EXISTS (SELECT 1 FROM sqlite_master WHERE name=${tableName} AND sql=${definition})`);
|
|
180
|
+
item = this.mapRow(type, row);
|
|
181
|
+
}
|
|
142
182
|
const columnRefs = columns.map((c) => sql.ref(c));
|
|
143
183
|
const valuePlaceholders = values.map((v) => v === null ? sql`NULL` : sql`${v}`);
|
|
144
184
|
return {
|
|
145
185
|
id,
|
|
186
|
+
item,
|
|
146
187
|
batch: {
|
|
147
188
|
checks,
|
|
148
189
|
statements: [sql`
|
|
@@ -222,13 +263,15 @@ var ContentRepository = class {
|
|
|
222
263
|
LIMIT 1
|
|
223
264
|
`.execute(this.db)).rows.length === 0) return baseSlug;
|
|
224
265
|
const pattern = `${baseSlug}-%`;
|
|
266
|
+
const prefix = `${baseSlug}-`;
|
|
267
|
+
const prefixMatch = isD1Database(this.db) ? sql`substr(slug, 1, length(${prefix})) = ${prefix}` : sql`slug LIKE ${pattern}`;
|
|
225
268
|
const candidates = locale ? await sql`
|
|
226
269
|
SELECT slug FROM ${sql.ref(tableName)}
|
|
227
|
-
WHERE (slug = ${baseSlug} OR
|
|
270
|
+
WHERE (slug = ${baseSlug} OR ${prefixMatch})
|
|
228
271
|
AND locale = ${locale}
|
|
229
272
|
`.execute(this.db) : await sql`
|
|
230
273
|
SELECT slug FROM ${sql.ref(tableName)}
|
|
231
|
-
WHERE slug = ${baseSlug} OR
|
|
274
|
+
WHERE slug = ${baseSlug} OR ${prefixMatch}
|
|
232
275
|
`.execute(this.db);
|
|
233
276
|
let maxSuffix = 0;
|
|
234
277
|
const suffixPattern = new RegExp(`^${escapeRegExp(baseSlug)}-(\\d+)$`);
|
|
@@ -417,10 +460,10 @@ var ContentRepository = class {
|
|
|
417
460
|
/**
|
|
418
461
|
* Update content
|
|
419
462
|
*/
|
|
420
|
-
prepareUpdate(type, id, input) {
|
|
463
|
+
prepareUpdate(type, id, input, now = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
421
464
|
const tableName = getTableName(type);
|
|
422
465
|
const updates = {
|
|
423
|
-
updated_at:
|
|
466
|
+
updated_at: now,
|
|
424
467
|
version: sql`version + 1`
|
|
425
468
|
};
|
|
426
469
|
if (input.status !== void 0) updates.status = input.status;
|
|
@@ -591,7 +634,7 @@ var ContentRepository = class {
|
|
|
591
634
|
const pattern = `%${term.replace(LIKE_WILDCARD_RE, (character) => `\\${character}`)}%`;
|
|
592
635
|
return query.where((eb) => eb.or(columns.map((column) => {
|
|
593
636
|
validateIdentifier(column, "search column");
|
|
594
|
-
return eb(sql`lower(${sql.ref(column)})`, "like", sql`lower(${pattern}) escape '\\'`);
|
|
637
|
+
return isD1Database(this.db) ? sql`instr(lower(${sql.ref(column)}), lower(${term})) > 0` : eb(sql`lower(${sql.ref(column)})`, "like", sql`lower(${pattern}) escape '\\'`);
|
|
595
638
|
})));
|
|
596
639
|
}
|
|
597
640
|
applyDateFilter(query, where) {
|
|
@@ -4,7 +4,7 @@ import { r as isI18nEnabled } from "./config-XW5tMrH8.mjs";
|
|
|
4
4
|
import { i as encodeCursor, r as decodeCursor } from "./types-BqxIv8Il.mjs";
|
|
5
5
|
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-BnG3LPMN.mjs";
|
|
6
6
|
import { n as normalizeMime } from "./mime-D_ae-u_U.mjs";
|
|
7
|
-
import { n as hashString } from "./hash-
|
|
7
|
+
import { n as hashString } from "./hash-DvMZXj2L.mjs";
|
|
8
8
|
import { sql } from "kysely";
|
|
9
9
|
import { ulid } from "ulidx";
|
|
10
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as toPublicContextDiff, v as toPublicContextEntry, y as toPublicContextEntryPage } from "./site-context-
|
|
2
|
-
import { d as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-
|
|
1
|
+
import { _ as toPublicContextDiff, v as toPublicContextEntry, y as toPublicContextEntryPage } from "./site-context-D9oETfxF.mjs";
|
|
2
|
+
import { d as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-5zf0YZbR.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/context.ts
|
|
5
5
|
async function handleContextEntryList(db, input = {}) {
|
|
@@ -4,15 +4,15 @@ import { c as jsonExtractExpr } from "./dialect-helpers-C6xtO-Ui.mjs";
|
|
|
4
4
|
import { i as encodeCursor, r as decodeCursor } from "./types-BqxIv8Il.mjs";
|
|
5
5
|
import { t as contentWriteChecks } from "./atomic-authority-CnBQJ14T.mjs";
|
|
6
6
|
import { o as invalidateCollectionCache } from "./object-cache-BGjIlY9s.mjs";
|
|
7
|
-
import { t as ContentRepository } from "./content-
|
|
8
|
-
import { t as MediaRepository } from "./media-
|
|
7
|
+
import { t as ContentRepository } from "./content-D9xKUSno.mjs";
|
|
8
|
+
import { t as MediaRepository } from "./media-BZqwtRTZ.mjs";
|
|
9
9
|
import { t as UserRepository } from "./user-1-YV30lf.mjs";
|
|
10
10
|
import { t as OptionsRepository } from "./options-BcqHWpc-.mjs";
|
|
11
11
|
import { t as enrichImageMetadata } from "./enrich-BjF-J4sF.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as CronAccessImpl } from "./cron-
|
|
12
|
+
import { t as SeoRepository } from "./seo-DYpc_rQ1.mjs";
|
|
13
|
+
import { o as prepareContentMediaUsageCollectionStale } from "./content-refresh-9M9cc55-.mjs";
|
|
14
|
+
import { a as validateExternalUrl, i as stripCredentialHeaders, t as SsrfError } from "./ssrf-COxLChKv.mjs";
|
|
15
|
+
import { t as CronAccessImpl } from "./cron-BVYo08mi.mjs";
|
|
16
16
|
import { sql } from "kysely";
|
|
17
17
|
import { ulid } from "ulidx";
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as resolveActorIdentity } from "./actor-DxUAJgQX.mjs";
|
|
2
|
-
import { p as logSiteActivitySafely } from "./activity-events-
|
|
2
|
+
import { p as logSiteActivitySafely } from "./activity-events-CiFN61xq.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/context-route-helpers.ts
|
|
5
5
|
function resolveContextRouteActor(locals) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
2
|
-
import { t as ContentRepository } from "./content-
|
|
3
|
-
import { t as MediaRepository } from "./media-
|
|
2
|
+
import { t as ContentRepository } from "./content-D9xKUSno.mjs";
|
|
3
|
+
import { t as MediaRepository } from "./media-BZqwtRTZ.mjs";
|
|
4
4
|
import { t as UserRepository } from "./user-1-YV30lf.mjs";
|
|
5
5
|
import { r as ReviewRequestRepository } from "./review-requests-BF2eEKr8.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
@@ -6,6 +6,8 @@ interface AtomicBatch {
|
|
|
6
6
|
checks?: readonly RawBuilder<boolean>[];
|
|
7
7
|
statements: readonly CompiledQuery[];
|
|
8
8
|
}
|
|
9
|
+
/** Place checks between composed writes while retaining native Node transactions. */
|
|
10
|
+
declare function prepareAtomicChecks<DB>(db: Kysely<DB>, checks: readonly RawBuilder<boolean>[]): CompiledQuery[];
|
|
9
11
|
declare class AtomicWriteConflict extends Error {
|
|
10
12
|
constructor();
|
|
11
13
|
}
|
|
@@ -17,4 +19,4 @@ declare function ensureAtomicBatchSchema<DB>(db: Kysely<DB>): Promise<void>;
|
|
|
17
19
|
/** Executes precompiled writes once; conflicts and unknown commit outcomes are never replayed. */
|
|
18
20
|
declare function atomicBatch<DB>(db: Kysely<DB>, batch: AtomicBatch): Promise<QueryResult<unknown>[]>;
|
|
19
21
|
//#endregion
|
|
20
|
-
export { AtomicBatch, AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, rowUnchanged };
|
|
22
|
+
export { AtomicBatch, AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, prepareAtomicChecks, rowUnchanged };
|
package/dist/database/batch.mjs
CHANGED
|
@@ -4,6 +4,18 @@ import { sql } from "kysely";
|
|
|
4
4
|
import { ulid } from "ulidx";
|
|
5
5
|
|
|
6
6
|
//#region src/database/batch.ts
|
|
7
|
+
const inlineChecks = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
/** Place checks between composed writes while retaining native Node transactions. */
|
|
9
|
+
function prepareAtomicChecks(db, checks) {
|
|
10
|
+
return checks.flatMap((check) => {
|
|
11
|
+
const id = ulid();
|
|
12
|
+
const assertion = sql`INSERT INTO _dineway_atomic_guards(id,ok) VALUES(${id},CASE WHEN ${check} THEN 1 ELSE 0 END)`.compile(db);
|
|
13
|
+
const cleanup = sql`DELETE FROM _dineway_atomic_guards WHERE id=${id}`.compile(db);
|
|
14
|
+
inlineChecks.set(assertion, check);
|
|
15
|
+
inlineChecks.set(cleanup, null);
|
|
16
|
+
return [assertion, cleanup];
|
|
17
|
+
});
|
|
18
|
+
}
|
|
7
19
|
var AtomicWriteConflict = class extends Error {
|
|
8
20
|
constructor() {
|
|
9
21
|
super("Atomic write precondition failed");
|
|
@@ -39,7 +51,18 @@ async function atomicBatch(db, batch) {
|
|
|
39
51
|
const execute = async (transaction) => {
|
|
40
52
|
for (const check of checks) if ((await sql`SELECT CASE WHEN ${check} THEN 1 ELSE 0 END AS ok`.execute(transaction)).rows[0]?.ok !== 1) throw new AtomicWriteConflict();
|
|
41
53
|
const results = [];
|
|
42
|
-
|
|
54
|
+
try {
|
|
55
|
+
for (const statement of batch.statements) if (inlineChecks.has(statement)) {
|
|
56
|
+
const check = inlineChecks.get(statement);
|
|
57
|
+
if (check) {
|
|
58
|
+
if ((await sql`SELECT CASE WHEN ${check} THEN 1 ELSE 0 END AS ok`.execute(transaction)).rows[0]?.ok !== 1) throw new AtomicWriteConflict();
|
|
59
|
+
}
|
|
60
|
+
results.push({ rows: [] });
|
|
61
|
+
} else results.push(await transaction.executeQuery(statement));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (error instanceof Error && `${error.message} ${String(error.cause)}`.includes("dineway_atomic_precondition")) throw new AtomicWriteConflict();
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
43
66
|
return results;
|
|
44
67
|
};
|
|
45
68
|
return db.isTransaction ? execute(db) : db.transaction().execute(execute);
|
|
@@ -66,4 +89,4 @@ async function atomicBatch(db, batch) {
|
|
|
66
89
|
}
|
|
67
90
|
|
|
68
91
|
//#endregion
|
|
69
|
-
export { AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, rowUnchanged };
|
|
92
|
+
export { AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, prepareAtomicChecks, rowUnchanged };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { At as ResolvedPlugin, ac as
|
|
2
|
-
import "../../types-
|
|
3
|
-
import "../../runner-
|
|
4
|
-
import "../../index-
|
|
5
|
-
import "../../types-
|
|
6
|
-
import "../../public-url-
|
|
7
|
-
import "../../validate-
|
|
8
|
-
import "../../byline-fields-
|
|
9
|
-
import "../../types-
|
|
1
|
+
import { At as ResolvedPlugin, ac as D1Migration, cc as migrateD1, lc as D1SchemaObject, oc as D1MigrationOptions, sc as assertD1Migrations, uc as compileD1Schema } from "../../types-Tt_IGMno.mjs";
|
|
2
|
+
import "../../types-CVRNRAA5.mjs";
|
|
3
|
+
import "../../runner-Cxl-vyk2.mjs";
|
|
4
|
+
import "../../index-mlJSqFkG.mjs";
|
|
5
|
+
import "../../types-SddyDti7.mjs";
|
|
6
|
+
import "../../public-url-zoO-QbN6.mjs";
|
|
7
|
+
import "../../validate-CCOsvPg2.mjs";
|
|
8
|
+
import "../../byline-fields-BO96fXLv.mjs";
|
|
9
|
+
import "../../types-CAD4OvmF.mjs";
|
|
10
10
|
import { Kysely } from "kysely";
|
|
11
11
|
|
|
12
12
|
//#region src/database/d1/release.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as assertD1Migrations, s as migrateD1 } from "../../runner-CVeq0266.mjs";
|
|
2
2
|
import "../../d1-binding-D6HZa3ks.mjs";
|
|
3
3
|
import "../../dialect-helpers-C6xtO-Ui.mjs";
|
|
4
|
-
import "../../migrations-
|
|
5
|
-
import "../../state-
|
|
6
|
-
import { n as compileD1Schema, t as migrateD1Release } from "../../release-
|
|
4
|
+
import "../../migrations-C7YXse7V.mjs";
|
|
5
|
+
import "../../state-D8AogXCV.mjs";
|
|
6
|
+
import { n as compileD1Schema, t as migrateD1Release } from "../../release-CZfAeyXm.mjs";
|
|
7
7
|
|
|
8
8
|
export { assertD1Migrations, compileD1Schema, migrateD1, migrateD1Release };
|
package/dist/db/d1.d.mts
CHANGED
package/dist/db/d1.mjs
CHANGED
package/dist/db/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-
|
|
3
|
-
import { a as PostgresConfig, c as libsql, i as LibsqlConfig, l as postgres, n as DatabaseDescriptor, o as SqliteConfig, r as DatabaseDialectType, s as d1, t as D1Config, u as sqlite } from "../adapters-
|
|
1
|
+
import "../types-CVRNRAA5.mjs";
|
|
2
|
+
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-Cxl-vyk2.mjs";
|
|
3
|
+
import { a as PostgresConfig, c as libsql, i as LibsqlConfig, l as postgres, n as DatabaseDescriptor, o as SqliteConfig, r as DatabaseDialectType, s as d1, t as D1Config, u as sqlite } from "../adapters-Rol-inz6.mjs";
|
|
4
4
|
export { type D1Config, type DatabaseDescriptor, type DatabaseDialectType, type LibsqlConfig, type MigrationStatus, type PostgresConfig, type SqliteConfig, d1, getMigrationStatus, libsql, postgres, rollbackMigration, runMigrations, sqlite };
|
package/dist/db/libsql.d.mts
CHANGED
package/dist/db/postgres.d.mts
CHANGED
package/dist/db/sqlite.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AtomicWriteConflict, atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
2
|
import { r as currentIsoTimestampValue } from "./dialect-helpers-C6xtO-Ui.mjs";
|
|
3
|
-
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-
|
|
4
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
5
|
-
import { t as readTokenAuthority } from "./oauth-authority-
|
|
3
|
+
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-DA18zxza.mjs";
|
|
4
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-fzJHB3ZI.mjs";
|
|
5
|
+
import { t as readTokenAuthority } from "./oauth-authority-DOjME4Hh.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
import { clampScopes, toRoleLevel } from "@dineway-ai/auth";
|
|
8
8
|
import { generateCodeVerifier } from "arctic";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
2
2
|
import { i as encodeCursor, r as decodeCursor } from "./types-BqxIv8Il.mjs";
|
|
3
|
-
import { n as publicDiscoveryExclusions } from "./public-discovery-
|
|
4
|
-
import { n as SchemaRegistry } from "./registry-
|
|
5
|
-
import { t as resolveContentUrl } from "./public-url-
|
|
3
|
+
import { n as publicDiscoveryExclusions } from "./public-discovery-CTql6jdZ.mjs";
|
|
4
|
+
import { n as SchemaRegistry } from "./registry-DcV93OL_.mjs";
|
|
5
|
+
import { t as resolveContentUrl } from "./public-url-DNt9A1yS.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
|
|
8
8
|
//#region src/seo/canonical-url.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as encodeBase64url } from "./base64-Cz-aU0X1.mjs";
|
|
2
|
-
import { t as MediaRepository } from "./media-
|
|
2
|
+
import { t as MediaRepository } from "./media-BZqwtRTZ.mjs";
|
|
3
3
|
import { t as buildStableHash } from "./stable-hash-DEtJgcp7.mjs";
|
|
4
|
-
import { a as selectActiveBriefingContextEntries, d as ContextRepository, i as parseSiteBriefingScope } from "./briefing-
|
|
5
|
-
import { n as sha256, s as readBoundedBytes } from "./runs-
|
|
6
|
-
import { c as loadContentMediaUsageFields } from "./content-refresh-
|
|
7
|
-
import { r as ssrfSafeFetch } from "./ssrf-
|
|
4
|
+
import { a as selectActiveBriefingContextEntries, d as ContextRepository, i as parseSiteBriefingScope } from "./briefing-5zf0YZbR.mjs";
|
|
5
|
+
import { n as sha256, s as readBoundedBytes } from "./runs-B8kCirJ6.mjs";
|
|
6
|
+
import { c as loadContentMediaUsageFields } from "./content-refresh-9M9cc55-.mjs";
|
|
7
|
+
import { r as ssrfSafeFetch } from "./ssrf-COxLChKv.mjs";
|
|
8
8
|
import { imageSize } from "image-size";
|
|
9
9
|
|
|
10
10
|
//#region src/review-automation/evidence.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as HitlRequestService } from "./site-context-
|
|
2
|
-
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-
|
|
1
|
+
import { b as HitlRequestService } from "./site-context-D9oETfxF.mjs";
|
|
2
|
+
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-fzJHB3ZI.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/hitl-requests.ts
|
|
5
5
|
const HITL_NOT_FOUND_RE = /not found/i;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as resolveActorIdentity } from "./actor-DxUAJgQX.mjs";
|
|
2
|
-
import { t as WorkflowHitlCoordinator } from "./site-context-
|
|
3
|
-
import { t as apiError } from "./error-
|
|
4
|
-
import { p as logSiteActivitySafely } from "./activity-events-
|
|
5
|
-
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-
|
|
2
|
+
import { t as WorkflowHitlCoordinator } from "./site-context-D9oETfxF.mjs";
|
|
3
|
+
import { t as apiError } from "./error-B-44r5TD.mjs";
|
|
4
|
+
import { p as logSiteActivitySafely } from "./activity-events-CiFN61xq.mjs";
|
|
5
|
+
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-fzJHB3ZI.mjs";
|
|
6
6
|
import { Role } from "@dineway-ai/auth";
|
|
7
7
|
|
|
8
8
|
//#region src/api/hitl-route-helpers.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as slugify } from "./slugify-Di8Q_MFq.mjs";
|
|
2
2
|
import { t as TaxonomyRepository } from "./taxonomy-DWxxLpp5.mjs";
|
|
3
3
|
import { t as OptionsRepository } from "./options-BcqHWpc-.mjs";
|
|
4
|
-
import { a as validateExternalUrl, n as resolveAndValidateExternalUrl, r as ssrfSafeFetch } from "./ssrf-
|
|
5
|
-
import { o as invalidateSiteSettingsCache } from "./settings-
|
|
6
|
-
import { n as resolveLocaleChain } from "./resolve-
|
|
7
|
-
import { l as invalidateTermCache } from "./taxonomies-
|
|
8
|
-
import { n as parseWxrString } from "./parser-
|
|
9
|
-
import { _ as sanitizeFieldSlug, a as getFilenameFromUrl, c as isInternalMetaKey, d as mapMetaKeyToField, f as mapPostTypeToCollection, h as relativizeContentLinks, i as checkSchemaCompatibility, l as isInternalPostType, m as normalizeUrl$1, n as FEATURED_IMAGE_FIELD, o as guessMimeType, p as mapWpStatus, r as buildAttachmentMap, s as inferMetaType, t as BASE_REQUIRED_FIELDS, u as isPluginBookkeepingMeta } from "./utils-
|
|
4
|
+
import { a as validateExternalUrl, n as resolveAndValidateExternalUrl, r as ssrfSafeFetch } from "./ssrf-COxLChKv.mjs";
|
|
5
|
+
import { o as invalidateSiteSettingsCache } from "./settings-DRFy8JQx.mjs";
|
|
6
|
+
import { n as resolveLocaleChain } from "./resolve-CpOV2jt_.mjs";
|
|
7
|
+
import { l as invalidateTermCache } from "./taxonomies-DW6Fps-w.mjs";
|
|
8
|
+
import { n as parseWxrString } from "./parser-ehIlj32k.mjs";
|
|
9
|
+
import { _ as sanitizeFieldSlug, a as getFilenameFromUrl, c as isInternalMetaKey, d as mapMetaKeyToField, f as mapPostTypeToCollection, h as relativizeContentLinks, i as checkSchemaCompatibility, l as isInternalPostType, m as normalizeUrl$1, n as FEATURED_IMAGE_FIELD, o as guessMimeType, p as mapWpStatus, r as buildAttachmentMap, s as inferMetaType, t as BASE_REQUIRED_FIELDS, u as isPluginBookkeepingMeta } from "./utils-BoWkoty8.mjs";
|
|
10
10
|
import { ulid } from "ulidx";
|
|
11
11
|
import { gutenbergToPortableText } from "@dineway-ai/gutenberg-to-portable-text";
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ContentBylineCredit, t as BylineSummary, u as FindManyResult } from "./types-
|
|
2
|
-
import { t as Database } from "./types-
|
|
1
|
+
import { n as ContentBylineCredit, t as BylineSummary, u as FindManyResult } from "./types-BFoQ5a1v.mjs";
|
|
2
|
+
import { t as Database } from "./types-CVRNRAA5.mjs";
|
|
3
3
|
import { AtomicBatch } from "./database/batch.mjs";
|
|
4
|
-
import { d as ImportSource, g as ProbeResult } from "./types-
|
|
4
|
+
import { d as ImportSource, g as ProbeResult } from "./types-CAD4OvmF.mjs";
|
|
5
5
|
import { Kysely } from "kysely";
|
|
6
6
|
import { PortableTextBlock } from "@dineway-ai/gutenberg-to-portable-text";
|
|
7
7
|
import { Readable } from "node:stream";
|