dineway 0.1.45 → 0.1.47
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-CpcTzKpF.mjs → activity-events-CNk3clTT.mjs} +1 -1
- package/dist/{allowed-origins-3RuuoFjC.mjs → allowed-origins-QirBXiDj.mjs} +1 -1
- package/dist/api/route-utils.d.mts +9 -10
- package/dist/api/route-utils.mjs +13 -13
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +4 -4
- package/dist/{api-DkFSCD74.mjs → api-ePsOhL3q.mjs} +101 -56
- package/dist/{api-tokens-BFg7tiOQ.mjs → api-tokens-DtvdtIkm.mjs} +1 -1
- package/dist/{apply-TIoQ00aH.mjs → apply-BpRBCqUt.mjs} +76 -31
- package/dist/astro/index.d.mts +10 -11
- package/dist/astro/index.mjs +23 -3
- package/dist/astro/middleware/auth.d.mts +9 -10
- package/dist/astro/middleware/auth.mjs +5 -5
- package/dist/astro/middleware/redirect.mjs +13 -7
- package/dist/astro/middleware/request-context.mjs +3 -3
- 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.mjs +120 -82
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- 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 +17 -17
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts +7 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +17 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts +9 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +38 -0
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +31 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts +7 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +24 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +27 -27
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts +8 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +57 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs +30 -26
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +27 -27
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +27 -27
- package/dist/astro/routes/api/admin/context/diff.mjs +26 -26
- package/dist/astro/routes/api/admin/context/index.mjs +27 -27
- package/dist/astro/routes/api/admin/context/stale.mjs +26 -26
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +26 -26
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +26 -26
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -24
- 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 +48 -44
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +48 -44
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -38
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +47 -43
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +47 -43
- package/dist/astro/routes/api/admin/plugins/index.mjs +42 -38
- 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 -38
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +47 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -38
- package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -38
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +26 -26
- package/dist/astro/routes/api/admin/review-requests/index.mjs +9 -9
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -38
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -38
- 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 +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +20 -11
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +20 -14
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +12 -10
- package/dist/astro/routes/api/content/_collection_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- 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 +10 -10
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/execute.mjs +29 -28
- package/dist/astro/routes/api/import/wordpress/media.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -31
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +5 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +16 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +30 -30
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +31 -30
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +75 -50
- package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- 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 +14 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +27 -27
- package/dist/astro/routes/api/menus/_name_/items.mjs +27 -27
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +27 -27
- package/dist/astro/routes/api/menus/_name_/translations.mjs +27 -27
- package/dist/astro/routes/api/menus/_name_.mjs +27 -27
- package/dist/astro/routes/api/menus/index.mjs +27 -27
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +10 -7
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +28 -28
- package/dist/astro/routes/api/redirects/index.mjs +28 -28
- 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 +43 -39
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +43 -39
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +43 -39
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +43 -39
- package/dist/astro/routes/api/schema/collections/index.mjs +43 -39
- package/dist/astro/routes/api/schema/index.mjs +7 -7
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -38
- package/dist/astro/routes/api/schema/orphans/index.mjs +42 -38
- package/dist/astro/routes/api/search/enable.mjs +11 -11
- package/dist/astro/routes/api/search/index.mjs +10 -10
- package/dist/astro/routes/api/search/rebuild.mjs +11 -11
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +10 -10
- package/dist/astro/routes/api/sections/_slug_.mjs +27 -27
- package/dist/astro/routes/api/sections/index.mjs +27 -27
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +27 -27
- package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
- package/dist/astro/routes/api/setup/admin.mjs +9 -9
- package/dist/astro/routes/api/setup/dev-bypass.mjs +24 -23
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +25 -24
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +7 -6
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +30 -29
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +30 -29
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +30 -29
- package/dist/astro/routes/api/taxonomies/index.mjs +30 -29
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- 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 +26 -26
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +27 -27
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +27 -27
- package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -25
- package/dist/astro/routes/api/widget-areas/index.mjs +27 -27
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +7 -7
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +59 -15
- package/dist/astro/routes/sitemap.xml.mjs +8 -8
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +3 -3
- package/dist/astro/types.d.mts +16 -14
- package/dist/{audit-NgiRzqP9.mjs → audit-DuRbTm8L.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-1FHtkDP6.mjs → auth-control-guard-Dr14I98m.mjs} +1 -1
- package/dist/{authorize-BbIhZi3a.mjs → authorize-BLO0m7fW.mjs} +1 -1
- package/dist/{briefing-Jsxs587i.mjs → briefing-BFEWeJtR.mjs} +6 -6
- package/dist/{briefing-DD82WaEy.mjs → briefing-C4fJSVYW.mjs} +1 -1
- package/dist/byline-CXQcMsBu.mjs +628 -0
- package/dist/{bylines-BU6b8jSi.d.mts → byline-fields-Cuo-JI3B.d.mts} +150 -19
- package/dist/{import-Br7aP9yh.mjs → byline-fields-D7TJ_oHF.mjs} +57 -3
- package/dist/byline-fields-Dc7L6Yry.mjs +113 -0
- package/dist/byline-registry-CL8BxPPp.mjs +287 -0
- package/dist/bylines-BgriNlW7.mjs +165 -0
- package/dist/bylines-D2vqm1aZ.mjs +163 -0
- package/dist/{cache-DQyZ-QaB.mjs → cache-GRK71jOU.mjs} +2 -2
- package/dist/{chunks-D8KL0nCY.mjs → chunks-DgEw12Bc.mjs} +1 -1
- package/dist/cli/index.mjs +993 -90
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +2 -1
- package/dist/client/index.mjs +5 -2
- package/dist/{comment-BmJXz3lc.mjs → comment-ogMaF1gk.mjs} +1 -1
- package/dist/{comments-yTbeIYc2.mjs → comments-CTSOKrZq.mjs} +1 -1
- package/dist/{connection-BCNICDWN.mjs → connection-CiJWiWya.mjs} +44 -13
- package/dist/{content-DvpMad_N.mjs → content-BfyjOiMi.mjs} +24 -4
- package/dist/content-index-names-Bbu1FY1r.mjs +26 -0
- package/dist/{context-DgqEfcWz.mjs → context-CdsYb1m8.mjs} +2 -2
- package/dist/{context-Ufrm1lOv.mjs → context-ZMHhwzkG.mjs} +8 -8
- package/dist/{context-route-helpers-Dq5U_AXp.mjs → context-route-helpers-YLWx2N1j.mjs} +1 -1
- package/dist/{dashboard-BC9bgPOH.mjs → dashboard-D0gWuzNp.mjs} +4 -4
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.mjs +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/{device-flow-CTS91g4A.mjs → device-flow-B3_FEoMI.mjs} +4 -4
- package/dist/{dialect-helpers-TkdbkFad.mjs → dialect-helpers-fk43GbDb.mjs} +13 -3
- package/dist/{fts-manager-DnfOsF4s.mjs → fts-manager-EHY2Kes9.mjs} +2 -2
- package/dist/{hitl-requests-DaRuZ7tb.mjs → hitl-requests-B1Zqgut6.mjs} +2 -2
- package/dist/{hitl-route-helpers-DcPySbZ3.mjs → hitl-route-helpers-CjpWUMuw.mjs} +4 -4
- package/dist/{import-DSXK3aQF.mjs → import-CvHY6sf5.mjs} +3 -3
- package/dist/{index-BwOO3vu2.d.mts → index-DJVaYiUV.d.mts} +2 -2
- package/dist/index.d.mts +16 -17
- package/dist/index.mjs +69 -65
- package/dist/{jsonld-CLbYsYYH.d.mts → jsonld-AcPnCEGD.d.mts} +2 -2
- package/dist/{load-BCCcmoW9.mjs → load-BdbvtoDb.mjs} +1 -1
- package/dist/{loader-p2imNN98.mjs → loader-Y0QvC_QO.mjs} +167 -61
- package/dist/media/index.d.mts +1 -2
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +11 -12
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-Cg4zc9fq.mjs → media-DhBwiCYR.mjs} +6 -1
- package/dist/{media-allowlist-D8gsm8_t.mjs → media-allowlist-BsXkT9RK.mjs} +1 -1
- package/dist/{menus-DOaL6NaF.mjs → menus-BzGQpw9d.mjs} +2 -2
- package/dist/{menus-DzG3-9tQ.mjs → menus-fqqzXyHd.mjs} +5 -5
- package/dist/{oauth-authorization-DyOFXQWq.mjs → oauth-authorization-DsF81vki.mjs} +4 -4
- package/dist/{oauth-clients-BMs_bmoz.mjs → oauth-clients-Du-V0fEm.mjs} +2 -2
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-D7Tu6ku4.mjs → parse-CneSgl7-.mjs} +1 -1
- package/dist/{types-cn-fvYQ1.d.mts → placeholder-CXfoCtCd.d.mts} +38 -1
- package/dist/plugin-utils.d.mts +22 -10
- package/dist/plugin-utils.mjs +8 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-DCDVDF4B.mjs → plugins-BQ5Joz6v.mjs} +36 -6
- package/dist/{preview-BhgxNRWI.mjs → preview-D5rvDhRt.mjs} +7 -7
- package/dist/{provider-loader-B19YyyBp.d.mts → provider-loader-B5PMjpN7.d.mts} +1 -1
- package/dist/{query-BnRpB09I.mjs → query-BJuUydtD.mjs} +3 -3
- package/dist/{query-DHvNhBhi.mjs → query-CSx0EdSW.mjs} +30 -18
- package/dist/{rate-limit-BWP_kKiZ.mjs → rate-limit-i0G3IAOX.mjs} +2 -2
- package/dist/{redirect-BaVvo2te.mjs → redirect-BqFMj67n.mjs} +20 -6
- package/dist/{redirects-Ba-lJA5j.mjs → redirects-CJwHl_YG.mjs} +3 -3
- package/dist/{redirects-x5ol_Qj9.mjs → redirects-q_cToaHv.mjs} +29 -8
- package/dist/{registry-i__XP2WV.mjs → registry-Cq3QRBW2.mjs} +14 -5
- package/dist/{request-cache-BpwuE2ix.mjs → request-cache-w5cj5itT.mjs} +9 -1
- package/dist/{request-meta-DUGfAeXy.mjs → request-meta-DAb6xaP9.mjs} +1 -1
- package/dist/resolve-DTuDyYKs.mjs +100 -0
- package/dist/{review-requests-DuIxM4YM.mjs → review-requests-GYqjl2jO.mjs} +1 -1
- package/dist/{review-requests-CTUU_RJm.mjs → review-requests-tPw8_pAO.mjs} +1 -1
- package/dist/{runner-FhUNNaqA.d.mts → runner-Cnz4dl0f.d.mts} +1 -1
- package/dist/{runner-DF2DgD_B.mjs → runner-DTfG5v0G.mjs} +574 -196
- package/dist/{runtime-1bE80cmL.d.mts → runtime-Cd-kjPfN.d.mts} +1155 -273
- package/dist/runtime.d.mts +10 -11
- package/dist/runtime.mjs +4 -4
- package/dist/schema-DmHMWnSA.mjs +8 -0
- package/dist/{search-Cl9preJT.mjs → search-BAiFLz81.mjs} +3 -3
- package/dist/{sections-Zx-2q9IH.mjs → sections-DsuIrFDC.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +18 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -0
- package/dist/{seo-CJBiMDkj.mjs → seo-5lJOtB5J.mjs} +4 -2
- package/dist/{seo-BPb_reaG.mjs → seo-uMFBaR8G.mjs} +1 -1
- package/dist/{service-wPGgmbUa.mjs → service-CifrxCru.mjs} +2 -2
- package/dist/{settings-nr15a8uv.mjs → settings-BYGdocdj.mjs} +2 -2
- package/dist/{settings-DORe02PC.mjs → settings-DNRQuX3d.mjs} +3 -3
- package/dist/{site-activity-KFZprBZM.mjs → site-activity-6x1JccoR.mjs} +1 -1
- package/dist/{site-context-DuBQk6Mp.mjs → site-context-c1ZFa_OF.mjs} +13 -13
- 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 +1 -1
- package/dist/{taxonomies-DGaw_-aU.mjs → taxonomies-CQFmkP5u.mjs} +3 -3
- package/dist/{taxonomies-BVBKoXRf.mjs → taxonomies-faQVeMgj.mjs} +7 -32
- package/dist/{taxonomy-BvXRL85P.mjs → taxonomy-BnH-6VsX.mjs} +2 -2
- package/dist/{types-DvwHUku7.d.mts → types-B7_vSiPD.d.mts} +16 -0
- package/dist/{types-D1DjBFA9.mjs → types-Ck7-WoUD.mjs} +1 -1
- package/dist/{types-t7_nCCA9.d.mts → types-DEAQG87T.d.mts} +2 -56
- package/dist/{types-C-CMfzSl.d.mts → types-DYKtk8f1.d.mts} +31 -0
- package/dist/{types-C3Em8xpG.mjs → types-DbZhHtqS.mjs} +23 -1
- package/dist/{types-BIM7jwxr.d.mts → types-UGmU5sWx.d.mts} +1 -1
- package/dist/types-nP9vGUFq.d.mts +56 -0
- package/dist/ui/server-runtime.d.mts +13 -7
- package/dist/ui/server-runtime.mjs +18 -17
- package/dist/{user-2aI21yV1.mjs → user-CqZwN21P.mjs} +1 -1
- package/dist/{validate-CvQ6cvHH.d.mts → validate-BJuG-ISL.d.mts} +21 -3
- package/dist/{validate-JE-WfUQ5.mjs → validate-CK4a1sIF.mjs} +22 -2
- package/dist/version-Cb1tZ6s_.mjs +6 -0
- package/dist/{widgets-Cj6ULpED.mjs → widgets-CdDvF4fV.mjs} +2 -2
- package/dist/{wordpress-slugs-hqItqJrQ.mjs → wordpress-slugs-B6Gw9q3Q.mjs} +1 -1
- package/dist/{zod-generator-C4BgFBZV.mjs → zod-generator-D1ROBNuC.mjs} +2 -2
- package/package.json +7 -8
- package/src/components/InlinePortableTextEditor.tsx +66 -0
- package/src/components/code-block-languages.ts +76 -0
- package/src/components/inline-code-block.tsx +241 -0
- package/dist/byline-DpNNSjET.mjs +0 -219
- package/dist/bylines-75_STR73.mjs +0 -114
- package/dist/chunk-ClPoSABd.mjs +0 -21
- package/dist/db-errors-DHJCB_gY.mjs +0 -23
- package/dist/index-Ct0pjZwW.d.mts +0 -835
- package/dist/placeholder-BZpCpid_.d.mts +0 -40
- package/dist/schema-U-SeFWwn.mjs +0 -8
- package/dist/version-DTpFm69w.mjs +0 -6
- /package/dist/{adapters-kZjS7plb.d.mts → adapters-OQCImOL7.d.mts} +0 -0
- /package/dist/{api-tokens-L0o9Bd7v.mjs → api-tokens-CYUoFGo7.mjs} +0 -0
- /package/dist/{challenge-store-cJam-E5R.mjs → challenge-store-DFxX0_15.mjs} +0 -0
- /package/dist/{components-BJfa-F6n.mjs → components--pg6zBvu.mjs} +0 -0
- /package/dist/{config-XW5tMrH8.mjs → config-CVssduLe.mjs} +0 -0
- /package/dist/{context-types-BrSQNye5.mjs → context-types-DQh_XKkn.mjs} +0 -0
- /package/dist/{cron-D7FDsRu-.mjs → cron-DxCAU_Sn.mjs} +0 -0
- /package/dist/{default-5A3XVR7L.mjs → default-BHauvIdG.mjs} +0 -0
- /package/dist/{email-console-Bs1qKx59.mjs → email-console-BOVqIYpB.mjs} +0 -0
- /package/dist/{error-DLkgOP5m.mjs → error-DCSuUAZW.mjs} +0 -0
- /package/dist/{escape-r8_GbEU2.mjs → escape-BDgouFFY.mjs} +0 -0
- /package/dist/{experimental-workflows-BbZbIEZp.mjs → experimental-workflows-CSMffP6q.mjs} +0 -0
- /package/dist/{hash-DFFrkivP.mjs → hash-BPmX6P8I.mjs} +0 -0
- /package/dist/{manifest-schema-C6fzQoWn.mjs → manifest-schema-qh2P7RDX.mjs} +0 -0
- /package/dist/{mime-DYP4V5Ks.mjs → mime-8pAB8-77.mjs} +0 -0
- /package/dist/{mode-Bd55iLcP.mjs → mode-CZqCF9dZ.mjs} +0 -0
- /package/dist/{normalize-BY_EJnd9.mjs → normalize-O-hi3a27.mjs} +0 -0
- /package/dist/{oauth-state-store-BRSUEkmx.mjs → oauth-state-store-qncPB_IU.mjs} +0 -0
- /package/dist/{oauth-user-lookup-DdcI8ZVL.mjs → oauth-user-lookup-BFjWF8wK.mjs} +0 -0
- /package/dist/{parser-egIGEco-.mjs → parser-DxfsARXL.mjs} +0 -0
- /package/dist/{passkey-config-AX4sjpQ4.mjs → passkey-config-DzHQK90v.mjs} +0 -0
- /package/dist/{patterns-CiyXeDgr.mjs → patterns-D9iDO3j8.mjs} +0 -0
- /package/dist/{placeholder-b0Ufu0La.mjs → placeholder-BDo81Is5.mjs} +0 -0
- /package/dist/{provider-loader-BdRV01gr.mjs → provider-loader-DzUxejk7.mjs} +0 -0
- /package/dist/{public-url-BL2r8dmQ.mjs → public-url-DLUM5OOv.mjs} +0 -0
- /package/dist/{redirect-Ce_6Yb6z.mjs → redirect-BjIBtDWY.mjs} +0 -0
- /package/dist/{secrets-DfeNNoLa.mjs → secrets-CPoFLJjm.mjs} +0 -0
- /package/dist/{seo-contributions-C0LXoWw3.mjs → seo-contributions-CqVvReEj.mjs} +0 -0
- /package/dist/{setup-complete-C2ztsNhJ.mjs → setup-complete-4EiBS1E5.mjs} +0 -0
- /package/dist/{setup-nonce-BTKq7uBi.mjs → setup-nonce-pyGfc9hV.mjs} +0 -0
- /package/dist/{sidecar-client-lrf7ErYJ.mjs → sidecar-client-mJxwayYN.mjs} +0 -0
- /package/dist/{site-url-C18yBhtv.mjs → site-url-C-cu8Ff2.mjs} +0 -0
- /package/dist/{ssrf-KAIQS48_.mjs → ssrf-DiKqWd3N.mjs} +0 -0
- /package/dist/{tokens-CsP8Se8S.mjs → tokens-CjSgb0AC.mjs} +0 -0
- /package/dist/{transport-nNEGdHkI.d.mts → transport-DidKKxvW.d.mts} +0 -0
- /package/dist/{transport-B7kO-4ee.mjs → transport-LSdZVXHF.mjs} +0 -0
- /package/dist/{trusted-proxy-Bbm6PLR6.mjs → trusted-proxy-BgIIcbsN.mjs} +0 -0
- /package/dist/{types-CNNQ8l0v.mjs → types-Cg276-3z.mjs} +0 -0
- /package/dist/{types-BYjPylrZ.d.mts → types-DZpT-PnG.d.mts} +0 -0
- /package/dist/{types-BgE6gMFI.d.mts → types-Dryvv7LH.d.mts} +0 -0
- /package/dist/{types-BBETcziA.d.mts → types-GaCtZ1k9.d.mts} +0 -0
- /package/dist/{url-BzhfYtRn.mjs → url-w7Mp5qAD.mjs} +0 -0
- /package/dist/{utils-FEbQMgB5.mjs → utils-wv-zvC-Y.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as withTransaction } from "./transaction-D0FOsb3X.mjs";
|
|
2
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
3
|
-
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-
|
|
4
|
-
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-
|
|
5
|
-
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-
|
|
2
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-CSMffP6q.mjs";
|
|
3
|
+
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-CYUoFGo7.mjs";
|
|
4
|
+
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-Du-V0fEm.mjs";
|
|
5
|
+
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-BFjWF8wK.mjs";
|
|
6
6
|
import { clampScopes, computeS256Challenge, secureCompare } from "@dineway-ai/auth";
|
|
7
7
|
import { generateCodeVerifier } from "arctic";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
2
|
-
import { s as validateScopes } from "./api-tokens-
|
|
1
|
+
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-CSMffP6q.mjs";
|
|
2
|
+
import { s as validateScopes } from "./api-tokens-CYUoFGo7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/oauth/redirect-uri.ts
|
|
5
5
|
/**
|
package/dist/page/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as PageMetadataContribution, D as PageFragmentContribution, q as PublicPageContext } from "../types-
|
|
2
|
-
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as resolvePageMetadata, f as safeJsonLdSerialize, i as generateBaseSeoContributions, l as escapeHtmlAttr, m as createPublicPageContext, n as buildWebSiteJsonLd, o as renderFragments, p as CreatePublicPageContextInput, r as cleanJsonLd, s as resolveFragments, t as buildBlogPostingJsonLd, u as renderPageMetadata } from "../jsonld-
|
|
1
|
+
import { A as PageMetadataContribution, D as PageFragmentContribution, q as PublicPageContext } from "../types-UGmU5sWx.mjs";
|
|
2
|
+
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as resolvePageMetadata, f as safeJsonLdSerialize, i as generateBaseSeoContributions, l as escapeHtmlAttr, m as createPublicPageContext, n as buildWebSiteJsonLd, o as renderFragments, p as CreatePublicPageContextInput, r as cleanJsonLd, s as resolveFragments, t as buildBlogPostingJsonLd, u as renderPageMetadata } from "../jsonld-AcPnCEGD.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/page/index.d.ts
|
|
5
5
|
/**
|
package/dist/page/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as cleanJsonLd, c as escapeHtmlAttr, d as safeJsonLdSerialize, f as createPublicPageContext, i as buildWebSiteJsonLd, l as renderPageMetadata, n as generateSiteSeoContributions, o as renderFragments, r as buildBlogPostingJsonLd, s as resolveFragments, t as generateBaseSeoContributions, u as resolvePageMetadata } from "../seo-contributions-
|
|
1
|
+
import { a as cleanJsonLd, c as escapeHtmlAttr, d as safeJsonLdSerialize, f as createPublicPageContext, i as buildWebSiteJsonLd, l as renderPageMetadata, n as generateSiteSeoContributions, o as renderFragments, r as buildBlogPostingJsonLd, s as resolveFragments, t as generateBaseSeoContributions, u as resolvePageMetadata } from "../seo-contributions-CqVvReEj.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/page/index.ts
|
|
4
4
|
/**
|
|
@@ -243,4 +243,41 @@ interface MediaValue {
|
|
|
243
243
|
*/
|
|
244
244
|
declare function mediaItemToValue(providerId: string, item: MediaProviderItem): MediaValue;
|
|
245
245
|
//#endregion
|
|
246
|
-
|
|
246
|
+
//#region src/media/normalize.d.ts
|
|
247
|
+
/**
|
|
248
|
+
* Normalize a media field value into a consistent MediaValue shape.
|
|
249
|
+
*
|
|
250
|
+
* - `null`/`undefined` → `null`
|
|
251
|
+
* - Bare URL string → `{ provider: "external", id: "", src: url }`
|
|
252
|
+
* - Bare internal media URL → resolved via local provider's `get()`
|
|
253
|
+
* - Object with `provider` + `id` → enriched with missing fields from provider
|
|
254
|
+
*/
|
|
255
|
+
declare function normalizeMediaValue(value: unknown, getProvider: (id: string) => MediaProvider | undefined): Promise<MediaValue | null>;
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/media/placeholder.d.ts
|
|
258
|
+
/**
|
|
259
|
+
* Image Placeholder Generation
|
|
260
|
+
*
|
|
261
|
+
* Generates blurhash and dominant color from image buffers for LQIP support.
|
|
262
|
+
* Decodes images via jpeg-js (pure JS) and upng-js (pure JS, uses pako for
|
|
263
|
+
* deflate). No native image bindings required, so it works in server runtimes.
|
|
264
|
+
*/
|
|
265
|
+
interface PlaceholderData {
|
|
266
|
+
blurhash: string;
|
|
267
|
+
dominantColor: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Generate blurhash and dominant color from an image buffer.
|
|
271
|
+
* Returns null for non-image MIME types or on failure.
|
|
272
|
+
*
|
|
273
|
+
* @param dimensions - Optional pre-known dimensions. Used as a fallback when
|
|
274
|
+
* image-size cannot parse the buffer (e.g. truncated headers). When the
|
|
275
|
+
* decoded size (width * height * 4) exceeds MAX_DECODED_BYTES, placeholder
|
|
276
|
+
* generation is skipped to avoid OOM on memory-constrained runtimes.
|
|
277
|
+
*/
|
|
278
|
+
declare function generatePlaceholder(buffer: Uint8Array, mimeType: string, dimensions?: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
}): Promise<PlaceholderData | null>;
|
|
282
|
+
//#endregion
|
|
283
|
+
export { MediaValue as _, ComponentEmbed as a, mediaItemToValue as b, EmbedResult as c, MediaListResult as d, MediaProvider as f, MediaUploadInput as g, MediaProviderItem as h, AudioEmbed as i, ImageEmbed as l, MediaProviderDescriptor as m, generatePlaceholder as n, CreateMediaProviderFn as o, MediaProviderCapabilities as p, normalizeMediaValue as r, EmbedOptions as s, PlaceholderData as t, MediaListOptions as u, ThumbnailOptions as v, VideoEmbed as y };
|
package/dist/plugin-utils.d.mts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import "./runtime-Cd-kjPfN.mjs";
|
|
2
|
+
import "./types-DYKtk8f1.mjs";
|
|
3
|
+
import "./types-UGmU5sWx.mjs";
|
|
4
|
+
import "./types-Dryvv7LH.mjs";
|
|
5
|
+
import "./runner-Cnz4dl0f.mjs";
|
|
6
|
+
import "./index-DJVaYiUV.mjs";
|
|
7
|
+
import "./byline-fields-Cuo-JI3B.mjs";
|
|
8
|
+
import "./types-GaCtZ1k9.mjs";
|
|
9
|
+
import "./validate-BJuG-ISL.mjs";
|
|
10
|
+
import { DinewayHandlers } from "./astro/types.mjs";
|
|
11
|
+
|
|
1
12
|
//#region src/plugin-utils.d.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* Import as: `import { apiFetch, parseApiResponse, isRecord } from "dineway/plugin-utils";`
|
|
10
|
-
*/
|
|
13
|
+
type PublicPluginApiRouteHandler = DinewayHandlers["handlePublicPluginApiRoute"];
|
|
14
|
+
interface PublicPluginRuntimeLocals {
|
|
15
|
+
dineway?: {
|
|
16
|
+
handlePublicPluginApiRoute?: PublicPluginApiRouteHandler;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
11
19
|
/**
|
|
12
20
|
* Fetch wrapper that adds the `X-Dineway-Request` CSRF protection header.
|
|
13
21
|
*
|
|
@@ -15,6 +23,10 @@
|
|
|
15
23
|
* State-changing endpoints reject requests without this header.
|
|
16
24
|
*/
|
|
17
25
|
declare function apiFetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
26
|
+
/**
|
|
27
|
+
* Get the public-only plugin route dispatcher exposed to SSR page components.
|
|
28
|
+
*/
|
|
29
|
+
declare function getPublicPluginApiRouteHandler(locals: PublicPluginRuntimeLocals | null | undefined): PublicPluginApiRouteHandler | undefined;
|
|
18
30
|
/**
|
|
19
31
|
* Parse an API response, unwrapping the `{ data: T }` envelope.
|
|
20
32
|
*
|
|
@@ -54,4 +66,4 @@ declare function getErrorMessage(response: Response, fallback: string): Promise<
|
|
|
54
66
|
*/
|
|
55
67
|
declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
56
68
|
//#endregion
|
|
57
|
-
export { apiFetch, getErrorMessage, isRecord, parseApiResponse };
|
|
69
|
+
export { PublicPluginApiRouteHandler, PublicPluginRuntimeLocals, apiFetch, getErrorMessage, getPublicPluginApiRouteHandler, isRecord, parseApiResponse };
|
package/dist/plugin-utils.mjs
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
//#region src/plugin-utils.ts
|
|
2
2
|
/**
|
|
3
|
-
* Shared utilities for plugin admin UIs.
|
|
4
|
-
*
|
|
5
|
-
* Plugin admin components (`admin.tsx`) run inside the Dineway admin dashboard.
|
|
6
|
-
* This module provides the common helpers they all need: API fetching with CSRF
|
|
7
|
-
* protection, response envelope unwrapping, and type narrowing.
|
|
8
|
-
*
|
|
9
|
-
* Import as: `import { apiFetch, parseApiResponse, isRecord } from "dineway/plugin-utils";`
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
3
|
* Fetch wrapper that adds the `X-Dineway-Request` CSRF protection header.
|
|
13
4
|
*
|
|
14
5
|
* All plugin admin API calls should use this instead of raw `fetch()`.
|
|
@@ -23,6 +14,13 @@ function apiFetch(input, init) {
|
|
|
23
14
|
});
|
|
24
15
|
}
|
|
25
16
|
/**
|
|
17
|
+
* Get the public-only plugin route dispatcher exposed to SSR page components.
|
|
18
|
+
*/
|
|
19
|
+
function getPublicPluginApiRouteHandler(locals) {
|
|
20
|
+
const handler = locals?.dineway?.handlePublicPluginApiRoute;
|
|
21
|
+
return typeof handler === "function" ? handler : void 0;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
26
24
|
* Parse an API response, unwrapping the `{ data: T }` envelope.
|
|
27
25
|
*
|
|
28
26
|
* All plugin API routes return success responses wrapped in `{ data: ... }`
|
|
@@ -74,4 +72,4 @@ function isRecord(value) {
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
//#endregion
|
|
77
|
-
export { apiFetch, getErrorMessage, isRecord, parseApiResponse };
|
|
75
|
+
export { apiFetch, getErrorMessage, getPublicPluginApiRouteHandler, isRecord, parseApiResponse };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { n as PluginDescriptor } from "../runtime-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-
|
|
4
|
-
import "../types-
|
|
5
|
-
import "../runner-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../validate-CvQ6cvHH.mjs";
|
|
1
|
+
import { n as PluginDescriptor } from "../runtime-Cd-kjPfN.mjs";
|
|
2
|
+
import "../types-DYKtk8f1.mjs";
|
|
3
|
+
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-UGmU5sWx.mjs";
|
|
4
|
+
import "../types-Dryvv7LH.mjs";
|
|
5
|
+
import "../runner-Cnz4dl0f.mjs";
|
|
6
|
+
import "../index-DJVaYiUV.mjs";
|
|
7
|
+
import "../byline-fields-Cuo-JI3B.mjs";
|
|
8
|
+
import "../types-GaCtZ1k9.mjs";
|
|
9
|
+
import "../validate-BJuG-ISL.mjs";
|
|
11
10
|
|
|
12
11
|
//#region src/plugins/adapt-sandbox-entry.d.ts
|
|
13
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as OptionsRepository } from "./options-BF11H_FD.mjs";
|
|
2
|
-
import { n as createPluginContext, t as PluginContextFactory } from "./context-
|
|
3
|
-
import { t as extractRequestMeta } from "./request-meta-
|
|
4
|
-
import { r as setCronTasksEnabled } from "./cron-
|
|
2
|
+
import { n as createPluginContext, t as PluginContextFactory } from "./context-ZMHhwzkG.mjs";
|
|
3
|
+
import { t as extractRequestMeta } from "./request-meta-DAb6xaP9.mjs";
|
|
4
|
+
import { r as setCronTasksEnabled } from "./cron-DxCAU_Sn.mjs";
|
|
5
5
|
import { sql } from "kysely";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { z } from "astro/zod";
|
|
@@ -110,6 +110,7 @@ function convertNode(node) {
|
|
|
110
110
|
case "orderedList": return convertList$1(node, "number");
|
|
111
111
|
case "blockquote": return convertBlockquote(node);
|
|
112
112
|
case "codeBlock": return convertCodeBlock$1(node);
|
|
113
|
+
case "htmlBlock": return convertHtmlBlock$1(node);
|
|
113
114
|
case "image": return convertImage$1(node);
|
|
114
115
|
case "horizontalRule": return {
|
|
115
116
|
_type: "break",
|
|
@@ -235,6 +236,17 @@ function convertCodeBlock$1(node) {
|
|
|
235
236
|
};
|
|
236
237
|
}
|
|
237
238
|
/**
|
|
239
|
+
* Convert HTML block to Portable Text
|
|
240
|
+
*/
|
|
241
|
+
function convertHtmlBlock$1(node) {
|
|
242
|
+
const html = typeof node.attrs?.html === "string" ? node.attrs.html : "";
|
|
243
|
+
return {
|
|
244
|
+
_type: "htmlBlock",
|
|
245
|
+
_key: generateKey(),
|
|
246
|
+
html
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
238
250
|
* Convert image to Portable Text
|
|
239
251
|
*/
|
|
240
252
|
function convertImage$1(node) {
|
|
@@ -350,7 +362,8 @@ function portableTextToProsemirror(blocks) {
|
|
|
350
362
|
const listType = block.listItem;
|
|
351
363
|
while (i < blocks.length) {
|
|
352
364
|
const current = blocks[i];
|
|
353
|
-
if (isTextBlock(current)
|
|
365
|
+
if (!isTextBlock(current) || !current.listItem) break;
|
|
366
|
+
if ((current.level || 1) > 1 || current.listItem === listType) {
|
|
354
367
|
listBlocks.push(current);
|
|
355
368
|
i++;
|
|
356
369
|
} else break;
|
|
@@ -389,6 +402,12 @@ function isCodeBlock(block) {
|
|
|
389
402
|
return block._type === "code";
|
|
390
403
|
}
|
|
391
404
|
/**
|
|
405
|
+
* Type guard for HTML blocks
|
|
406
|
+
*/
|
|
407
|
+
function isHtmlBlock(block) {
|
|
408
|
+
return block._type === "htmlBlock";
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
392
411
|
* Convert a single Portable Text block to ProseMirror node
|
|
393
412
|
*/
|
|
394
413
|
function convertBlock(block) {
|
|
@@ -396,6 +415,7 @@ function convertBlock(block) {
|
|
|
396
415
|
if (isImageBlock(block)) return convertImage(block);
|
|
397
416
|
if (block._type === "image") return convertMalformedImage(block);
|
|
398
417
|
if (isCodeBlock(block)) return convertCodeBlock(block);
|
|
418
|
+
if (isHtmlBlock(block)) return convertHtmlBlock(block);
|
|
399
419
|
if (block._type === "break") return { type: "horizontalRule" };
|
|
400
420
|
return {
|
|
401
421
|
type: "paragraph",
|
|
@@ -473,14 +493,15 @@ function convertListItem(item, nestedItems, parentListType) {
|
|
|
473
493
|
content: spans.length > 0 ? spans : void 0
|
|
474
494
|
});
|
|
475
495
|
if (nestedItems.length > 0) {
|
|
496
|
+
const minLevel = Math.min(...nestedItems.map((nestedItem) => nestedItem.level || 2));
|
|
476
497
|
let j = 0;
|
|
477
498
|
while (j < nestedItems.length) {
|
|
478
499
|
const nestedListType = nestedItems[j].listItem || parentListType;
|
|
479
500
|
const nestedGroup = [];
|
|
480
|
-
|
|
501
|
+
do {
|
|
481
502
|
nestedGroup.push(nestedItems[j]);
|
|
482
503
|
j++;
|
|
483
|
-
}
|
|
504
|
+
} while (j < nestedItems.length && ((nestedItems[j].level || 2) > minLevel || (nestedItems[j].listItem || parentListType) === nestedListType));
|
|
484
505
|
if (nestedGroup.length > 0) {
|
|
485
506
|
const adjustedGroup = nestedGroup.map((ni) => ({
|
|
486
507
|
...ni,
|
|
@@ -612,6 +633,15 @@ function convertCodeBlock(block) {
|
|
|
612
633
|
}] : void 0
|
|
613
634
|
};
|
|
614
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* Convert HTML block to ProseMirror
|
|
638
|
+
*/
|
|
639
|
+
function convertHtmlBlock(block) {
|
|
640
|
+
return {
|
|
641
|
+
type: "htmlBlock",
|
|
642
|
+
attrs: { html: typeof block.html === "string" ? block.html : "" }
|
|
643
|
+
};
|
|
644
|
+
}
|
|
615
645
|
|
|
616
646
|
//#endregion
|
|
617
647
|
//#region src/after.ts
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { n as loadBetterSqlite3, t as createDatabase } from "./connection-CiJWiWya.mjs";
|
|
1
2
|
import { runWithContext } from "./request-context.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as generatePreviewToken } from "./tokens-CsP8Se8S.mjs";
|
|
5
|
-
import BetterSqlite3 from "better-sqlite3";
|
|
6
|
-
import { sql } from "kysely";
|
|
3
|
+
import { a as verifyPreviewSignature, t as buildPreviewSignatureHeader } from "./sidecar-client-mJxwayYN.mjs";
|
|
4
|
+
import { t as generatePreviewToken } from "./tokens-CjSgb0AC.mjs";
|
|
7
5
|
import { createHash } from "node:crypto";
|
|
6
|
+
import { sql } from "kysely";
|
|
8
7
|
import { ulid } from "ulidx";
|
|
9
8
|
import { existsSync, mkdirSync, readdirSync, rmSync, statSync } from "node:fs";
|
|
10
9
|
import { join } from "node:path";
|
|
@@ -86,7 +85,8 @@ var FileSessionDatabaseFactory = class {
|
|
|
86
85
|
this.sessionsDir = join(options.rootDir, options.sessionsDirName ?? "sessions");
|
|
87
86
|
mkdirSync(this.sessionsDir, { recursive: true });
|
|
88
87
|
this.maxDiskBytes = options.maxDiskBytes ?? Number.POSITIVE_INFINITY;
|
|
89
|
-
|
|
88
|
+
const registryPath = join(options.rootDir, options.registryFileName ?? "registry.db");
|
|
89
|
+
this.registry = new (loadBetterSqlite3())(registryPath);
|
|
90
90
|
this.registry.exec(`
|
|
91
91
|
CREATE TABLE IF NOT EXISTS session_databases (
|
|
92
92
|
id TEXT PRIMARY KEY,
|
|
@@ -120,7 +120,7 @@ var FileSessionDatabaseFactory = class {
|
|
|
120
120
|
await this.cleanup(now);
|
|
121
121
|
if (this.getActiveDiskBytes() >= this.maxDiskBytes) throw new SessionDatabaseLimitError();
|
|
122
122
|
const dbPath = this.getDbPath(input.id);
|
|
123
|
-
new
|
|
123
|
+
new (loadBetterSqlite3())(dbPath).close();
|
|
124
124
|
this.registry.prepare(`INSERT OR REPLACE INTO session_databases (
|
|
125
125
|
id, db_path, created_at, expires_at, last_touched_at
|
|
126
126
|
) VALUES (?, ?, ?, ?, ?)`).run(input.id, dbPath, now, now + input.ttlMs, now);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as SchemaRegistry } from "./registry-
|
|
3
|
-
import { r as getDb } from "./loader-
|
|
1
|
+
import { r as requestCached } from "./request-cache-w5cj5itT.mjs";
|
|
2
|
+
import { n as SchemaRegistry } from "./registry-Cq3QRBW2.mjs";
|
|
3
|
+
import { r as getDb } from "./loader-Y0QvC_QO.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/query.ts
|
|
6
6
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __exportAll } from "./runner-DTfG5v0G.mjs";
|
|
2
|
+
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-CVssduLe.mjs";
|
|
3
|
+
import { r as encodeCursor } from "./types-Ck7-WoUD.mjs";
|
|
2
4
|
import { getRequestContext } from "./request-context.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as requestCached } from "./request-cache-BpwuE2ix.mjs";
|
|
6
|
-
import { t as CURSOR_RAW_VALUES } from "./loader-p2imNN98.mjs";
|
|
7
|
-
import { t as isMissingTableError } from "./db-errors-DHJCB_gY.mjs";
|
|
5
|
+
import { r as requestCached } from "./request-cache-w5cj5itT.mjs";
|
|
6
|
+
import { a as isMissingTableError, t as CURSOR_RAW_VALUES } from "./loader-Y0QvC_QO.mjs";
|
|
8
7
|
|
|
9
8
|
//#region src/visual-editing/editable.ts
|
|
10
9
|
/**
|
|
@@ -179,10 +178,12 @@ async function getDinewayCollection(type, filter) {
|
|
|
179
178
|
const bucketed = bucketFilter(filter);
|
|
180
179
|
const cached = await requestCached(collectionCacheKey(type, bucketed.fetchFilter, resolvedLocale), async () => {
|
|
181
180
|
const { getLiveCollection } = await import("astro:content");
|
|
181
|
+
const requestedFetchLimit = bucketed.fetchFilter?.limit;
|
|
182
|
+
const liveLimit = requestedFetchLimit !== void 0 && requestedFetchLimit > 0 ? requestedFetchLimit + 1 : requestedFetchLimit;
|
|
182
183
|
const result = await getLiveCollection(COLLECTION_NAME, {
|
|
183
184
|
type,
|
|
184
185
|
status: bucketed.fetchFilter?.status,
|
|
185
|
-
limit:
|
|
186
|
+
limit: liveLimit,
|
|
186
187
|
cursor: bucketed.fetchFilter?.cursor,
|
|
187
188
|
where: bucketed.fetchFilter?.where,
|
|
188
189
|
orderBy: bucketed.fetchFilter?.orderBy,
|
|
@@ -196,8 +197,11 @@ async function getDinewayCollection(type, filter) {
|
|
|
196
197
|
error,
|
|
197
198
|
cacheHint: {}
|
|
198
199
|
};
|
|
200
|
+
const hasMore = requestedFetchLimit !== void 0 && requestedFetchLimit > 0 && entries.length > requestedFetchLimit;
|
|
201
|
+
const pageEntries = hasMore ? entries.slice(0, requestedFetchLimit) : entries;
|
|
202
|
+
const pageNextCursor = (hasMore ? encodeEntryCursor(pageEntries.at(-1), bucketed.fetchFilter?.orderBy) : void 0) ?? nextCursor;
|
|
199
203
|
const isEditMode = ctx?.editMode ?? false;
|
|
200
|
-
const entriesWithEdit =
|
|
204
|
+
const entriesWithEdit = pageEntries.map((entry) => {
|
|
201
205
|
const dbId = entryDatabaseId(entry);
|
|
202
206
|
if (isEditMode) tagEditableFields(entryData(entry), type, dbId);
|
|
203
207
|
return {
|
|
@@ -208,7 +212,7 @@ async function getDinewayCollection(type, filter) {
|
|
|
208
212
|
await Promise.all([hydrateEntryBylines(type, entriesWithEdit), hydrateEntryTerms(type, entriesWithEdit)]);
|
|
209
213
|
return {
|
|
210
214
|
entries: entriesWithEdit,
|
|
211
|
-
nextCursor,
|
|
215
|
+
nextCursor: pageNextCursor,
|
|
212
216
|
cacheHint: cacheHint ?? {}
|
|
213
217
|
};
|
|
214
218
|
});
|
|
@@ -286,9 +290,15 @@ function collectionCacheKey(type, filter, locale) {
|
|
|
286
290
|
].join("|")}`;
|
|
287
291
|
}
|
|
288
292
|
function stableStringify(value) {
|
|
293
|
+
return JSON.stringify(stableOrder(value));
|
|
294
|
+
}
|
|
295
|
+
function stableOrder(value) {
|
|
289
296
|
const ordered = {};
|
|
290
|
-
for (const key of Object.keys(value).toSorted())
|
|
291
|
-
|
|
297
|
+
for (const key of Object.keys(value).toSorted()) {
|
|
298
|
+
const child = value[key];
|
|
299
|
+
ordered[key] = isRecord(child) ? stableOrder(child) : child;
|
|
300
|
+
}
|
|
301
|
+
return ordered;
|
|
292
302
|
}
|
|
293
303
|
/**
|
|
294
304
|
* Get a single entry by type and ID/slug
|
|
@@ -436,13 +446,15 @@ async function getDinewayEntry(type, id, options) {
|
|
|
436
446
|
async function hydrateEntryBylines(type, entries) {
|
|
437
447
|
if (entries.length === 0) return;
|
|
438
448
|
try {
|
|
439
|
-
const { getBylinesForEntries } = await import("./bylines-
|
|
449
|
+
const { getBylinesForEntries } = await import("./bylines-BgriNlW7.mjs").then((n) => n.t);
|
|
440
450
|
const refs = entries.map((entry) => {
|
|
441
451
|
const data = entryData(entry);
|
|
442
452
|
const id = dataStr(data, "id");
|
|
443
453
|
return id ? {
|
|
444
454
|
id,
|
|
445
|
-
authorId: dataStr(data, "authorId") || null
|
|
455
|
+
authorId: dataStr(data, "authorId") || null,
|
|
456
|
+
primaryBylineId: dataStr(data, "primaryBylineId") || null,
|
|
457
|
+
locale: dataStr(data, "locale") || null
|
|
446
458
|
} : null;
|
|
447
459
|
}).filter((ref) => ref !== null);
|
|
448
460
|
if (refs.length === 0) return;
|
|
@@ -465,7 +477,7 @@ async function hydrateEntryBylines(type, entries) {
|
|
|
465
477
|
async function hydrateEntryTerms(type, entries) {
|
|
466
478
|
if (entries.length === 0) return;
|
|
467
479
|
try {
|
|
468
|
-
const { getAllTermsForEntries } = await import("./taxonomies-
|
|
480
|
+
const { getAllTermsForEntries } = await import("./taxonomies-faQVeMgj.mjs").then((n) => n.l);
|
|
469
481
|
const ids = entries.map((entry) => dataStr(entryData(entry), "id")).filter(Boolean);
|
|
470
482
|
if (ids.length === 0) return;
|
|
471
483
|
const termsMap = await getAllTermsForEntries(type, ids);
|
|
@@ -499,9 +511,9 @@ async function hydrateEntryTerms(type, entries) {
|
|
|
499
511
|
*/
|
|
500
512
|
async function getTranslations(type, id) {
|
|
501
513
|
try {
|
|
502
|
-
const db = (await import("./loader-
|
|
514
|
+
const db = (await import("./loader-Y0QvC_QO.mjs").then((n) => n.i)).getDb;
|
|
503
515
|
const dbInstance = await db();
|
|
504
|
-
const { ContentRepository } = await import("./content-
|
|
516
|
+
const { ContentRepository } = await import("./content-BfyjOiMi.mjs").then((n) => n.n);
|
|
505
517
|
const repo = new ContentRepository(dbInstance);
|
|
506
518
|
const item = await repo.findByIdOrSlug(type, id);
|
|
507
519
|
if (!item) return {
|
|
@@ -568,8 +580,8 @@ async function resolveDinewayPath(path) {
|
|
|
568
580
|
const hasDbOverride = !!getRequestContext()?.db;
|
|
569
581
|
let patterns = !hasDbOverride ? cachedUrlPatterns : null;
|
|
570
582
|
if (!patterns) {
|
|
571
|
-
const { getDb } = await import("./loader-
|
|
572
|
-
const { SchemaRegistry } = await import("./registry-
|
|
583
|
+
const { getDb } = await import("./loader-Y0QvC_QO.mjs").then((n) => n.i);
|
|
584
|
+
const { SchemaRegistry } = await import("./registry-Cq3QRBW2.mjs").then((n) => n.r);
|
|
573
585
|
patterns = (await new SchemaRegistry(await getDb()).listCollections()).filter((collection) => collection.urlPattern).map((collection) => {
|
|
574
586
|
const { regex, paramNames } = patternToRegex(collection.urlPattern);
|
|
575
587
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as apiError } from "./error-
|
|
2
|
-
import { n as normalizeTrustedHeaders } from "./trusted-proxy-
|
|
1
|
+
import { t as apiError } from "./error-DCSuUAZW.mjs";
|
|
2
|
+
import { n as normalizeTrustedHeaders } from "./trusted-proxy-BgIIcbsN.mjs";
|
|
3
3
|
import { sql } from "kysely";
|
|
4
4
|
|
|
5
5
|
//#region src/auth/rate-limit.ts
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as decodeCursor, r as encodeCursor } from "./types-
|
|
3
|
-
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-
|
|
1
|
+
import { a as currentTimestampValue } from "./dialect-helpers-fk43GbDb.mjs";
|
|
2
|
+
import { n as decodeCursor, r as encodeCursor } from "./types-Ck7-WoUD.mjs";
|
|
3
|
+
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-D9iDO3j8.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
import { ulid } from "ulidx";
|
|
6
6
|
|
|
7
|
+
//#region src/redirects/path.ts
|
|
8
|
+
function alternateTrailingSlashPath(pathname) {
|
|
9
|
+
if (pathname.length <= 1) return null;
|
|
10
|
+
return pathname.endsWith("/") ? pathname.slice(0, -1) : `${pathname}/`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
7
14
|
//#region src/database/repositories/redirect.ts
|
|
8
15
|
/**
|
|
9
16
|
* Hard cap on rows stored in `_dineway_404_log`. When exceeded, the oldest
|
|
@@ -112,8 +119,15 @@ var RedirectRepository = class {
|
|
|
112
119
|
return (await this.db.selectFrom("_dineway_redirects").selectAll().where("enabled", "=", 1).execute()).map(rowToRedirect);
|
|
113
120
|
}
|
|
114
121
|
async findExactMatch(path) {
|
|
115
|
-
const row = await this.
|
|
116
|
-
|
|
122
|
+
const row = await this.findExactMatchRow(path);
|
|
123
|
+
if (row) return rowToRedirect(row);
|
|
124
|
+
const alternate = alternateTrailingSlashPath(path);
|
|
125
|
+
if (!alternate) return null;
|
|
126
|
+
const alternateRow = await this.findExactMatchRow(alternate);
|
|
127
|
+
return alternateRow ? rowToRedirect(alternateRow) : null;
|
|
128
|
+
}
|
|
129
|
+
async findExactMatchRow(path) {
|
|
130
|
+
return this.db.selectFrom("_dineway_redirects").selectAll().where("source", "=", path).where("enabled", "=", 1).where("is_pattern", "=", 0).executeTakeFirst();
|
|
117
131
|
}
|
|
118
132
|
async findEnabledPatternRules() {
|
|
119
133
|
return (await this.db.selectFrom("_dineway_redirects").selectAll().where("enabled", "=", 1).where("is_pattern", "=", 1).execute()).map(rowToRedirect);
|
|
@@ -273,4 +287,4 @@ var RedirectRepository = class {
|
|
|
273
287
|
};
|
|
274
288
|
|
|
275
289
|
//#endregion
|
|
276
|
-
export { RedirectRepository as t };
|
|
290
|
+
export { alternateTrailingSlashPath as n, RedirectRepository as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as OptionsRepository } from "./options-BF11H_FD.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { i as invalidateRedirectCache } from "./cache-
|
|
2
|
+
import { t as RedirectRepository } from "./redirect-BqFMj67n.mjs";
|
|
3
|
+
import { a as validateDestinationParams, i as matchPattern, n as interpolateDestination, o as validatePattern, r as isPattern, t as compilePattern } from "./patterns-D9iDO3j8.mjs";
|
|
4
|
+
import { i as invalidateRedirectCache } from "./cache-GRK71jOU.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/redirects/loops.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as isSafeHref } from "./url-
|
|
1
|
+
import { t as isSafeHref } from "./url-w7Mp5qAD.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/api/schemas/common.ts
|
|
@@ -53,17 +53,28 @@ const countResponseSchema = z.object({ count: z.number().int().min(0) }).meta({
|
|
|
53
53
|
//#region src/api/schemas/bylines.ts
|
|
54
54
|
/** Slug pattern: lowercase letters, digits, and hyphens; must start with a letter */
|
|
55
55
|
const bylineSlugPattern = /^[a-z][a-z0-9-]*$/;
|
|
56
|
+
const customFieldValue = z.union([
|
|
57
|
+
z.string(),
|
|
58
|
+
z.boolean(),
|
|
59
|
+
z.null()
|
|
60
|
+
]);
|
|
61
|
+
const customFields = z.record(z.string(), customFieldValue);
|
|
56
62
|
const bylineSummarySchema = z.object({
|
|
57
63
|
id: z.string(),
|
|
58
64
|
slug: z.string(),
|
|
59
65
|
displayName: z.string(),
|
|
60
66
|
bio: z.string().nullable(),
|
|
61
67
|
avatarMediaId: z.string().nullable(),
|
|
68
|
+
avatarStorageKey: z.string().nullish(),
|
|
69
|
+
avatarAlt: z.string().nullish(),
|
|
62
70
|
websiteUrl: z.string().nullable(),
|
|
63
71
|
userId: z.string().nullable(),
|
|
64
72
|
isGuest: z.boolean(),
|
|
65
73
|
createdAt: z.string(),
|
|
66
|
-
updatedAt: z.string()
|
|
74
|
+
updatedAt: z.string(),
|
|
75
|
+
locale: z.string(),
|
|
76
|
+
translationGroup: z.string().nullable(),
|
|
77
|
+
customFields: customFields.optional()
|
|
67
78
|
}).meta({ id: "BylineSummary" });
|
|
68
79
|
const bylineCreditSchema = z.object({
|
|
69
80
|
byline: bylineSummarySchema,
|
|
@@ -78,7 +89,8 @@ const contentBylineInputSchema = z.object({
|
|
|
78
89
|
const bylinesListQuery = cursorPaginationQuery.extend({
|
|
79
90
|
search: z.string().optional(),
|
|
80
91
|
isGuest: z.coerce.boolean().optional(),
|
|
81
|
-
userId: z.string().optional()
|
|
92
|
+
userId: z.string().optional(),
|
|
93
|
+
locale: z.string().min(1).optional()
|
|
82
94
|
}).meta({ id: "BylinesListQuery" });
|
|
83
95
|
const bylineCreateBody = z.object({
|
|
84
96
|
slug: z.string().min(1).regex(bylineSlugPattern, "Slug must contain only lowercase letters, digits, and hyphens"),
|
|
@@ -87,7 +99,10 @@ const bylineCreateBody = z.object({
|
|
|
87
99
|
avatarMediaId: z.string().nullish(),
|
|
88
100
|
websiteUrl: httpUrl.nullish(),
|
|
89
101
|
userId: z.string().nullish(),
|
|
90
|
-
isGuest: z.boolean().optional()
|
|
102
|
+
isGuest: z.boolean().optional(),
|
|
103
|
+
locale: z.string().min(1).optional(),
|
|
104
|
+
translationOf: z.string().optional(),
|
|
105
|
+
customFields: customFields.optional()
|
|
91
106
|
}).meta({ id: "BylineCreateBody" });
|
|
92
107
|
const bylineUpdateBody = z.object({
|
|
93
108
|
slug: z.string().min(1).regex(bylineSlugPattern, "Slug must contain only lowercase letters, digits, and hyphens").optional(),
|
|
@@ -96,7 +111,8 @@ const bylineUpdateBody = z.object({
|
|
|
96
111
|
avatarMediaId: z.string().nullish(),
|
|
97
112
|
websiteUrl: httpUrl.nullish(),
|
|
98
113
|
userId: z.string().nullish(),
|
|
99
|
-
isGuest: z.boolean().optional()
|
|
114
|
+
isGuest: z.boolean().optional(),
|
|
115
|
+
customFields: customFields.optional()
|
|
100
116
|
}).meta({ id: "BylineUpdateBody" });
|
|
101
117
|
const bylineListResponseSchema = z.object({
|
|
102
118
|
items: z.array(bylineSummarySchema),
|
|
@@ -117,7 +133,8 @@ const contentListQuery = cursorPaginationQuery.extend({
|
|
|
117
133
|
status: z.string().optional(),
|
|
118
134
|
orderBy: z.string().optional(),
|
|
119
135
|
order: z.enum(["asc", "desc"]).optional(),
|
|
120
|
-
locale: localeCode.optional()
|
|
136
|
+
locale: localeCode.optional(),
|
|
137
|
+
q: z.string().trim().min(1).max(200).optional()
|
|
121
138
|
}).meta({ id: "ContentListQuery" });
|
|
122
139
|
const contentDateOverride = z.iso.datetime({
|
|
123
140
|
offset: true,
|
|
@@ -197,7 +214,8 @@ const contentResponseSchema = z.object({
|
|
|
197
214
|
/** Response for content list endpoints */
|
|
198
215
|
const contentListResponseSchema = z.object({
|
|
199
216
|
items: z.array(contentItemSchema),
|
|
200
|
-
nextCursor: z.string().optional()
|
|
217
|
+
nextCursor: z.string().optional(),
|
|
218
|
+
total: z.number().int().nonnegative().optional()
|
|
201
219
|
}).meta({ id: "ContentListResponse" });
|
|
202
220
|
/** Trashed content item */
|
|
203
221
|
const trashedContentItemSchema = z.object({
|
|
@@ -242,7 +260,10 @@ const contentTranslationsResponseSchema = z.object({
|
|
|
242
260
|
const mimeTypeFilter = z.union([z.string(), z.array(z.string())]).transform((value) => {
|
|
243
261
|
return (Array.isArray(value) ? value : value.split(",")).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
244
262
|
}).optional();
|
|
245
|
-
const mediaListQuery = cursorPaginationQuery.extend({
|
|
263
|
+
const mediaListQuery = cursorPaginationQuery.extend({
|
|
264
|
+
mimeType: mimeTypeFilter,
|
|
265
|
+
q: z.string().trim().min(1).max(200).optional()
|
|
266
|
+
}).meta({ id: "MediaListQuery" });
|
|
246
267
|
const mediaUpdateBody = z.object({
|
|
247
268
|
alt: z.string().optional(),
|
|
248
269
|
caption: z.string().optional(),
|