dineway 0.1.15 → 0.1.17
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/README.md +22 -0
- package/dist/{activity-events-B4wp7CrU.mjs → activity-events-DbqJBNaY.mjs} +1 -1
- package/dist/{allowed-origins-C1AKK9AT.mjs → allowed-origins-D85wzUp6.mjs} +1 -1
- package/dist/api/route-utils.d.mts +10 -10
- package/dist/api/route-utils.mjs +15 -15
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +4 -4
- package/dist/{api-DX6X_a82.mjs → api-CgxdfUg4.mjs} +96 -17
- package/dist/{api-tokens-D7UjLbdt.mjs → api-tokens-CMmUPFae.mjs} +1 -1
- package/dist/{apply-Bm5QgdrE.mjs → apply-CGVHi2r7.mjs} +165 -85
- package/dist/astro/index.d.mts +11 -11
- package/dist/astro/index.mjs +3 -3
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +5 -5
- package/dist/astro/middleware/redirect.mjs +6 -6
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +119 -77
- 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 +19 -19
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +12 -12
- package/dist/astro/routes/api/admin/bylines/index.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +13 -13
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +26 -26
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +26 -26
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +30 -30
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +30 -30
- package/dist/astro/routes/api/admin/context/diff.mjs +29 -29
- package/dist/astro/routes/api/admin/context/index.mjs +30 -30
- package/dist/astro/routes/api/admin/context/stale.mjs +29 -29
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +26 -26
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +29 -29
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +29 -29
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +27 -27
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- 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 +47 -47
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +46 -46
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +46 -46
- package/dist/astro/routes/api/admin/plugins/index.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +46 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/updates.mjs +40 -40
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +29 -29
- package/dist/astro/routes/api/admin/review-requests/index.mjs +10 -10
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +40 -40
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +40 -40
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- 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 +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +5 -5
- 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 +11 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +28 -28
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/index.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +9 -9
- 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 +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.mjs +29 -29
- package/dist/astro/routes/api/import/wordpress/media.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +33 -33
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +48 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +124 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +32 -145
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +33 -33
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +277 -91
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -6
- 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 +11 -13
- package/dist/astro/routes/api/media.mjs +18 -18
- package/dist/astro/routes/api/menus/_name_/items.mjs +45 -36
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +34 -31
- package/dist/astro/routes/api/menus/_name_/translations.d.mts +8 -0
- package/dist/astro/routes/api/menus/_name_/translations.mjs +111 -0
- package/dist/astro/routes/api/menus/_name_.mjs +47 -36
- package/dist/astro/routes/api/menus/index.mjs +34 -32
- 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 +3 -3
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -12
- package/dist/astro/routes/api/redirects/_id_.mjs +31 -31
- package/dist/astro/routes/api/redirects/index.mjs +31 -31
- 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 +41 -41
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +41 -41
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +41 -41
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +41 -41
- package/dist/astro/routes/api/schema/collections/index.mjs +41 -41
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +40 -40
- package/dist/astro/routes/api/schema/orphans/index.mjs +40 -40
- package/dist/astro/routes/api/search/enable.mjs +12 -12
- package/dist/astro/routes/api/search/index.mjs +11 -11
- package/dist/astro/routes/api/search/rebuild.mjs +12 -12
- package/dist/astro/routes/api/search/stats.mjs +8 -8
- package/dist/astro/routes/api/search/suggest.mjs +11 -11
- package/dist/astro/routes/api/sections/_slug_.mjs +30 -30
- package/dist/astro/routes/api/sections/index.mjs +30 -30
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +30 -30
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +10 -10
- package/dist/astro/routes/api/setup/dev-bypass.mjs +25 -25
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +26 -26
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +7 -7
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +131 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +49 -41
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +36 -34
- package/dist/astro/routes/api/taxonomies/index.mjs +36 -34
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +29 -29
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +30 -30
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +30 -30
- package/dist/astro/routes/api/widget-areas/_name_.mjs +28 -28
- package/dist/astro/routes/api/widget-areas/index.mjs +30 -30
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +16 -14
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-DOZ3UCsP.mjs → auth-control-guard--r6LlNkX.mjs} +1 -1
- package/dist/{authorize-BAdbMCwC.mjs → authorize-wQDmXQJ1.mjs} +1 -1
- package/dist/{briefing-MVYe_Uyf.mjs → briefing-4k6R0KAr.mjs} +7 -7
- package/dist/{briefing-rty4O-wa.mjs → briefing-DM7e2yd3.mjs} +1 -1
- package/dist/{byline-naZxOPSa.mjs → byline-BxAf79s1.mjs} +4 -4
- package/dist/{bylines-DCvz5gtm.d.mts → bylines--KurdDQK.d.mts} +84 -22
- package/dist/{bylines-C4LIBOOO.mjs → bylines-DhCnhR70.mjs} +3 -3
- package/dist/{cache-DEbQ13c9.mjs → cache-inQvbrP5.mjs} +1 -1
- package/dist/{chunks-D_jVet6z.mjs → chunks-vkrCT4Ta.mjs} +7 -1
- package/dist/cli/index.mjs +337 -102
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/{comment-DFO-gWDH.mjs → comment-BmJXz3lc.mjs} +1 -1
- package/dist/{comments--BsZ9pqA.mjs → comments-BW1qFiTa.mjs} +1 -1
- package/dist/{content-CyLkb-qH.mjs → content-DvpMad_N.mjs} +4 -3
- package/dist/{context-DNfcm853.mjs → context-CGbVhAmd.mjs} +2 -2
- package/dist/{context-CNIkMzot.mjs → context-CT44ux1O.mjs} +10 -10
- package/dist/{context-route-helpers-MurhoxWF.mjs → context-route-helpers-CcvSXJtQ.mjs} +1 -1
- package/dist/{dashboard-DqnYU8EU.mjs → dashboard-6gH7SlPM.mjs} +9 -18
- package/dist/database/instrumentation.d.mts +1 -1
- package/dist/database/instrumentation.mjs +14 -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/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-BGEH5jfn.mjs → device-flow-DaTBhALC.mjs} +5 -5
- package/dist/{dialect-helpers-DhTzaUxP.mjs → dialect-helpers-TkdbkFad.mjs} +7 -1
- package/dist/{fts-manager-B1pTNEG_.mjs → fts-manager-D7KVeBmg.mjs} +1 -1
- package/dist/{hitl-requests-ChT32Ilo.mjs → hitl-requests-CUnch_4e.mjs} +2 -2
- package/dist/{hitl-route-helpers-CSit54Ru.mjs → hitl-route-helpers-DcUCm57p.mjs} +4 -4
- package/dist/{import-BHRLhXAn.mjs → import-BVqG28WP.mjs} +3 -3
- package/dist/{import-CNcKWTbp.mjs → import-DE2ziezs.mjs} +2 -2
- package/dist/{index-CYfhYgXd.d.mts → index-DpMWSamU.d.mts} +2 -2
- package/dist/{index-EUAWaIxW.d.mts → index-JzJUzE4o.d.mts} +47 -47
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +65 -65
- package/dist/{jsonld-D2gUY4kA.d.mts → jsonld-BjsoTL5m.d.mts} +2 -2
- package/dist/{loader-PZnPxFLc.mjs → loader-CQFxFOt1.mjs} +2 -2
- package/dist/media/index.d.mts +2 -2
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-_7Fxdu45.mjs → media-Cg4zc9fq.mjs} +12 -9
- package/dist/media-allowlist-eS3AZ2L_.mjs +26 -0
- package/dist/{menus-DYW_UHjv.mjs → menus-BDW1yIdj.mjs} +80 -87
- package/dist/menus-CwI7DQJ5.mjs +569 -0
- package/dist/mime-DJOFDGux.mjs +35 -0
- package/dist/{oauth-authorization-DxGjiWKL.mjs → oauth-authorization-DcYRiDfi.mjs} +5 -5
- package/dist/{oauth-clients-DxO_NO7k.mjs → oauth-clients-CgKFA-VH.mjs} +2 -2
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-C9106ehs.mjs → parse-BBfZRZYb.mjs} +1 -1
- package/dist/{placeholder-Bh1dfUOd.d.mts → placeholder-DKMMLt42.d.mts} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-D7-ILNib.mjs → plugins-DKceDtUM.mjs} +9 -7
- package/dist/{preview-DvYRU-Oy.mjs → preview-CIDYFBzd.mjs} +2 -2
- package/dist/{provider-loader-BiQ6lNmf.d.mts → provider-loader-D0F6E2qv.d.mts} +1 -1
- package/dist/{query-CsbOywSY.mjs → query-BtuwuZRd.mjs} +3 -3
- package/dist/{query-B9BO5goQ.mjs → query-CWPxZjGM.mjs} +11 -11
- package/dist/{rate-limit-DmVTHI5v.mjs → rate-limit-GN64_Jaw.mjs} +5 -5
- package/dist/{redirect-CGl64yOX.mjs → redirect-BHo9--Jz.mjs} +3 -3
- package/dist/{redirects-Cgi_cZfN.mjs → redirects-Bc40BgxA.mjs} +4 -4
- package/dist/{redirects-lrlmYXVE.mjs → redirects-xVDvj_yQ.mjs} +68 -15
- package/dist/{registry-C-_hxLqa.mjs → registry-DumDzFDn.mjs} +5 -5
- package/dist/{request-cache-DHMRr2Lf.mjs → request-cache-DmVyQUBh.mjs} +5 -1
- package/dist/request-context.d.mts +19 -1
- package/dist/request-context.mjs +15 -3
- package/dist/{request-meta-DixlNKKa.mjs → request-meta-BVx9KkL-.mjs} +1 -1
- package/dist/{review-requests-C2DIHwlJ.mjs → review-requests-BYuoyse0.mjs} +1 -1
- package/dist/{review-requests-DIyjw-K_.mjs → review-requests-vCw7_3DS.mjs} +1 -1
- package/dist/{runner-BU6Lo1ZS.d.mts → runner-CHR_W79l.d.mts} +1 -1
- package/dist/{runner-DWZm2KQm.mjs → runner-lqEiJbO-.mjs} +496 -181
- package/dist/{runtime-QuuFSlc6.d.mts → runtime-B5hJAnKF.d.mts} +17 -16
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +5 -5
- package/dist/{schema-BECjUhP8.mjs → schema-D1z41cq_.mjs} +1 -1
- package/dist/{search-DqTHQqtV.mjs → search-CPcQGTHW.mjs} +2 -2
- package/dist/{secrets-CkoJ9zN0.mjs → secrets-AFKoqUXj.mjs} +2 -2
- package/dist/{sections-B61OxnfB.mjs → sections-B9RYyf3I.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +19 -19
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-CUQctrog.mjs → seo-BPz1KkCq.mjs} +1 -1
- package/dist/{service-CyOsm0R6.mjs → service-DgiH1Yud.mjs} +2 -2
- package/dist/{settings-Dzgswvg4.mjs → settings-BGCo_c2y.mjs} +1 -1
- package/dist/{settings-DGtLLSaz.mjs → settings-qPzY2KIF.mjs} +4 -4
- package/dist/{setup-complete-ChilE-da.mjs → setup-complete-4EiBS1E5.mjs} +1 -1
- package/dist/{site-activity-B8FjLIVh.mjs → site-activity-lsCX_cqp.mjs} +1 -1
- package/dist/{site-context-WBxoD99D.mjs → site-context-DHRIU6x9.mjs} +58 -34
- package/dist/{site-url-BP7k7OCe.mjs → site-url-oyqzZtoL.mjs} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/taxonomies-BWmxbumf.mjs +350 -0
- package/dist/taxonomies-aQXvYVPm.mjs +507 -0
- package/dist/taxonomy-DI-0HgKe.mjs +217 -0
- package/dist/{tokens-BOJw-D9F.mjs → tokens-DB4dASZl.mjs} +1 -1
- package/dist/{types-DZPw8Rru.d.mts → types-CYBaBvtm.d.mts} +9 -0
- package/dist/{types-C0mmVRJN.d.mts → types-CsnHvu4J.d.mts} +1 -0
- package/dist/{types-Bs6lTBBW.mjs → types-D1DjBFA9.mjs} +8 -2
- package/dist/{types-Q616b2Hn.d.mts → types-DS5PYew4.d.mts} +1 -1
- package/dist/ui/server-runtime.d.mts +7 -7
- package/dist/ui/server-runtime.mjs +19 -19
- package/dist/{user-CcXq-zoL.mjs → user-2aI21yV1.mjs} +1 -1
- package/dist/{utils-C0ONdBul.mjs → utils-BJF19gfk.mjs} +1 -1
- package/dist/{validate-C7TzfamJ.mjs → validate-B8ZvLeOE.mjs} +12 -8
- package/dist/{validate-BwmQEbu8.d.mts → validate-BQ24E8rK.d.mts} +21 -4
- package/dist/version-CjsyxeBD.mjs +6 -0
- package/dist/{widgets-B7DRpZvy.mjs → widgets-Cce2-2fM.mjs} +2 -2
- package/dist/{wordpress-slugs-CnporCYH.mjs → wordpress-slugs-C4EhE6fo.mjs} +1 -1
- package/dist/{zod-generator-DBVP8D0P.mjs → zod-generator-BKhtHT3e.mjs} +3 -3
- package/package.json +5 -5
- package/dist/menus-DS3_5nWY.mjs +0 -312
- package/dist/taxonomies-D2aZGuns.mjs +0 -270
- package/dist/taxonomies-z6Lz91BC.mjs +0 -355
- package/dist/taxonomy-D5cbhc8u.mjs +0 -165
- package/dist/version-DzWaHle7.mjs +0 -6
- /package/dist/{adapters-DuLQZhRY.d.mts → adapters-BPzUiHHm.d.mts} +0 -0
- /package/dist/{api-tokens-CPjC3zf8.mjs → api-tokens-B7fvbHM2.mjs} +0 -0
- /package/dist/{base64-Cz-aU0X1.mjs → base64-C1Q9yr0B.mjs} +0 -0
- /package/dist/{challenge-store-DDTbisbf.mjs → challenge-store-anhwVER0.mjs} +0 -0
- /package/dist/{components-BPknylYg.mjs → components-BQiBW_Ji.mjs} +0 -0
- /package/dist/{config-CAMFxGaV.mjs → config-XW5tMrH8.mjs} +0 -0
- /package/dist/{context-types-C-LwdAxx.mjs → context-types-DuiyY6xF.mjs} +0 -0
- /package/dist/{cron-CKxvBrRT.mjs → cron-fV9baRVc.mjs} +0 -0
- /package/dist/{db-errors-DyZkswzF.mjs → db-errors-BnUbfGsK.mjs} +0 -0
- /package/dist/{default-D4ngTpW8.mjs → default-2JDm1rj_.mjs} +0 -0
- /package/dist/{email-console-CuefUXfX.mjs → email-console-_pTim1bU.mjs} +0 -0
- /package/dist/{entity-aliases-C0v-yNET.mjs → entity-aliases-PJV8IxDq.mjs} +0 -0
- /package/dist/{error-BMUPwxgx.mjs → error-Dyf9fGZE.mjs} +0 -0
- /package/dist/{escape-BRVaw1Ai.mjs → escape-Bn168-uP.mjs} +0 -0
- /package/dist/{experimental-workflows-C9X7yblQ.mjs → experimental-workflows-CSRjuEwS.mjs} +0 -0
- /package/dist/{hash-CDX7M0ze.mjs → hash-V8oZo1W2.mjs} +0 -0
- /package/dist/{load-B2XtDw__.mjs → load-BvyvS_76.mjs} +0 -0
- /package/dist/{manifest-schema-CgFJAp0H.mjs → manifest-schema-CU0XL_ZK.mjs} +0 -0
- /package/dist/{mode-DUhxwUhv.mjs → mode-DWw2di1I.mjs} +0 -0
- /package/dist/{normalize-C49G_o1k.mjs → normalize-9GU-bv_T.mjs} +0 -0
- /package/dist/{oauth-state-store-C5UFhzwD.mjs → oauth-state-store-DhifLitQ.mjs} +0 -0
- /package/dist/{oauth-user-lookup-Bi0ek9eM.mjs → oauth-user-lookup-nyXQ2_6Q.mjs} +0 -0
- /package/dist/{options-z8VVg1Ll.mjs → options-BF11H_FD.mjs} +0 -0
- /package/dist/{passkey-config-BRSZx4pW.mjs → passkey-config-DZOjt0Hd.mjs} +0 -0
- /package/dist/{patterns-K0DLqWir.mjs → patterns-CW4n2PQs.mjs} +0 -0
- /package/dist/{placeholder-C2P5fKa4.mjs → placeholder-BJPmhjHP.mjs} +0 -0
- /package/dist/{provider-loader-C21b9OpH.mjs → provider-loader-Decn0Ktc.mjs} +0 -0
- /package/dist/{public-url-Cun8N3NU.mjs → public-url-5fFLJhjh.mjs} +0 -0
- /package/dist/{redirect-COZy-3iY.mjs → redirect-C077gVTf.mjs} +0 -0
- /package/dist/{seo-C007Luwn.mjs → seo-DJoop90w.mjs} +0 -0
- /package/dist/{seo-contributions-B1fWCnqY.mjs → seo-contributions-CQzUjJKY.mjs} +0 -0
- /package/dist/{setup-nonce-BpmLXAuu.mjs → setup-nonce-DN6BHIlP.mjs} +0 -0
- /package/dist/{sidecar-client-B1C6Cf80.mjs → sidecar-client-Dta0AELf.mjs} +0 -0
- /package/dist/{slugify-PDTDtMXp.mjs → slugify-BzGxlOFx.mjs} +0 -0
- /package/dist/{ssrf-DDwRxF6B.mjs → ssrf-BOSGjXxb.mjs} +0 -0
- /package/dist/{transaction-x2tJQ-A1.mjs → transaction-qfqpPVpu.mjs} +0 -0
- /package/dist/{transport-D3i4yWRE.mjs → transport-B3jxvfio.mjs} +0 -0
- /package/dist/{transport-BXe1AM79.d.mts → transport-CyOHECBA.d.mts} +0 -0
- /package/dist/{trusted-proxy-BbaZfkT9.mjs → trusted-proxy-8N8sX1D1.mjs} +0 -0
- /package/dist/{types-DJlpx5Ay.d.mts → types-6N-00csp.d.mts} +0 -0
- /package/dist/{types-BFmjniC2.d.mts → types-B45uSz1j.d.mts} +0 -0
- /package/dist/{types-B7kpsMJ3.d.mts → types-BDm7Ipoq.d.mts} +0 -0
- /package/dist/{types-0Vr68fc2.d.mts → types-BeYn-Yf0.d.mts} +0 -0
- /package/dist/{types-OPs5Q_sX.d.mts → types-D_wGrwiY.d.mts} +0 -0
- /package/dist/{types-DL7Y8D_t.mjs → types-Dz2EKzsX.mjs} +0 -0
- /package/dist/{types-fAInWQDO.mjs → types-iNqHe2-V.mjs} +0 -0
- /package/dist/{url-DNjT2abR.mjs → url-DOS4RGym.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
2
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
1
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-Dyf9fGZE.mjs";
|
|
2
|
+
import { n as requirePerm } from "../../../../../../authorize-wQDmXQJ1.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/media/providers/[providerId]/[itemId].ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
2
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
1
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-Dyf9fGZE.mjs";
|
|
2
|
+
import { n as requirePerm } from "../../../../../../authorize-wQDmXQJ1.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/media/providers/[providerId]/index.ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as apiSuccess, t as apiError } from "../../../../../error-
|
|
2
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
1
|
+
import { n as apiSuccess, t as apiError } from "../../../../../error-Dyf9fGZE.mjs";
|
|
2
|
+
import { n as requirePerm } from "../../../../../authorize-wQDmXQJ1.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/media/providers/index.ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import "../../../../
|
|
2
|
-
import
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import "../../../../
|
|
1
|
+
import { n as normalizeMime, t as matchesMimeAllowlist } from "../../../../mime-DJOFDGux.mjs";
|
|
2
|
+
import "../../../../context-types-DuiyY6xF.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-Dyf9fGZE.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../parse-BBfZRZYb.mjs";
|
|
5
|
+
import { Rt as DEFAULT_MAX_UPLOAD_SIZE, Yt as mediaUploadUrlBody } from "../../../../redirects-xVDvj_yQ.mjs";
|
|
6
|
+
import "../../../../import-DE2ziezs.mjs";
|
|
6
7
|
import "../../../../api/schemas/index.mjs";
|
|
7
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
8
|
+
import { n as requirePerm } from "../../../../authorize-wQDmXQJ1.mjs";
|
|
9
|
+
import { n as resolveFieldAllowlist, t as GLOBAL_UPLOAD_ALLOWLIST } from "../../../../media-allowlist-eS3AZ2L_.mjs";
|
|
8
10
|
import { ulid } from "ulidx";
|
|
9
11
|
import * as path from "node:path";
|
|
10
12
|
import { MediaRepository } from "dineway";
|
|
@@ -33,12 +35,8 @@ const POST = async ({ request, locals }) => {
|
|
|
33
35
|
if (!Number.isFinite(maxUploadSize) || maxUploadSize <= 0) return apiError("CONFIGURATION_ERROR", "Invalid maxUploadSize configuration. Expected a positive finite number.", 500);
|
|
34
36
|
const body = await parseBody(request, mediaUploadUrlBody(maxUploadSize));
|
|
35
37
|
if (isParseError(body)) return body;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"video/",
|
|
39
|
-
"audio/",
|
|
40
|
-
"application/pdf"
|
|
41
|
-
].some((type) => body.contentType.startsWith(type))) return apiError("INVALID_TYPE", "File type not allowed", 400);
|
|
38
|
+
const allowlist = (body.fieldId ? await resolveFieldAllowlist(dineway.db, body.fieldId) : null) ?? [...GLOBAL_UPLOAD_ALLOWLIST];
|
|
39
|
+
if (!matchesMimeAllowlist(body.contentType, allowlist)) return apiError("INVALID_TYPE", "File type not allowed", 400);
|
|
42
40
|
const repo = new MediaRepository(dineway.db);
|
|
43
41
|
if (body.contentHash) {
|
|
44
42
|
const existing = await repo.findByContentHash(body.contentHash);
|
|
@@ -52,7 +50,7 @@ const POST = async ({ request, locals }) => {
|
|
|
52
50
|
const storageKey = `${ulid()}${path.extname(body.filename) || ""}`;
|
|
53
51
|
const mediaItem = await repo.createPending({
|
|
54
52
|
filename: body.filename,
|
|
55
|
-
mimeType: body.contentType,
|
|
53
|
+
mimeType: normalizeMime(body.contentType),
|
|
56
54
|
size: body.size,
|
|
57
55
|
storageKey,
|
|
58
56
|
contentHash: body.contentHash,
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import "../../../base64-
|
|
2
|
-
import "../../../types-
|
|
3
|
-
import { t as MediaRepository } from "../../../media-
|
|
4
|
-
import { t as generatePlaceholder } from "../../../placeholder-
|
|
5
|
-
import "../../../
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "../../../
|
|
1
|
+
import "../../../base64-C1Q9yr0B.mjs";
|
|
2
|
+
import "../../../types-D1DjBFA9.mjs";
|
|
3
|
+
import { t as MediaRepository } from "../../../media-Cg4zc9fq.mjs";
|
|
4
|
+
import { t as generatePlaceholder } from "../../../placeholder-BJPmhjHP.mjs";
|
|
5
|
+
import { n as normalizeMime, t as matchesMimeAllowlist } from "../../../mime-DJOFDGux.mjs";
|
|
6
|
+
import "../../../context-types-DuiyY6xF.mjs";
|
|
7
|
+
import { t as computeContentHash } from "../../../hash-V8oZo1W2.mjs";
|
|
8
|
+
import { a as unwrapResult, n as apiSuccess, r as handleError, t as apiError } from "../../../error-Dyf9fGZE.mjs";
|
|
9
|
+
import { i as parseQuery, t as isParseError } from "../../../parse-BBfZRZYb.mjs";
|
|
10
|
+
import { Rt as DEFAULT_MAX_UPLOAD_SIZE, Wt as mediaListQuery, zt as formatFileSize } from "../../../redirects-xVDvj_yQ.mjs";
|
|
11
|
+
import "../../../import-DE2ziezs.mjs";
|
|
11
12
|
import "../../../api/schemas/index.mjs";
|
|
12
|
-
import { n as requirePerm } from "../../../authorize-
|
|
13
|
+
import { n as requirePerm } from "../../../authorize-wQDmXQJ1.mjs";
|
|
14
|
+
import { n as resolveFieldAllowlist, t as GLOBAL_UPLOAD_ALLOWLIST } from "../../../media-allowlist-eS3AZ2L_.mjs";
|
|
13
15
|
import { ulid } from "ulidx";
|
|
14
16
|
import * as path from "node:path";
|
|
15
17
|
|
|
@@ -72,12 +74,10 @@ const POST = async ({ request, locals }) => {
|
|
|
72
74
|
const fileEntry = formData.get("file");
|
|
73
75
|
const file = fileEntry instanceof File ? fileEntry : null;
|
|
74
76
|
if (!file) return apiError("NO_FILE", "No file provided", 400);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"application/pdf"
|
|
80
|
-
].some((type) => file.type.startsWith(type))) return apiError("INVALID_TYPE", "File type not allowed", 400);
|
|
77
|
+
const fieldIdEntry = formData.get("fieldId");
|
|
78
|
+
const fieldId = typeof fieldIdEntry === "string" && fieldIdEntry.length > 0 ? fieldIdEntry : null;
|
|
79
|
+
const allowlist = (fieldId ? await resolveFieldAllowlist(dineway.db, fieldId) : null) ?? [...GLOBAL_UPLOAD_ALLOWLIST];
|
|
80
|
+
if (!matchesMimeAllowlist(file.type, allowlist)) return apiError("INVALID_TYPE", "File type not allowed", 400);
|
|
81
81
|
if (file.size > maxUploadSize) return apiError("PAYLOAD_TOO_LARGE", `File exceeds maximum size of ${formatFileSize(maxUploadSize)}`, 413);
|
|
82
82
|
const buffer = new Uint8Array(await file.arrayBuffer());
|
|
83
83
|
const contentHash = await computeContentHash(buffer);
|
|
@@ -111,7 +111,7 @@ const POST = async ({ request, locals }) => {
|
|
|
111
111
|
}
|
|
112
112
|
const result = await dineway.handleMediaCreate({
|
|
113
113
|
filename: file.name,
|
|
114
|
-
mimeType: file.type,
|
|
114
|
+
mimeType: normalizeMime(file.type),
|
|
115
115
|
size: file.size,
|
|
116
116
|
width,
|
|
117
117
|
height,
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
import "../../../../../dialect-helpers-
|
|
2
|
-
import "../../../../../content-
|
|
3
|
-
import "../../../../../base64-
|
|
4
|
-
import "../../../../../types-
|
|
5
|
-
import "../../../../../media-
|
|
6
|
-
import "../../../../../options-
|
|
7
|
-
import "../../../../../site-activity-
|
|
8
|
-
import "../../../../../review-requests-
|
|
9
|
-
import "../../../../../entity-aliases-
|
|
10
|
-
import "../../../../../
|
|
11
|
-
import "../../../../../
|
|
12
|
-
import "../../../../../
|
|
13
|
-
import "../../../../../
|
|
14
|
-
import "../../../../../
|
|
15
|
-
import "../../../../../
|
|
16
|
-
import "../../../../../
|
|
17
|
-
import "../../../../../query-
|
|
18
|
-
import "../../../../../zod-generator-
|
|
19
|
-
import "../../../../../schema-
|
|
20
|
-
import { a as handleMenuItemDelete, i as handleMenuItemCreate, s as handleMenuItemUpdate } from "../../../../../menus-
|
|
21
|
-
import { a as unwrapResult, r as handleError } from "../../../../../error-
|
|
22
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-
|
|
23
|
-
import {
|
|
24
|
-
import "../../../../../import-
|
|
1
|
+
import "../../../../../dialect-helpers-TkdbkFad.mjs";
|
|
2
|
+
import "../../../../../content-DvpMad_N.mjs";
|
|
3
|
+
import "../../../../../base64-C1Q9yr0B.mjs";
|
|
4
|
+
import "../../../../../types-D1DjBFA9.mjs";
|
|
5
|
+
import "../../../../../media-Cg4zc9fq.mjs";
|
|
6
|
+
import "../../../../../options-BF11H_FD.mjs";
|
|
7
|
+
import "../../../../../site-activity-lsCX_cqp.mjs";
|
|
8
|
+
import "../../../../../review-requests-BYuoyse0.mjs";
|
|
9
|
+
import "../../../../../entity-aliases-PJV8IxDq.mjs";
|
|
10
|
+
import "../../../../../request-cache-DmVyQUBh.mjs";
|
|
11
|
+
import "../../../../../briefing-4k6R0KAr.mjs";
|
|
12
|
+
import "../../../../../context-types-DuiyY6xF.mjs";
|
|
13
|
+
import "../../../../../fts-manager-D7KVeBmg.mjs";
|
|
14
|
+
import "../../../../../registry-DumDzFDn.mjs";
|
|
15
|
+
import "../../../../../loader-CQFxFOt1.mjs";
|
|
16
|
+
import "../../../../../settings-qPzY2KIF.mjs";
|
|
17
|
+
import "../../../../../query-BtuwuZRd.mjs";
|
|
18
|
+
import "../../../../../zod-generator-BKhtHT3e.mjs";
|
|
19
|
+
import "../../../../../schema-D1z41cq_.mjs";
|
|
20
|
+
import { a as handleMenuItemDelete, i as handleMenuItemCreate, s as handleMenuItemUpdate } from "../../../../../menus-CwI7DQJ5.mjs";
|
|
21
|
+
import { a as unwrapResult, r as handleError } from "../../../../../error-Dyf9fGZE.mjs";
|
|
22
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-BBfZRZYb.mjs";
|
|
23
|
+
import { et as createMenuItemBody, kn as localeFilterQuery, rt as menuItemUpdateQuery, tt as menuItemDeleteQuery, ut as updateMenuItemBody } from "../../../../../redirects-xVDvj_yQ.mjs";
|
|
24
|
+
import "../../../../../import-DE2ziezs.mjs";
|
|
25
25
|
import "../../../../../api/schemas/index.mjs";
|
|
26
|
-
import "../../../../../utils-
|
|
27
|
-
import "../../../../../search-
|
|
28
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
29
|
-
import { _ as RiskPolicyEvaluator, u as MenuHitlPayloadBuilder } from "../../../../../site-context-
|
|
30
|
-
import { c as logMenuActivity, g as menuApiRouteSource } from "../../../../../activity-events-
|
|
31
|
-
import { i as resolveHitlRouteActor, n as hitlRequiredRouteError, t as ensureWorkflowHitlRouteRequest } from "../../../../../hitl-route-helpers-
|
|
26
|
+
import "../../../../../utils-BJF19gfk.mjs";
|
|
27
|
+
import "../../../../../search-CPcQGTHW.mjs";
|
|
28
|
+
import { n as requirePerm } from "../../../../../authorize-wQDmXQJ1.mjs";
|
|
29
|
+
import { _ as RiskPolicyEvaluator, u as MenuHitlPayloadBuilder } from "../../../../../site-context-DHRIU6x9.mjs";
|
|
30
|
+
import { c as logMenuActivity, g as menuApiRouteSource } from "../../../../../activity-events-DbqJBNaY.mjs";
|
|
31
|
+
import { i as resolveHitlRouteActor, n as hitlRequiredRouteError, t as ensureWorkflowHitlRouteRequest } from "../../../../../hitl-route-helpers-DcUCm57p.mjs";
|
|
32
32
|
import { z } from "zod";
|
|
33
33
|
|
|
34
34
|
//#region src/astro/routes/api/menus/[name]/items.ts
|
|
35
35
|
const prerender = false;
|
|
36
36
|
const createMenuItemHitlBody = createMenuItemBody.extend({ hitlRequestId: z.string().min(1).optional() });
|
|
37
37
|
const updateMenuItemHitlBody = updateMenuItemBody.extend({ hitlRequestId: z.string().min(1).optional() });
|
|
38
|
-
const deleteMenuItemHitlQuery = menuItemDeleteQuery.extend({
|
|
38
|
+
const deleteMenuItemHitlQuery = menuItemDeleteQuery.extend({
|
|
39
|
+
locale: z.string().min(1).optional(),
|
|
40
|
+
hitlRequestId: z.string().min(1).optional()
|
|
41
|
+
});
|
|
42
|
+
const updateMenuItemHitlQuery = menuItemUpdateQuery.extend({ locale: z.string().min(1).optional() });
|
|
39
43
|
const POST = async ({ params, request, locals }) => {
|
|
40
44
|
const { dineway, user } = locals;
|
|
41
45
|
const name = params.name;
|
|
42
46
|
const denied = requirePerm(user, "menus:manage");
|
|
43
47
|
if (denied) return denied;
|
|
48
|
+
const localeQ = parseQuery(new URL(request.url), localeFilterQuery);
|
|
49
|
+
if (isParseError(localeQ)) return localeQ;
|
|
44
50
|
try {
|
|
45
51
|
const body = await parseBody(request, createMenuItemHitlBody);
|
|
46
52
|
if (isParseError(body)) return body;
|
|
@@ -48,6 +54,7 @@ const POST = async ({ params, request, locals }) => {
|
|
|
48
54
|
const actor = resolveHitlRouteActor(locals);
|
|
49
55
|
const action = await new MenuHitlPayloadBuilder(dineway.db).buildCreateMenuItemRequest({
|
|
50
56
|
menuName: name,
|
|
57
|
+
locale: localeQ.locale,
|
|
51
58
|
...menuInput
|
|
52
59
|
});
|
|
53
60
|
const decision = await new RiskPolicyEvaluator({
|
|
@@ -59,7 +66,7 @@ const POST = async ({ params, request, locals }) => {
|
|
|
59
66
|
action
|
|
60
67
|
});
|
|
61
68
|
if (!decision.allowed) return hitlRequiredRouteError(decision, await ensureWorkflowHitlRouteRequest(dineway.db, locals, decision.action));
|
|
62
|
-
const result = await handleMenuItemCreate(dineway.db, name, menuInput);
|
|
69
|
+
const result = await handleMenuItemCreate(dineway.db, name, menuInput, { locale: localeQ.locale });
|
|
63
70
|
if (!result.success) return unwrapResult(result, 201);
|
|
64
71
|
await logMenuActivity(dineway.db, locals, {
|
|
65
72
|
action: "item_created",
|
|
@@ -82,7 +89,7 @@ const PUT = async ({ params, request, locals }) => {
|
|
|
82
89
|
const name = params.name;
|
|
83
90
|
const denied = requirePerm(user, "menus:manage");
|
|
84
91
|
if (denied) return denied;
|
|
85
|
-
const query = parseQuery(new URL(request.url),
|
|
92
|
+
const query = parseQuery(new URL(request.url), updateMenuItemHitlQuery);
|
|
86
93
|
if (isParseError(query)) return query;
|
|
87
94
|
const itemId = query.id;
|
|
88
95
|
try {
|
|
@@ -93,6 +100,7 @@ const PUT = async ({ params, request, locals }) => {
|
|
|
93
100
|
const action = await new MenuHitlPayloadBuilder(dineway.db).buildUpdateMenuItemRequest({
|
|
94
101
|
menuName: name,
|
|
95
102
|
itemId,
|
|
103
|
+
locale: query.locale,
|
|
96
104
|
...menuInput
|
|
97
105
|
});
|
|
98
106
|
const decision = await new RiskPolicyEvaluator({
|
|
@@ -104,7 +112,7 @@ const PUT = async ({ params, request, locals }) => {
|
|
|
104
112
|
action
|
|
105
113
|
});
|
|
106
114
|
if (!decision.allowed) return hitlRequiredRouteError(decision, await ensureWorkflowHitlRouteRequest(dineway.db, locals, decision.action));
|
|
107
|
-
const result = await handleMenuItemUpdate(dineway.db, name, itemId, menuInput);
|
|
115
|
+
const result = await handleMenuItemUpdate(dineway.db, name, itemId, menuInput, { locale: query.locale });
|
|
108
116
|
if (!result.success) return unwrapResult(result);
|
|
109
117
|
await logMenuActivity(dineway.db, locals, {
|
|
110
118
|
action: "item_updated",
|
|
@@ -134,7 +142,8 @@ const DELETE = async ({ params, request, locals }) => {
|
|
|
134
142
|
const actor = resolveHitlRouteActor(locals);
|
|
135
143
|
const action = await new MenuHitlPayloadBuilder(dineway.db).buildDeleteMenuItemRequest({
|
|
136
144
|
menuName: name,
|
|
137
|
-
itemId
|
|
145
|
+
itemId,
|
|
146
|
+
locale: query.locale
|
|
138
147
|
});
|
|
139
148
|
const decision = await new RiskPolicyEvaluator({
|
|
140
149
|
db: dineway.db,
|
|
@@ -145,7 +154,7 @@ const DELETE = async ({ params, request, locals }) => {
|
|
|
145
154
|
action
|
|
146
155
|
});
|
|
147
156
|
if (!decision.allowed) return hitlRequiredRouteError(decision, await ensureWorkflowHitlRouteRequest(dineway.db, locals, decision.action));
|
|
148
|
-
const result = await handleMenuItemDelete(dineway.db, name, itemId);
|
|
157
|
+
const result = await handleMenuItemDelete(dineway.db, name, itemId, { locale: query.locale });
|
|
149
158
|
if (!result.success) return unwrapResult(result);
|
|
150
159
|
await logMenuActivity(dineway.db, locals, {
|
|
151
160
|
action: "item_deleted",
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import "../../../../../dialect-helpers-
|
|
2
|
-
import "../../../../../content-
|
|
3
|
-
import "../../../../../base64-
|
|
4
|
-
import "../../../../../types-
|
|
5
|
-
import "../../../../../media-
|
|
6
|
-
import "../../../../../options-
|
|
7
|
-
import "../../../../../site-activity-
|
|
8
|
-
import "../../../../../review-requests-
|
|
9
|
-
import "../../../../../entity-aliases-
|
|
10
|
-
import "../../../../../
|
|
11
|
-
import "../../../../../
|
|
12
|
-
import "../../../../../
|
|
13
|
-
import "../../../../../
|
|
14
|
-
import "../../../../../
|
|
15
|
-
import "../../../../../
|
|
16
|
-
import "../../../../../
|
|
17
|
-
import "../../../../../query-
|
|
18
|
-
import "../../../../../zod-generator-
|
|
19
|
-
import "../../../../../schema-
|
|
20
|
-
import { o as handleMenuItemReorder } from "../../../../../menus-
|
|
21
|
-
import { a as unwrapResult, r as handleError } from "../../../../../error-
|
|
22
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
23
|
-
import {
|
|
24
|
-
import "../../../../../import-
|
|
1
|
+
import "../../../../../dialect-helpers-TkdbkFad.mjs";
|
|
2
|
+
import "../../../../../content-DvpMad_N.mjs";
|
|
3
|
+
import "../../../../../base64-C1Q9yr0B.mjs";
|
|
4
|
+
import "../../../../../types-D1DjBFA9.mjs";
|
|
5
|
+
import "../../../../../media-Cg4zc9fq.mjs";
|
|
6
|
+
import "../../../../../options-BF11H_FD.mjs";
|
|
7
|
+
import "../../../../../site-activity-lsCX_cqp.mjs";
|
|
8
|
+
import "../../../../../review-requests-BYuoyse0.mjs";
|
|
9
|
+
import "../../../../../entity-aliases-PJV8IxDq.mjs";
|
|
10
|
+
import "../../../../../request-cache-DmVyQUBh.mjs";
|
|
11
|
+
import "../../../../../briefing-4k6R0KAr.mjs";
|
|
12
|
+
import "../../../../../context-types-DuiyY6xF.mjs";
|
|
13
|
+
import "../../../../../fts-manager-D7KVeBmg.mjs";
|
|
14
|
+
import "../../../../../registry-DumDzFDn.mjs";
|
|
15
|
+
import "../../../../../loader-CQFxFOt1.mjs";
|
|
16
|
+
import "../../../../../settings-qPzY2KIF.mjs";
|
|
17
|
+
import "../../../../../query-BtuwuZRd.mjs";
|
|
18
|
+
import "../../../../../zod-generator-BKhtHT3e.mjs";
|
|
19
|
+
import "../../../../../schema-D1z41cq_.mjs";
|
|
20
|
+
import { o as handleMenuItemReorder } from "../../../../../menus-CwI7DQJ5.mjs";
|
|
21
|
+
import { a as unwrapResult, r as handleError } from "../../../../../error-Dyf9fGZE.mjs";
|
|
22
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-BBfZRZYb.mjs";
|
|
23
|
+
import { ct as reorderMenuItemsBody, kn as localeFilterQuery } from "../../../../../redirects-xVDvj_yQ.mjs";
|
|
24
|
+
import "../../../../../import-DE2ziezs.mjs";
|
|
25
25
|
import "../../../../../api/schemas/index.mjs";
|
|
26
|
-
import "../../../../../utils-
|
|
27
|
-
import "../../../../../search-
|
|
28
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
29
|
-
import { _ as RiskPolicyEvaluator, u as MenuHitlPayloadBuilder } from "../../../../../site-context-
|
|
30
|
-
import { c as logMenuActivity, g as menuApiRouteSource } from "../../../../../activity-events-
|
|
31
|
-
import { i as resolveHitlRouteActor, n as hitlRequiredRouteError, t as ensureWorkflowHitlRouteRequest } from "../../../../../hitl-route-helpers-
|
|
26
|
+
import "../../../../../utils-BJF19gfk.mjs";
|
|
27
|
+
import "../../../../../search-CPcQGTHW.mjs";
|
|
28
|
+
import { n as requirePerm } from "../../../../../authorize-wQDmXQJ1.mjs";
|
|
29
|
+
import { _ as RiskPolicyEvaluator, u as MenuHitlPayloadBuilder } from "../../../../../site-context-DHRIU6x9.mjs";
|
|
30
|
+
import { c as logMenuActivity, g as menuApiRouteSource } from "../../../../../activity-events-DbqJBNaY.mjs";
|
|
31
|
+
import { i as resolveHitlRouteActor, n as hitlRequiredRouteError, t as ensureWorkflowHitlRouteRequest } from "../../../../../hitl-route-helpers-DcUCm57p.mjs";
|
|
32
32
|
import { z } from "zod";
|
|
33
33
|
|
|
34
34
|
//#region src/astro/routes/api/menus/[name]/reorder.ts
|
|
@@ -39,12 +39,15 @@ const POST = async ({ params, request, locals }) => {
|
|
|
39
39
|
const name = params.name;
|
|
40
40
|
const denied = requirePerm(user, "menus:manage");
|
|
41
41
|
if (denied) return denied;
|
|
42
|
+
const localeQ = parseQuery(new URL(request.url), localeFilterQuery);
|
|
43
|
+
if (isParseError(localeQ)) return localeQ;
|
|
42
44
|
try {
|
|
43
45
|
const body = await parseBody(request, reorderMenuItemsHitlBody);
|
|
44
46
|
if (isParseError(body)) return body;
|
|
45
47
|
const actor = resolveHitlRouteActor(locals);
|
|
46
48
|
const action = await new MenuHitlPayloadBuilder(dineway.db).buildReorderMenuItemsRequest({
|
|
47
49
|
menuName: name,
|
|
50
|
+
locale: localeQ.locale,
|
|
48
51
|
items: body.items
|
|
49
52
|
});
|
|
50
53
|
const decision = await new RiskPolicyEvaluator({
|
|
@@ -56,7 +59,7 @@ const POST = async ({ params, request, locals }) => {
|
|
|
56
59
|
action
|
|
57
60
|
});
|
|
58
61
|
if (!decision.allowed) return hitlRequiredRouteError(decision, await ensureWorkflowHitlRouteRequest(dineway.db, locals, decision.action));
|
|
59
|
-
const result = await handleMenuItemReorder(dineway.db, name, body.items);
|
|
62
|
+
const result = await handleMenuItemReorder(dineway.db, name, body.items, { locale: localeQ.locale });
|
|
60
63
|
if (!result.success) return unwrapResult(result);
|
|
61
64
|
await logMenuActivity(dineway.db, locals, {
|
|
62
65
|
action: "reordered",
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import "../../../../../dialect-helpers-TkdbkFad.mjs";
|
|
2
|
+
import "../../../../../content-DvpMad_N.mjs";
|
|
3
|
+
import "../../../../../base64-C1Q9yr0B.mjs";
|
|
4
|
+
import "../../../../../types-D1DjBFA9.mjs";
|
|
5
|
+
import "../../../../../media-Cg4zc9fq.mjs";
|
|
6
|
+
import "../../../../../options-BF11H_FD.mjs";
|
|
7
|
+
import "../../../../../site-activity-lsCX_cqp.mjs";
|
|
8
|
+
import "../../../../../review-requests-BYuoyse0.mjs";
|
|
9
|
+
import "../../../../../entity-aliases-PJV8IxDq.mjs";
|
|
10
|
+
import "../../../../../request-cache-DmVyQUBh.mjs";
|
|
11
|
+
import "../../../../../briefing-4k6R0KAr.mjs";
|
|
12
|
+
import "../../../../../context-types-DuiyY6xF.mjs";
|
|
13
|
+
import "../../../../../fts-manager-D7KVeBmg.mjs";
|
|
14
|
+
import "../../../../../registry-DumDzFDn.mjs";
|
|
15
|
+
import "../../../../../loader-CQFxFOt1.mjs";
|
|
16
|
+
import "../../../../../settings-qPzY2KIF.mjs";
|
|
17
|
+
import "../../../../../query-BtuwuZRd.mjs";
|
|
18
|
+
import "../../../../../zod-generator-BKhtHT3e.mjs";
|
|
19
|
+
import "../../../../../schema-D1z41cq_.mjs";
|
|
20
|
+
import { l as handleMenuTranslations, r as handleMenuGet, t as handleMenuCreate } from "../../../../../menus-CwI7DQJ5.mjs";
|
|
21
|
+
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../../error-Dyf9fGZE.mjs";
|
|
22
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-BBfZRZYb.mjs";
|
|
23
|
+
import { kn as localeFilterQuery } from "../../../../../redirects-xVDvj_yQ.mjs";
|
|
24
|
+
import "../../../../../import-DE2ziezs.mjs";
|
|
25
|
+
import "../../../../../api/schemas/index.mjs";
|
|
26
|
+
import "../../../../../utils-BJF19gfk.mjs";
|
|
27
|
+
import "../../../../../search-CPcQGTHW.mjs";
|
|
28
|
+
import { n as requirePerm } from "../../../../../authorize-wQDmXQJ1.mjs";
|
|
29
|
+
import { _ as RiskPolicyEvaluator, u as MenuHitlPayloadBuilder } from "../../../../../site-context-DHRIU6x9.mjs";
|
|
30
|
+
import { c as logMenuActivity, g as menuApiRouteSource } from "../../../../../activity-events-DbqJBNaY.mjs";
|
|
31
|
+
import { i as resolveHitlRouteActor, n as hitlRequiredRouteError, t as ensureWorkflowHitlRouteRequest } from "../../../../../hitl-route-helpers-DcUCm57p.mjs";
|
|
32
|
+
import { z } from "zod";
|
|
33
|
+
|
|
34
|
+
//#region src/astro/routes/api/menus/[name]/translations.ts
|
|
35
|
+
const prerender = false;
|
|
36
|
+
const createTranslationBody = z.object({
|
|
37
|
+
locale: z.string().min(1),
|
|
38
|
+
label: z.string().min(1).optional(),
|
|
39
|
+
hitlRequestId: z.string().min(1).optional()
|
|
40
|
+
}).meta({ id: "CreateMenuTranslationBody" });
|
|
41
|
+
const GET = async ({ params, request, locals }) => {
|
|
42
|
+
const { dineway, user } = locals;
|
|
43
|
+
const name = params.name;
|
|
44
|
+
const dbErr = requireDb(dineway?.db);
|
|
45
|
+
if (dbErr) return dbErr;
|
|
46
|
+
const denied = requirePerm(user, "menus:read");
|
|
47
|
+
if (denied) return denied;
|
|
48
|
+
const localeQ = parseQuery(new URL(request.url), localeFilterQuery);
|
|
49
|
+
if (isParseError(localeQ)) return localeQ;
|
|
50
|
+
try {
|
|
51
|
+
const anchor = await handleMenuGet(dineway.db, name, { locale: localeQ.locale });
|
|
52
|
+
if (!anchor.success) return unwrapResult(anchor);
|
|
53
|
+
return unwrapResult(await handleMenuTranslations(dineway.db, anchor.data.id));
|
|
54
|
+
} catch (error) {
|
|
55
|
+
return handleError(error, "Failed to fetch menu translations", "MENU_TRANSLATIONS_ERROR");
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const POST = async ({ params, request, locals }) => {
|
|
59
|
+
const { dineway, user } = locals;
|
|
60
|
+
const name = params.name;
|
|
61
|
+
const dbErr = requireDb(dineway?.db);
|
|
62
|
+
if (dbErr) return dbErr;
|
|
63
|
+
const denied = requirePerm(user, "menus:manage");
|
|
64
|
+
if (denied) return denied;
|
|
65
|
+
const localeQ = parseQuery(new URL(request.url), localeFilterQuery);
|
|
66
|
+
if (isParseError(localeQ)) return localeQ;
|
|
67
|
+
try {
|
|
68
|
+
const body = await parseBody(request, createTranslationBody);
|
|
69
|
+
if (isParseError(body)) return body;
|
|
70
|
+
const source = await handleMenuGet(dineway.db, name, { locale: localeQ.locale });
|
|
71
|
+
if (!source.success) return unwrapResult(source);
|
|
72
|
+
const { hitlRequestId, ...translationInput } = body;
|
|
73
|
+
const menuInput = {
|
|
74
|
+
name,
|
|
75
|
+
label: translationInput.label ?? source.data.label,
|
|
76
|
+
locale: translationInput.locale,
|
|
77
|
+
translationOf: source.data.id
|
|
78
|
+
};
|
|
79
|
+
const actor = resolveHitlRouteActor(locals);
|
|
80
|
+
const action = await new MenuHitlPayloadBuilder(dineway.db).buildCreateMenuRequest(menuInput);
|
|
81
|
+
const decision = await new RiskPolicyEvaluator({
|
|
82
|
+
db: dineway.db,
|
|
83
|
+
handlers: dineway
|
|
84
|
+
}).evaluateWorkflowHitl({
|
|
85
|
+
actor: actor.identity,
|
|
86
|
+
hitlRequestId,
|
|
87
|
+
action
|
|
88
|
+
});
|
|
89
|
+
if (!decision.allowed) return hitlRequiredRouteError(decision, await ensureWorkflowHitlRouteRequest(dineway.db, locals, decision.action));
|
|
90
|
+
const result = await handleMenuCreate(dineway.db, menuInput);
|
|
91
|
+
if (!result.success) return unwrapResult(result, 201);
|
|
92
|
+
await logMenuActivity(dineway.db, locals, {
|
|
93
|
+
action: "created",
|
|
94
|
+
menuName: result.data.name,
|
|
95
|
+
...menuApiRouteSource("created"),
|
|
96
|
+
summary: `Created ${result.data.locale} translation for menu ${result.data.name}`,
|
|
97
|
+
detail: {
|
|
98
|
+
label: result.data.label,
|
|
99
|
+
locale: result.data.locale,
|
|
100
|
+
translationOf: source.data.id,
|
|
101
|
+
hitlRequestId: decision.required ? decision.hitlRequest.id : null
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
return unwrapResult(result, 201);
|
|
105
|
+
} catch (error) {
|
|
106
|
+
return handleError(error, "Failed to create menu translation", "MENU_TRANSLATION_CREATE_ERROR");
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
export { GET, POST, prerender };
|