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
package/dist/astro/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
2
|
-
import { t as defaultSeed } from "../default-
|
|
3
|
-
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-
|
|
1
|
+
import { n as VERSION, t as COMMIT } from "../version-Cb1tZ6s_.mjs";
|
|
2
|
+
import { t as defaultSeed } from "../default-BHauvIdG.mjs";
|
|
3
|
+
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-QirBXiDj.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
@@ -491,6 +491,26 @@ function injectCoreRoutes(injectRoute) {
|
|
|
491
491
|
pattern: "/_dineway/api/admin/bylines/[id]",
|
|
492
492
|
entrypoint: resolveRoute("api/admin/bylines/[id]/index.ts")
|
|
493
493
|
});
|
|
494
|
+
injectRoute({
|
|
495
|
+
pattern: "/_dineway/api/admin/bylines/[id]/translations",
|
|
496
|
+
entrypoint: resolveRoute("api/admin/bylines/[id]/translations.ts")
|
|
497
|
+
});
|
|
498
|
+
injectRoute({
|
|
499
|
+
pattern: "/_dineway/api/admin/byline-fields",
|
|
500
|
+
entrypoint: resolveRoute("api/admin/byline-fields/index.ts")
|
|
501
|
+
});
|
|
502
|
+
injectRoute({
|
|
503
|
+
pattern: "/_dineway/api/admin/byline-fields/[slug]",
|
|
504
|
+
entrypoint: resolveRoute("api/admin/byline-fields/[slug].ts")
|
|
505
|
+
});
|
|
506
|
+
injectRoute({
|
|
507
|
+
pattern: "/_dineway/api/admin/byline-fields/[slug]/usage",
|
|
508
|
+
entrypoint: resolveRoute("api/admin/byline-fields/[slug]/usage.ts")
|
|
509
|
+
});
|
|
510
|
+
injectRoute({
|
|
511
|
+
pattern: "/_dineway/api/admin/byline-fields/reorder",
|
|
512
|
+
entrypoint: resolveRoute("api/admin/byline-fields/reorder.ts")
|
|
513
|
+
});
|
|
494
514
|
injectRoute({
|
|
495
515
|
pattern: "/_dineway/api/admin/briefing",
|
|
496
516
|
entrypoint: resolveRoute("api/admin/briefing.ts")
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import "../../runtime-
|
|
2
|
-
import "../../types-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import "../../types-
|
|
5
|
-
import "../../runner-
|
|
6
|
-
import "../../index-
|
|
7
|
-
import "../../
|
|
8
|
-
import "../../
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../validate-CvQ6cvHH.mjs";
|
|
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";
|
|
11
10
|
import { DinewayHandlers } from "../types.mjs";
|
|
12
11
|
import { Kysely } from "kysely";
|
|
13
12
|
import { User } from "@dineway-ai/auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as apiError } from "../../error-
|
|
2
|
-
import { n as getPublicOrigin } from "../../public-url-
|
|
3
|
-
import { t as getAuthMode } from "../../mode-
|
|
4
|
-
import { i as hasScope } from "../../api-tokens-
|
|
5
|
-
import { a as resolveOAuthToken, i as resolveApiToken } from "../../api-tokens-
|
|
1
|
+
import { t as apiError } from "../../error-DCSuUAZW.mjs";
|
|
2
|
+
import { n as getPublicOrigin } from "../../public-url-DLUM5OOv.mjs";
|
|
3
|
+
import { t as getAuthMode } from "../../mode-CZqCF9dZ.mjs";
|
|
4
|
+
import { i as hasScope } from "../../api-tokens-CYUoFGo7.mjs";
|
|
5
|
+
import { a as resolveOAuthToken, i as resolveApiToken } from "../../api-tokens-DtvdtIkm.mjs";
|
|
6
6
|
import { ulid } from "ulidx";
|
|
7
7
|
import { defineMiddleware } from "astro:middleware";
|
|
8
8
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../../dialect-helpers-TkdbkFad.mjs";
|
|
1
|
+
import "../../dialect-helpers-fk43GbDb.mjs";
|
|
3
2
|
import "../../base64-C1Q9yr0B.mjs";
|
|
4
|
-
import "../../types-
|
|
5
|
-
import { t as RedirectRepository } from "../../redirect-
|
|
6
|
-
import {
|
|
7
|
-
import { r as
|
|
3
|
+
import "../../types-Ck7-WoUD.mjs";
|
|
4
|
+
import { n as alternateTrailingSlashPath, t as RedirectRepository } from "../../redirect-BqFMj67n.mjs";
|
|
5
|
+
import { getRequestContext } from "../../request-context.mjs";
|
|
6
|
+
import { a as matchCachedPatterns, n as compileRedirectRules, o as setCachedRedirects, r as getCachedRedirects } from "../../cache-GRK71jOU.mjs";
|
|
7
|
+
import { r as getDb } from "../../loader-Y0QvC_QO.mjs";
|
|
8
8
|
import { defineMiddleware } from "astro:middleware";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/middleware/redirect.ts
|
|
@@ -30,6 +30,12 @@ const ASSET_EXTENSION = /\.\w{1,10}$/;
|
|
|
30
30
|
function isRedirectCode(code) {
|
|
31
31
|
return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
|
|
32
32
|
}
|
|
33
|
+
function getCachedExactRedirect(exactRedirects, pathname) {
|
|
34
|
+
const exact = exactRedirects.get(pathname);
|
|
35
|
+
if (exact) return exact;
|
|
36
|
+
const alternate = alternateTrailingSlashPath(pathname);
|
|
37
|
+
return alternate ? exactRedirects.get(alternate) ?? null : null;
|
|
38
|
+
}
|
|
33
39
|
const onRequest = defineMiddleware(async (context, next) => {
|
|
34
40
|
const { pathname } = context.url;
|
|
35
41
|
if (SKIP_PREFIXES.some((prefix) => pathname.startsWith(prefix))) return next();
|
|
@@ -51,7 +57,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
51
57
|
} else {
|
|
52
58
|
let cached = getCachedRedirects();
|
|
53
59
|
if (!cached) cached = setCachedRedirects(await repo.findAllEnabled());
|
|
54
|
-
exact = cached.exact
|
|
60
|
+
exact = getCachedExactRedirect(cached.exact, pathname);
|
|
55
61
|
rules = cached.patterns;
|
|
56
62
|
}
|
|
57
63
|
if (exact) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { runWithContext } from "../../request-context.mjs";
|
|
2
1
|
import "../../base64-C1Q9yr0B.mjs";
|
|
3
2
|
import "../../options-BF11H_FD.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { runWithContext } from "../../request-context.mjs";
|
|
4
|
+
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-CjSgb0AC.mjs";
|
|
5
|
+
import { i as resolveSecretsCached } from "../../secrets-CPoFLJjm.mjs";
|
|
6
6
|
import { defineMiddleware } from "astro:middleware";
|
|
7
7
|
|
|
8
8
|
//#region src/visual-editing/toolbar.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
1
|
+
import { i as runMigrations } from "../../runner-DTfG5v0G.mjs";
|
|
2
|
+
import "../../dialect-helpers-fk43GbDb.mjs";
|
|
3
3
|
import { t as OptionsRepository } from "../../options-BF11H_FD.mjs";
|
|
4
4
|
import { ulid } from "ulidx";
|
|
5
5
|
import { defineMiddleware } from "astro:middleware";
|
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "../connection-BCNICDWN.mjs";
|
|
1
|
+
import { i as runMigrations } from "../runner-DTfG5v0G.mjs";
|
|
2
|
+
import "../connection-CiJWiWya.mjs";
|
|
4
3
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { r as RevisionRepository } from "../content-DvpMad_N.mjs";
|
|
4
|
+
import { s as isSqlite } from "../dialect-helpers-fk43GbDb.mjs";
|
|
5
|
+
import { i as setI18nConfig } from "../config-CVssduLe.mjs";
|
|
6
|
+
import { d as EmailPipeline, g as after, h as definePlugin, m as resolveExclusiveHooks, p as createHookPipeline, u as PluginRouteRegistry } from "../plugins-BQ5Joz6v.mjs";
|
|
7
|
+
import { r as RevisionRepository } from "../content-BfyjOiMi.mjs";
|
|
10
8
|
import "../base64-C1Q9yr0B.mjs";
|
|
11
|
-
import "../types-
|
|
12
|
-
import { t as MediaRepository } from "../media-
|
|
13
|
-
import "../user-
|
|
14
|
-
import "../taxonomy-
|
|
15
|
-
import "../comment-
|
|
9
|
+
import "../types-Ck7-WoUD.mjs";
|
|
10
|
+
import { t as MediaRepository } from "../media-DhBwiCYR.mjs";
|
|
11
|
+
import "../user-CqZwN21P.mjs";
|
|
12
|
+
import "../taxonomy-BnH-6VsX.mjs";
|
|
13
|
+
import "../comment-ogMaF1gk.mjs";
|
|
16
14
|
import { t as OptionsRepository } from "../options-BF11H_FD.mjs";
|
|
17
|
-
import "../audit-
|
|
18
|
-
import "../site-activity-
|
|
19
|
-
import "../review-requests-
|
|
15
|
+
import "../audit-DuRbTm8L.mjs";
|
|
16
|
+
import "../site-activity-6x1JccoR.mjs";
|
|
17
|
+
import "../review-requests-tPw8_pAO.mjs";
|
|
20
18
|
import "../entity-aliases-uOrKvlPg.mjs";
|
|
21
|
-
import "../context-
|
|
22
|
-
import "../menus-
|
|
23
|
-
import "../redirect-
|
|
24
|
-
import "../
|
|
25
|
-
import {
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import "../
|
|
31
|
-
import {
|
|
32
|
-
import "../
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import "../
|
|
38
|
-
import "../
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import "../
|
|
42
|
-
import "../
|
|
43
|
-
import "../
|
|
44
|
-
import "../
|
|
45
|
-
import "../
|
|
46
|
-
import "../
|
|
47
|
-
import "../
|
|
48
|
-
import "../
|
|
49
|
-
import
|
|
50
|
-
import "../
|
|
51
|
-
import "../
|
|
52
|
-
import "../
|
|
53
|
-
import
|
|
54
|
-
import "../
|
|
55
|
-
import "../
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import "../
|
|
59
|
-
import {
|
|
60
|
-
import
|
|
61
|
-
import "../
|
|
62
|
-
import "../
|
|
63
|
-
import "../
|
|
64
|
-
import "../
|
|
65
|
-
import "../
|
|
66
|
-
import "../
|
|
67
|
-
import "../
|
|
68
|
-
import "../
|
|
69
|
-
import "../
|
|
19
|
+
import "../context-ZMHhwzkG.mjs";
|
|
20
|
+
import "../menus-BzGQpw9d.mjs";
|
|
21
|
+
import "../redirect-BqFMj67n.mjs";
|
|
22
|
+
import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
|
|
23
|
+
import { r as requestCached } from "../request-cache-w5cj5itT.mjs";
|
|
24
|
+
import "../byline-registry-CL8BxPPp.mjs";
|
|
25
|
+
import "../byline-CXQcMsBu.mjs";
|
|
26
|
+
import { t as normalizeMediaValue } from "../normalize-O-hi3a27.mjs";
|
|
27
|
+
import "../placeholder-BDo81Is5.mjs";
|
|
28
|
+
import "../seo-uMFBaR8G.mjs";
|
|
29
|
+
import { $ as validateRev, A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, d as createPluginBundleStore, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "../api-ePsOhL3q.mjs";
|
|
30
|
+
import "../dashboard-D0gWuzNp.mjs";
|
|
31
|
+
import { u as PluginStateRepository } from "../briefing-BFEWeJtR.mjs";
|
|
32
|
+
import "../context-types-DQh_XKkn.mjs";
|
|
33
|
+
import { t as FTSManager } from "../fts-manager-EHY2Kes9.mjs";
|
|
34
|
+
import { n as SchemaRegistry } from "../registry-Cq3QRBW2.mjs";
|
|
35
|
+
import { createRecorder, flushRecorder, formatServerTimingHeader, isInstrumentationEnabled, isServerTimingEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
36
|
+
import { a as isMissingTableError, r as getDb } from "../loader-Y0QvC_QO.mjs";
|
|
37
|
+
import { c as createPublicMediaUrlResolver } from "../settings-DNRQuX3d.mjs";
|
|
38
|
+
import "../briefing-C4fJSVYW.mjs";
|
|
39
|
+
import "../review-requests-GYqjl2jO.mjs";
|
|
40
|
+
import { n as hashString } from "../hash-BPmX6P8I.mjs";
|
|
41
|
+
import { n as VERSION, t as COMMIT } from "../version-Cb1tZ6s_.mjs";
|
|
42
|
+
import "../query-BJuUydtD.mjs";
|
|
43
|
+
import "../zod-generator-D1ROBNuC.mjs";
|
|
44
|
+
import "../schema-DmHMWnSA.mjs";
|
|
45
|
+
import "../seo-5lJOtB5J.mjs";
|
|
46
|
+
import "../bylines-D2vqm1aZ.mjs";
|
|
47
|
+
import "../byline-fields-Dc7L6Yry.mjs";
|
|
48
|
+
import "../sections-DsuIrFDC.mjs";
|
|
49
|
+
import "../settings-BYGdocdj.mjs";
|
|
50
|
+
import "../resolve-DTuDyYKs.mjs";
|
|
51
|
+
import "../taxonomies-faQVeMgj.mjs";
|
|
52
|
+
import "../taxonomies-CQFmkP5u.mjs";
|
|
53
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-qh2P7RDX.mjs";
|
|
54
|
+
import "../parse-CneSgl7-.mjs";
|
|
55
|
+
import "../redirects-q_cToaHv.mjs";
|
|
56
|
+
import "../byline-fields-D7TJ_oHF.mjs";
|
|
57
|
+
import { a as invalidateUrlPatternCache } from "../query-CSx0EdSW.mjs";
|
|
58
|
+
import "../preview-D5rvDhRt.mjs";
|
|
59
|
+
import "../parser-DxfsARXL.mjs";
|
|
60
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-BgIIcbsN.mjs";
|
|
61
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-DAb6xaP9.mjs";
|
|
62
|
+
import "../ssrf-DiKqWd3N.mjs";
|
|
63
|
+
import { n as CronExecutor } from "../cron-DxCAU_Sn.mjs";
|
|
64
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-BOVqIYpB.mjs";
|
|
65
|
+
import "../import-CvHY6sf5.mjs";
|
|
66
|
+
import "../utils-wv-zvC-Y.mjs";
|
|
67
|
+
import "../tokens-CjSgb0AC.mjs";
|
|
68
|
+
import "../menus-fqqzXyHd.mjs";
|
|
69
|
+
import "../bylines-BgriNlW7.mjs";
|
|
70
|
+
import "../widgets-CdDvF4fV.mjs";
|
|
71
|
+
import "../apply-BpRBCqUt.mjs";
|
|
72
|
+
import "../load-BdbvtoDb.mjs";
|
|
73
|
+
import "../search-BAiFLz81.mjs";
|
|
70
74
|
import "../index.mjs";
|
|
71
|
-
import { t as getAuthMode } from "../mode-
|
|
72
|
-
import { i as experimentalSiteContextWorkflowsEnabled } from "../experimental-workflows-
|
|
73
|
-
import { t as cleanupExpiredChallenges } from "../challenge-store-
|
|
74
|
-
import { a as validateEncryptionKeyAtStartup } from "../secrets-
|
|
75
|
+
import { t as getAuthMode } from "../mode-CZqCF9dZ.mjs";
|
|
76
|
+
import { i as experimentalSiteContextWorkflowsEnabled } from "../experimental-workflows-CSMffP6q.mjs";
|
|
77
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-DFxX0_15.mjs";
|
|
78
|
+
import { a as validateEncryptionKeyAtStartup } from "../secrets-CPoFLJjm.mjs";
|
|
75
79
|
import { Kysely, sql } from "kysely";
|
|
76
80
|
import { defineMiddleware } from "astro:middleware";
|
|
77
81
|
import virtualConfig from "virtual:dineway/config";
|
|
@@ -864,9 +868,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
864
868
|
}
|
|
865
869
|
})();
|
|
866
870
|
if (collectionCount.count === 0 && !setupDone) {
|
|
867
|
-
const { applySeed } = await import("../apply-
|
|
868
|
-
const { loadSeed } = await import("../load-
|
|
869
|
-
const { validateSeed } = await import("../validate-
|
|
871
|
+
const { applySeed } = await import("../apply-BpRBCqUt.mjs").then((n) => n.n);
|
|
872
|
+
const { loadSeed } = await import("../load-BdbvtoDb.mjs").then((n) => n.r);
|
|
873
|
+
const { validateSeed } = await import("../validate-CK4a1sIF.mjs").then((n) => n.n);
|
|
870
874
|
const seed = await loadSeed();
|
|
871
875
|
if (validateSeed(seed).valid) {
|
|
872
876
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1154,9 +1158,9 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1154
1158
|
return result;
|
|
1155
1159
|
}
|
|
1156
1160
|
async handleContentUpdate(collection, id, body) {
|
|
1157
|
-
const { ContentRepository } = await import("../content-
|
|
1161
|
+
const { ContentRepository } = await import("../content-BfyjOiMi.mjs").then((n) => n.n);
|
|
1158
1162
|
const repo = new ContentRepository(this.db);
|
|
1159
|
-
const resolvedItem = await repo.findByIdOrSlug(collection, id);
|
|
1163
|
+
const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
|
|
1160
1164
|
const resolvedId = resolvedItem?.id ?? id;
|
|
1161
1165
|
if (body._rev) {
|
|
1162
1166
|
if (!resolvedItem) return {
|
|
@@ -1385,6 +1389,7 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1385
1389
|
const trustedPlugin = this.configuredPlugins.find((p) => p.id === pluginId);
|
|
1386
1390
|
if (trustedPlugin && this.enabledPlugins.has(trustedPlugin.id)) {
|
|
1387
1391
|
const routeRegistry = new PluginRouteRegistry({
|
|
1392
|
+
...this.pipelineFactoryOptions,
|
|
1388
1393
|
db: this.db,
|
|
1389
1394
|
emailPipeline: this.email ?? void 0,
|
|
1390
1395
|
trustedProxyHeaders: getTrustedProxyHeaders(this.config)
|
|
@@ -1649,6 +1654,24 @@ var DinewayRuntime = class DinewayRuntime {
|
|
|
1649
1654
|
}
|
|
1650
1655
|
};
|
|
1651
1656
|
|
|
1657
|
+
//#endregion
|
|
1658
|
+
//#region src/astro/public-plugin-api-routes.ts
|
|
1659
|
+
function pluginRouteNotFound() {
|
|
1660
|
+
return {
|
|
1661
|
+
success: false,
|
|
1662
|
+
error: {
|
|
1663
|
+
code: "NOT_FOUND",
|
|
1664
|
+
message: "Plugin route not found"
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
function createPublicPluginApiRouteHandler(runtime) {
|
|
1669
|
+
return async (pluginId, method, path, request) => {
|
|
1670
|
+
if (runtime.getPluginRouteMeta(pluginId, path)?.public !== true) return pluginRouteNotFound();
|
|
1671
|
+
return runtime.handlePluginApiRoute(pluginId, method, path, request);
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1652
1675
|
//#endregion
|
|
1653
1676
|
//#region src/astro/middleware.ts
|
|
1654
1677
|
/**
|
|
@@ -1668,8 +1691,20 @@ let i18nInitialized = false;
|
|
|
1668
1691
|
* would query an empty database and crash. Once verified (or once the runtime
|
|
1669
1692
|
* has initialized via an admin/API request), this stays true for the worker's
|
|
1670
1693
|
* lifetime.
|
|
1694
|
+
*
|
|
1695
|
+
* Stored on globalThis behind a Symbol key so the flag is a true singleton even
|
|
1696
|
+
* when the bundler duplicates this module across SSR chunks. A plain
|
|
1697
|
+
* module-scoped `let` can become multiple independent variables, making the
|
|
1698
|
+
* setup probe re-run more often than intended.
|
|
1671
1699
|
*/
|
|
1672
|
-
|
|
1700
|
+
const SETUP_VERIFIED_KEY = Symbol.for("dineway:setup-verified");
|
|
1701
|
+
const setupFlagStore = globalThis;
|
|
1702
|
+
function isSetupVerified() {
|
|
1703
|
+
return setupFlagStore[SETUP_VERIFIED_KEY] === true;
|
|
1704
|
+
}
|
|
1705
|
+
function markSetupVerified() {
|
|
1706
|
+
setupFlagStore[SETUP_VERIFIED_KEY] = true;
|
|
1707
|
+
}
|
|
1673
1708
|
/**
|
|
1674
1709
|
* Get Dineway configuration from virtual module
|
|
1675
1710
|
*/
|
|
@@ -1812,14 +1847,15 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1812
1847
|
if (!isDinewayRoute && !isPublicRuntimeRoute && !hasEditCookie && !hasPreviewToken) {
|
|
1813
1848
|
const hasSessionCookie = cookies.get("astro-session") !== void 0;
|
|
1814
1849
|
if (!(context.isPrerendered || !hasSessionCookie ? null : await context.session?.get("user")) && !requestDb) {
|
|
1815
|
-
if (!
|
|
1850
|
+
if (!isSetupVerified()) {
|
|
1816
1851
|
const setupStart = startServerTiming(serverTimings);
|
|
1817
1852
|
try {
|
|
1818
|
-
const { getDb } = await import("../loader-
|
|
1853
|
+
const { getDb } = await import("../loader-Y0QvC_QO.mjs").then((n) => n.i);
|
|
1819
1854
|
await (await getDb()).selectFrom("_dineway_migrations").selectAll().limit(1).execute();
|
|
1820
|
-
|
|
1821
|
-
} catch {
|
|
1822
|
-
return context.redirect("/_dineway/admin/setup");
|
|
1855
|
+
markSetupVerified();
|
|
1856
|
+
} catch (error) {
|
|
1857
|
+
if (isMissingTableError(error)) return context.redirect("/_dineway/admin/setup");
|
|
1858
|
+
console.error("Setup probe failed (non-fatal):", error);
|
|
1823
1859
|
}
|
|
1824
1860
|
addServerTiming(serverTimings, "setup", setupStart, "Setup probe");
|
|
1825
1861
|
}
|
|
@@ -1828,8 +1864,9 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1828
1864
|
const runtimeStart = startServerTiming(serverTimings);
|
|
1829
1865
|
try {
|
|
1830
1866
|
const runtime = await getRuntime(config);
|
|
1831
|
-
|
|
1867
|
+
markSetupVerified();
|
|
1832
1868
|
locals.dineway = {
|
|
1869
|
+
handlePublicPluginApiRoute: createPublicPluginApiRouteHandler(runtime),
|
|
1833
1870
|
collectPageMetadata: runtime.collectPageMetadata.bind(runtime),
|
|
1834
1871
|
collectPageFragments: runtime.collectPageFragments.bind(runtime),
|
|
1835
1872
|
ensureSearchHealthy: runtime.ensureSearchHealthy.bind(runtime),
|
|
@@ -1857,7 +1894,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1857
1894
|
let timingStart = startServerTiming(serverTimings);
|
|
1858
1895
|
const runtime = await getRuntime(config);
|
|
1859
1896
|
addServerTiming(serverTimings, "rt", timingStart, "Runtime init");
|
|
1860
|
-
|
|
1897
|
+
markSetupVerified();
|
|
1861
1898
|
locals.dineway = {
|
|
1862
1899
|
handleContentList: runtime.handleContentList.bind(runtime),
|
|
1863
1900
|
handleContentGet: runtime.handleContentGet.bind(runtime),
|
|
@@ -1887,6 +1924,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1887
1924
|
handleRevisionGet: runtime.handleRevisionGet.bind(runtime),
|
|
1888
1925
|
handleRevisionRestore: runtime.handleRevisionRestore.bind(runtime),
|
|
1889
1926
|
handlePluginApiRoute: runtime.handlePluginApiRoute.bind(runtime),
|
|
1927
|
+
handlePublicPluginApiRoute: createPublicPluginApiRouteHandler(runtime),
|
|
1890
1928
|
getPluginRouteMeta: runtime.getPluginRouteMeta.bind(runtime),
|
|
1891
1929
|
getMediaProvider: runtime.getMediaProvider.bind(runtime),
|
|
1892
1930
|
getMediaProviderList: runtime.getMediaProviderList.bind(runtime),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../../context-types-
|
|
2
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
3
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
4
|
-
import { S as allowedDomainUpdateBody } from "../../../../../redirects-
|
|
5
|
-
import "../../../../../
|
|
1
|
+
import "../../../../../context-types-DQh_XKkn.mjs";
|
|
2
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-DCSuUAZW.mjs";
|
|
3
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CneSgl7-.mjs";
|
|
4
|
+
import { S as allowedDomainUpdateBody } from "../../../../../redirects-q_cToaHv.mjs";
|
|
5
|
+
import "../../../../../byline-fields-D7TJ_oHF.mjs";
|
|
6
6
|
import "../../../../../api/schemas/index.mjs";
|
|
7
7
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
8
8
|
import { Role, roleFromLevel } from "@dineway-ai/auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../../context-types-
|
|
2
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
3
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
4
|
-
import { x as allowedDomainCreateBody } from "../../../../../redirects-
|
|
5
|
-
import "../../../../../
|
|
1
|
+
import "../../../../../context-types-DQh_XKkn.mjs";
|
|
2
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-DCSuUAZW.mjs";
|
|
3
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CneSgl7-.mjs";
|
|
4
|
+
import { x as allowedDomainCreateBody } from "../../../../../redirects-q_cToaHv.mjs";
|
|
5
|
+
import "../../../../../byline-fields-D7TJ_oHF.mjs";
|
|
6
6
|
import "../../../../../api/schemas/index.mjs";
|
|
7
7
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
8
8
|
import { Role, roleFromLevel } from "@dineway-ai/auth";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
-
import "../../../../../api-tokens-
|
|
3
|
-
import { r as handleApiTokenRevoke } from "../../../../../api-tokens-
|
|
4
|
-
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-
|
|
1
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-DCSuUAZW.mjs";
|
|
2
|
+
import "../../../../../api-tokens-CYUoFGo7.mjs";
|
|
3
|
+
import { r as handleApiTokenRevoke } from "../../../../../api-tokens-DtvdtIkm.mjs";
|
|
4
|
+
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-Dr14I98m.mjs";
|
|
5
5
|
import { Role } from "@dineway-ai/auth";
|
|
6
6
|
|
|
7
7
|
//#region src/astro/routes/api/admin/api-tokens/[id].ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
3
|
-
import { c as requestedExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, s as getExperimentalSiteContextWorkflowsDisabledMessage } from "../../../../../experimental-workflows-
|
|
4
|
-
import { t as ALL_VALID_SCOPES } from "../../../../../api-tokens-
|
|
5
|
-
import { n as handleApiTokenList, t as handleApiTokenCreate } from "../../../../../api-tokens-
|
|
6
|
-
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-
|
|
1
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-DCSuUAZW.mjs";
|
|
2
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CneSgl7-.mjs";
|
|
3
|
+
import { c as requestedExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, s as getExperimentalSiteContextWorkflowsDisabledMessage } from "../../../../../experimental-workflows-CSMffP6q.mjs";
|
|
4
|
+
import { t as ALL_VALID_SCOPES } from "../../../../../api-tokens-CYUoFGo7.mjs";
|
|
5
|
+
import { n as handleApiTokenList, t as handleApiTokenCreate } from "../../../../../api-tokens-DtvdtIkm.mjs";
|
|
6
|
+
import { t as rejectApiTokenAuthControlWrite } from "../../../../../auth-control-guard-Dr14I98m.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { Role } from "@dineway-ai/auth";
|
|
9
9
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "../../../../dialect-helpers-
|
|
1
|
+
import "../../../../dialect-helpers-fk43GbDb.mjs";
|
|
2
2
|
import "../../../../base64-C1Q9yr0B.mjs";
|
|
3
|
-
import "../../../../types-
|
|
4
|
-
import "../../../../media-
|
|
3
|
+
import "../../../../types-Ck7-WoUD.mjs";
|
|
4
|
+
import "../../../../media-DhBwiCYR.mjs";
|
|
5
5
|
import "../../../../options-BF11H_FD.mjs";
|
|
6
|
-
import "../../../../site-activity-
|
|
7
|
-
import "../../../../review-requests-
|
|
8
|
-
import "../../../../request-cache-
|
|
9
|
-
import "../../../../briefing-
|
|
10
|
-
import "../../../../context-types-
|
|
11
|
-
import "../../../../fts-manager-
|
|
12
|
-
import "../../../../registry-
|
|
13
|
-
import "../../../../loader-
|
|
14
|
-
import "../../../../settings-
|
|
15
|
-
import { t as handleSiteBriefingGet } from "../../../../briefing-
|
|
16
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../error-
|
|
17
|
-
import { i as parseQuery, t as isParseError } from "../../../../parse-
|
|
18
|
-
import "../../../../redirects-
|
|
19
|
-
import {
|
|
6
|
+
import "../../../../site-activity-6x1JccoR.mjs";
|
|
7
|
+
import "../../../../review-requests-tPw8_pAO.mjs";
|
|
8
|
+
import "../../../../request-cache-w5cj5itT.mjs";
|
|
9
|
+
import "../../../../briefing-BFEWeJtR.mjs";
|
|
10
|
+
import "../../../../context-types-DQh_XKkn.mjs";
|
|
11
|
+
import "../../../../fts-manager-EHY2Kes9.mjs";
|
|
12
|
+
import "../../../../registry-Cq3QRBW2.mjs";
|
|
13
|
+
import "../../../../loader-Y0QvC_QO.mjs";
|
|
14
|
+
import "../../../../settings-DNRQuX3d.mjs";
|
|
15
|
+
import { t as handleSiteBriefingGet } from "../../../../briefing-C4fJSVYW.mjs";
|
|
16
|
+
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../error-DCSuUAZW.mjs";
|
|
17
|
+
import { i as parseQuery, t as isParseError } from "../../../../parse-CneSgl7-.mjs";
|
|
18
|
+
import "../../../../redirects-q_cToaHv.mjs";
|
|
19
|
+
import { k as siteBriefingQuery } from "../../../../byline-fields-D7TJ_oHF.mjs";
|
|
20
20
|
import "../../../../api/schemas/index.mjs";
|
|
21
21
|
import { hasPermission } from "@dineway-ai/auth";
|
|
22
22
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../../../../../../byline-registry-CL8BxPPp.mjs";
|
|
2
|
+
import { s as handleBylineFieldUsage } from "../../../../../../byline-fields-Dc7L6Yry.mjs";
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../../error-DCSuUAZW.mjs";
|
|
4
|
+
import { n as requirePerm } from "../../../../../../authorize-BLO0m7fW.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug]/usage.ts
|
|
7
|
+
const prerender = false;
|
|
8
|
+
const GET = async ({ params, locals }) => {
|
|
9
|
+
const { dineway, user } = locals;
|
|
10
|
+
if (!dineway?.db) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
11
|
+
const denied = requirePerm(user, "schema:read");
|
|
12
|
+
if (denied) return denied;
|
|
13
|
+
return unwrapResult(await handleBylineFieldUsage(dineway.db, params.slug));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GET, prerender };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { APIRoute } from "astro";
|
|
2
|
+
|
|
3
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug].d.ts
|
|
4
|
+
declare const prerender = false;
|
|
5
|
+
declare const GET: APIRoute;
|
|
6
|
+
declare const PUT: APIRoute;
|
|
7
|
+
declare const DELETE: APIRoute;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DELETE, GET, PUT, prerender };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "../../../../../byline-registry-CL8BxPPp.mjs";
|
|
2
|
+
import "../../../../../context-types-DQh_XKkn.mjs";
|
|
3
|
+
import { n as handleBylineFieldDelete, o as handleBylineFieldUpdate, r as handleBylineFieldGet } from "../../../../../byline-fields-Dc7L6Yry.mjs";
|
|
4
|
+
import { a as unwrapResult, t as apiError } from "../../../../../error-DCSuUAZW.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CneSgl7-.mjs";
|
|
6
|
+
import "../../../../../redirects-q_cToaHv.mjs";
|
|
7
|
+
import { a as bylineFieldUpdateBody } from "../../../../../byline-fields-D7TJ_oHF.mjs";
|
|
8
|
+
import "../../../../../api/schemas/index.mjs";
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-BLO0m7fW.mjs";
|
|
10
|
+
|
|
11
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug].ts
|
|
12
|
+
const prerender = false;
|
|
13
|
+
const GET = async ({ params, locals }) => {
|
|
14
|
+
const { dineway, user } = locals;
|
|
15
|
+
if (!dineway?.db) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
16
|
+
const denied = requirePerm(user, "schema:read");
|
|
17
|
+
if (denied) return denied;
|
|
18
|
+
return unwrapResult(await handleBylineFieldGet(dineway.db, params.slug));
|
|
19
|
+
};
|
|
20
|
+
const PUT = async ({ params, request, locals }) => {
|
|
21
|
+
const { dineway, user } = locals;
|
|
22
|
+
if (!dineway?.db) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
23
|
+
const denied = requirePerm(user, "schema:manage");
|
|
24
|
+
if (denied) return denied;
|
|
25
|
+
const body = await parseBody(request, bylineFieldUpdateBody);
|
|
26
|
+
if (isParseError(body)) return body;
|
|
27
|
+
return unwrapResult(await handleBylineFieldUpdate(dineway.db, params.slug, body));
|
|
28
|
+
};
|
|
29
|
+
const DELETE = async ({ params, locals }) => {
|
|
30
|
+
const { dineway, user } = locals;
|
|
31
|
+
if (!dineway?.db) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
32
|
+
const denied = requirePerm(user, "schema:manage");
|
|
33
|
+
if (denied) return denied;
|
|
34
|
+
return unwrapResult(await handleBylineFieldDelete(dineway.db, params.slug));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { DELETE, GET, PUT, prerender };
|