dineway 0.1.14 → 0.1.16
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-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-BTbpzvBq.mjs → api-B5xMY72-.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-DxXzWML_.d.mts → bylines-DE9bfDur.d.mts} +75 -13
- 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 +357 -104
- 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-DY_XmE9Y.d.mts} +15 -14
- 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-BlcGZRYm.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-HdNieFOD.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-B3z9Tv-J.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-CSyZ02_i.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,7 +1,7 @@
|
|
|
1
|
-
import { t as OptionsRepository } from "./options-
|
|
2
|
-
import { n as createPluginContext, t as PluginContextFactory } from "./context-
|
|
3
|
-
import { t as extractRequestMeta } from "./request-meta-
|
|
4
|
-
import { r as setCronTasksEnabled } from "./cron-
|
|
1
|
+
import { t as OptionsRepository } from "./options-BF11H_FD.mjs";
|
|
2
|
+
import { n as createPluginContext, t as PluginContextFactory } from "./context-CT44ux1O.mjs";
|
|
3
|
+
import { t as extractRequestMeta } from "./request-meta-BVx9KkL-.mjs";
|
|
4
|
+
import { r as setCronTasksEnabled } from "./cron-fV9baRVc.mjs";
|
|
5
5
|
import { sql } from "kysely";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { ulid } from "ulidx";
|
|
@@ -23,13 +23,15 @@ const imageSchema = z.object({
|
|
|
23
23
|
* Image field
|
|
24
24
|
* References media items from the media library
|
|
25
25
|
*/
|
|
26
|
-
function image(options) {
|
|
26
|
+
function image(options = {}) {
|
|
27
|
+
const validation = options.allowedTypes && options.allowedTypes.length > 0 ? { allowedMimeTypes: [...options.allowedTypes] } : void 0;
|
|
27
28
|
return {
|
|
28
29
|
type: "image",
|
|
29
30
|
columnType: "TEXT",
|
|
30
|
-
schema: options
|
|
31
|
+
schema: options.required === false ? imageSchema.optional() : imageSchema,
|
|
31
32
|
options,
|
|
32
|
-
ui: { widget: "image" }
|
|
33
|
+
ui: { widget: "image" },
|
|
34
|
+
validation
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runWithContext } from "./request-context.mjs";
|
|
2
2
|
import { n as createDatabase } from "./connection-BCNICDWN.mjs";
|
|
3
|
-
import { a as verifyPreviewSignature, t as buildPreviewSignatureHeader } from "./sidecar-client-
|
|
4
|
-
import { t as generatePreviewToken } from "./tokens-
|
|
3
|
+
import { a as verifyPreviewSignature, t as buildPreviewSignatureHeader } from "./sidecar-client-Dta0AELf.mjs";
|
|
4
|
+
import { t as generatePreviewToken } from "./tokens-DB4dASZl.mjs";
|
|
5
5
|
import BetterSqlite3 from "better-sqlite3";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
import { ulid } from "ulidx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as requestCached } from "./request-cache-DmVyQUBh.mjs";
|
|
2
|
+
import { n as SchemaRegistry } from "./registry-DumDzFDn.mjs";
|
|
3
|
+
import { r as getDb } from "./loader-CQFxFOt1.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/query.ts
|
|
6
6
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
2
2
|
import { getRequestContext } from "./request-context.mjs";
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as isMissingTableError } from "./db-errors-
|
|
3
|
+
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-XW5tMrH8.mjs";
|
|
4
|
+
import { r as encodeCursor } from "./types-D1DjBFA9.mjs";
|
|
5
|
+
import { n as requestCached } from "./request-cache-DmVyQUBh.mjs";
|
|
6
|
+
import { t as CURSOR_RAW_VALUES } from "./loader-CQFxFOt1.mjs";
|
|
7
|
+
import { t as isMissingTableError } from "./db-errors-BnUbfGsK.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/visual-editing/editable.ts
|
|
10
10
|
/**
|
|
@@ -436,7 +436,7 @@ async function getDinewayEntry(type, id, options) {
|
|
|
436
436
|
async function hydrateEntryBylines(type, entries) {
|
|
437
437
|
if (entries.length === 0) return;
|
|
438
438
|
try {
|
|
439
|
-
const { getBylinesForEntries } = await import("./bylines-
|
|
439
|
+
const { getBylinesForEntries } = await import("./bylines-DhCnhR70.mjs").then((n) => n.t);
|
|
440
440
|
const refs = entries.map((entry) => {
|
|
441
441
|
const data = entryData(entry);
|
|
442
442
|
const id = dataStr(data, "id");
|
|
@@ -465,7 +465,7 @@ async function hydrateEntryBylines(type, entries) {
|
|
|
465
465
|
async function hydrateEntryTerms(type, entries) {
|
|
466
466
|
if (entries.length === 0) return;
|
|
467
467
|
try {
|
|
468
|
-
const { getAllTermsForEntries } = await import("./taxonomies-
|
|
468
|
+
const { getAllTermsForEntries } = await import("./taxonomies-BWmxbumf.mjs").then((n) => n.l);
|
|
469
469
|
const ids = entries.map((entry) => dataStr(entryData(entry), "id")).filter(Boolean);
|
|
470
470
|
if (ids.length === 0) return;
|
|
471
471
|
const termsMap = await getAllTermsForEntries(type, ids);
|
|
@@ -499,9 +499,9 @@ async function hydrateEntryTerms(type, entries) {
|
|
|
499
499
|
*/
|
|
500
500
|
async function getTranslations(type, id) {
|
|
501
501
|
try {
|
|
502
|
-
const db = (await import("./loader-
|
|
502
|
+
const db = (await import("./loader-CQFxFOt1.mjs").then((n) => n.i)).getDb;
|
|
503
503
|
const dbInstance = await db();
|
|
504
|
-
const { ContentRepository } = await import("./content-
|
|
504
|
+
const { ContentRepository } = await import("./content-DvpMad_N.mjs").then((n) => n.n);
|
|
505
505
|
const repo = new ContentRepository(dbInstance);
|
|
506
506
|
const item = await repo.findByIdOrSlug(type, id);
|
|
507
507
|
if (!item) return {
|
|
@@ -568,8 +568,8 @@ async function resolveDinewayPath(path) {
|
|
|
568
568
|
const hasDbOverride = !!getRequestContext()?.db;
|
|
569
569
|
let patterns = !hasDbOverride ? cachedUrlPatterns : null;
|
|
570
570
|
if (!patterns) {
|
|
571
|
-
const { getDb } = await import("./loader-
|
|
572
|
-
const { SchemaRegistry } = await import("./registry-
|
|
571
|
+
const { getDb } = await import("./loader-CQFxFOt1.mjs").then((n) => n.i);
|
|
572
|
+
const { SchemaRegistry } = await import("./registry-DumDzFDn.mjs").then((n) => n.r);
|
|
573
573
|
patterns = (await new SchemaRegistry(await getDb()).listCollections()).filter((collection) => collection.urlPattern).map((collection) => {
|
|
574
574
|
const { regex, paramNames } = patternToRegex(collection.urlPattern);
|
|
575
575
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as apiError } from "./error-
|
|
2
|
-
import { n as normalizeTrustedHeaders } from "./trusted-proxy-
|
|
1
|
+
import { t as apiError } from "./error-Dyf9fGZE.mjs";
|
|
2
|
+
import { n as normalizeTrustedHeaders } from "./trusted-proxy-8N8sX1D1.mjs";
|
|
3
3
|
import { sql } from "kysely";
|
|
4
4
|
|
|
5
5
|
//#region src/auth/rate-limit.ts
|
|
@@ -27,9 +27,9 @@ async function checkRateLimit(db, ip, endpoint, maxRequests, windowSeconds) {
|
|
|
27
27
|
};
|
|
28
28
|
const windowStart = (/* @__PURE__ */ new Date(Math.floor(Date.now() / (windowSeconds * 1e3)) * windowSeconds * 1e3)).toISOString();
|
|
29
29
|
const count = (await sql`
|
|
30
|
-
INSERT INTO _dineway_rate_limits (key, window, count)
|
|
30
|
+
INSERT INTO _dineway_rate_limits (key, "window", count)
|
|
31
31
|
VALUES (${`${ip}:${endpoint}`}, ${windowStart}, 1)
|
|
32
|
-
ON CONFLICT (key, window)
|
|
32
|
+
ON CONFLICT (key, "window")
|
|
33
33
|
DO UPDATE SET count = _dineway_rate_limits.count + 1
|
|
34
34
|
RETURNING count
|
|
35
35
|
`.execute(db)).rows[0]?.count ?? 1;
|
|
@@ -103,7 +103,7 @@ function readIpFromHeader(headers, name) {
|
|
|
103
103
|
*/
|
|
104
104
|
async function cleanupExpiredRateLimits(db, maxAgeSeconds = 3600) {
|
|
105
105
|
const result = await sql`
|
|
106
|
-
DELETE FROM _dineway_rate_limits WHERE window < ${(/* @__PURE__ */ new Date(Date.now() - maxAgeSeconds * 1e3)).toISOString()}
|
|
106
|
+
DELETE FROM _dineway_rate_limits WHERE "window" < ${(/* @__PURE__ */ new Date(Date.now() - maxAgeSeconds * 1e3)).toISOString()}
|
|
107
107
|
`.execute(db);
|
|
108
108
|
return Number(result.numAffectedRows ?? 0);
|
|
109
109
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as decodeCursor, r as encodeCursor } from "./types-
|
|
3
|
-
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-
|
|
1
|
+
import { i as currentTimestampValue } from "./dialect-helpers-TkdbkFad.mjs";
|
|
2
|
+
import { n as decodeCursor, r as encodeCursor } from "./types-D1DjBFA9.mjs";
|
|
3
|
+
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-CW4n2PQs.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
import { ulid } from "ulidx";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as OptionsRepository } from "./options-
|
|
2
|
-
import { a as validateDestinationParams, i as matchPattern, n as interpolateDestination, o as validatePattern, r as isPattern, t as compilePattern } from "./patterns-
|
|
3
|
-
import { t as RedirectRepository } from "./redirect-
|
|
4
|
-
import { i as invalidateRedirectCache } from "./cache-
|
|
1
|
+
import { t as OptionsRepository } from "./options-BF11H_FD.mjs";
|
|
2
|
+
import { a as validateDestinationParams, i as matchPattern, n as interpolateDestination, o as validatePattern, r as isPattern, t as compilePattern } from "./patterns-CW4n2PQs.mjs";
|
|
3
|
+
import { t as RedirectRepository } from "./redirect-BHo9--Jz.mjs";
|
|
4
|
+
import { i as invalidateRedirectCache } from "./cache-inQvbrP5.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/redirects/loops.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as isSafeHref } from "./url-
|
|
1
|
+
import { t as isSafeHref } from "./url-DOS4RGym.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/api/schemas/common.ts
|
|
@@ -30,6 +30,8 @@ const HTTP_SCHEME_RE = /^https?:\/\//i;
|
|
|
30
30
|
const httpUrl = z.string().url().refine((url) => HTTP_SCHEME_RE.test(url), "URL must use http or https");
|
|
31
31
|
/** BCP 47 locale code — language with optional script/region subtags (e.g. en, en-US, pt-BR, es-419, zh-Hant) */
|
|
32
32
|
const localeCode = z.string().regex(/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i, "Invalid locale code").transform((v) => v.toLowerCase());
|
|
33
|
+
/** Shared `?locale=xx` query shape for endpoints that filter by locale. */
|
|
34
|
+
const localeFilterQuery = z.object({ locale: z.string().min(1).optional() }).meta({ id: "LocaleFilterQuery" });
|
|
33
35
|
/** Standard API error response */
|
|
34
36
|
const apiErrorSchema = z.object({ error: z.object({
|
|
35
37
|
code: z.string().meta({
|
|
@@ -241,7 +243,10 @@ const contentTranslationsResponseSchema = z.object({
|
|
|
241
243
|
|
|
242
244
|
//#endregion
|
|
243
245
|
//#region src/api/schemas/media.ts
|
|
244
|
-
const
|
|
246
|
+
const mimeTypeFilter = z.union([z.string(), z.array(z.string())]).transform((value) => {
|
|
247
|
+
return (Array.isArray(value) ? value : value.split(",")).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
248
|
+
}).optional();
|
|
249
|
+
const mediaListQuery = cursorPaginationQuery.extend({ mimeType: mimeTypeFilter }).meta({ id: "MediaListQuery" });
|
|
245
250
|
const mediaUpdateBody = z.object({
|
|
246
251
|
alt: z.string().optional(),
|
|
247
252
|
caption: z.string().optional(),
|
|
@@ -255,13 +260,15 @@ function formatFileSize(bytes) {
|
|
|
255
260
|
if (bytes < 1024 * 1024) return `${Math.floor(bytes / 1024)}KB`;
|
|
256
261
|
return `${Math.floor(bytes / 1024 / 1024)}MB`;
|
|
257
262
|
}
|
|
263
|
+
const CONTENT_TYPE_RE = /^[a-z0-9][a-z0-9!#$&^_+\-.]*\/[a-z0-9!#$&^_+\-.]+(\s*;[^\r\n]*)?$/i;
|
|
258
264
|
function mediaUploadUrlBody(maxSize) {
|
|
259
265
|
if (!Number.isFinite(maxSize) || maxSize <= 0) throw new Error(`Dineway: maxUploadSize must be a positive finite number, got ${maxSize}`);
|
|
260
266
|
return z.object({
|
|
261
267
|
filename: z.string().min(1, "filename is required"),
|
|
262
|
-
contentType: z.string().min(1, "contentType is required"),
|
|
268
|
+
contentType: z.string().min(1, "contentType is required").regex(CONTENT_TYPE_RE, "Invalid content type"),
|
|
263
269
|
size: z.number().int().positive().max(maxSize, `File size must not exceed ${formatFileSize(maxSize)}`),
|
|
264
|
-
contentHash: z.string().optional()
|
|
270
|
+
contentHash: z.string().optional(),
|
|
271
|
+
fieldId: z.string().optional()
|
|
265
272
|
}).meta({ id: "MediaUploadUrlBody" });
|
|
266
273
|
}
|
|
267
274
|
const mediaConfirmBody = z.object({
|
|
@@ -271,7 +278,7 @@ const mediaConfirmBody = z.object({
|
|
|
271
278
|
}).meta({ id: "MediaConfirmBody" });
|
|
272
279
|
const mediaProviderListQuery = cursorPaginationQuery.extend({
|
|
273
280
|
query: z.string().optional(),
|
|
274
|
-
mimeType:
|
|
281
|
+
mimeType: mimeTypeFilter
|
|
275
282
|
}).meta({ id: "MediaProviderListQuery" });
|
|
276
283
|
const mediaStatusSchema = z.enum([
|
|
277
284
|
"pending",
|
|
@@ -371,7 +378,8 @@ const fieldValidation = z.object({
|
|
|
371
378
|
options: z.array(z.string()).optional(),
|
|
372
379
|
subFields: z.array(repeaterSubFieldSchema).min(1).optional(),
|
|
373
380
|
minItems: z.number().int().min(0).optional(),
|
|
374
|
-
maxItems: z.number().int().min(1).optional()
|
|
381
|
+
maxItems: z.number().int().min(1).optional(),
|
|
382
|
+
allowedMimeTypes: z.array(z.string().regex(/^[a-z0-9][a-z0-9!#$&^_+\-.]*\/[a-z0-9!#$&^_+\-.]*$/i, "Invalid MIME type")).min(1, "allowedMimeTypes must not be empty; omit the field to allow all types").max(64, "allowedMimeTypes may contain at most 64 entries").optional()
|
|
375
383
|
}).optional();
|
|
376
384
|
const fieldWidgetOptions = z.record(z.string(), z.unknown()).optional();
|
|
377
385
|
const createCollectionBody = z.object({
|
|
@@ -575,7 +583,9 @@ const menuItemType = z.string().min(1);
|
|
|
575
583
|
const safeHref = z.string().trim().refine(isSafeHref, "URL must use http, https, mailto, tel, a relative path, or a fragment identifier");
|
|
576
584
|
const createMenuBody = z.object({
|
|
577
585
|
name: z.string().min(1),
|
|
578
|
-
label: z.string().min(1)
|
|
586
|
+
label: z.string().min(1),
|
|
587
|
+
locale: z.string().min(1).optional(),
|
|
588
|
+
translationOf: z.string().min(1).optional()
|
|
579
589
|
}).meta({ id: "CreateMenuBody" });
|
|
580
590
|
const updateMenuBody = z.object({ label: z.string().min(1).optional() }).meta({ id: "UpdateMenuBody" });
|
|
581
591
|
const createMenuItemBody = z.object({
|
|
@@ -611,7 +621,9 @@ const menuSchema = z.object({
|
|
|
611
621
|
name: z.string(),
|
|
612
622
|
label: z.string(),
|
|
613
623
|
created_at: z.string(),
|
|
614
|
-
updated_at: z.string()
|
|
624
|
+
updated_at: z.string(),
|
|
625
|
+
locale: z.string(),
|
|
626
|
+
translation_group: z.string().nullable()
|
|
615
627
|
}).meta({ id: "Menu" });
|
|
616
628
|
const menuItemSchema = z.object({
|
|
617
629
|
id: z.string(),
|
|
@@ -626,8 +638,20 @@ const menuItemSchema = z.object({
|
|
|
626
638
|
title_attr: z.string().nullable(),
|
|
627
639
|
target: z.string().nullable(),
|
|
628
640
|
css_classes: z.string().nullable(),
|
|
629
|
-
created_at: z.string()
|
|
641
|
+
created_at: z.string(),
|
|
642
|
+
locale: z.string(),
|
|
643
|
+
translation_group: z.string().nullable()
|
|
630
644
|
}).meta({ id: "MenuItem" });
|
|
645
|
+
const menuTranslationsSchema = z.object({
|
|
646
|
+
translationGroup: z.string().nullable(),
|
|
647
|
+
translations: z.array(z.object({
|
|
648
|
+
id: z.string(),
|
|
649
|
+
name: z.string(),
|
|
650
|
+
label: z.string(),
|
|
651
|
+
locale: z.string(),
|
|
652
|
+
updatedAt: z.string()
|
|
653
|
+
}))
|
|
654
|
+
}).meta({ id: "MenuTranslations" });
|
|
631
655
|
const menuListItemSchema = menuSchema.extend({ itemCount: z.number().int() }).meta({ id: "MenuListItem" });
|
|
632
656
|
const menuWithItemsSchema = menuSchema.extend({ items: z.array(menuItemSchema) }).meta({ id: "MenuWithItems" });
|
|
633
657
|
|
|
@@ -638,14 +662,19 @@ const collectionSlugPattern = /^[a-z][a-z0-9_]*$/;
|
|
|
638
662
|
const createTaxonomyDefBody = z.object({
|
|
639
663
|
name: z.string().min(1).max(63).regex(/^[a-z][a-z0-9_]*$/, "Name must be lowercase alphanumeric with underscores"),
|
|
640
664
|
label: z.string().min(1).max(200),
|
|
665
|
+
labelSingular: z.string().min(1).max(200).optional(),
|
|
641
666
|
hierarchical: z.boolean().optional().default(false),
|
|
642
|
-
collections: z.array(z.string().min(1).max(63).regex(collectionSlugPattern, "Invalid collection slug format")).max(100).optional().default([])
|
|
667
|
+
collections: z.array(z.string().min(1).max(63).regex(collectionSlugPattern, "Invalid collection slug format")).max(100).optional().default([]),
|
|
668
|
+
locale: z.string().min(1).optional(),
|
|
669
|
+
translationOf: z.string().min(1).optional()
|
|
643
670
|
}).meta({ id: "CreateTaxonomyDefBody" });
|
|
644
671
|
const createTermBody = z.object({
|
|
645
672
|
slug: z.string().min(1),
|
|
646
673
|
label: z.string().min(1),
|
|
647
674
|
parentId: z.string().nullish(),
|
|
648
|
-
description: z.string().optional()
|
|
675
|
+
description: z.string().optional(),
|
|
676
|
+
locale: z.string().min(1).optional(),
|
|
677
|
+
translationOf: z.string().min(1).optional()
|
|
649
678
|
}).meta({ id: "CreateTermBody" });
|
|
650
679
|
const updateTermBody = z.object({
|
|
651
680
|
slug: z.string().min(1).optional(),
|
|
@@ -659,8 +688,19 @@ const taxonomyDefSchema = z.object({
|
|
|
659
688
|
label: z.string(),
|
|
660
689
|
labelSingular: z.string().optional(),
|
|
661
690
|
hierarchical: z.boolean(),
|
|
662
|
-
collections: z.array(z.string())
|
|
691
|
+
collections: z.array(z.string()),
|
|
692
|
+
locale: z.string(),
|
|
693
|
+
translationGroup: z.string().nullable()
|
|
663
694
|
}).meta({ id: "TaxonomyDef" });
|
|
695
|
+
const taxonomyDefTranslationsSchema = z.object({
|
|
696
|
+
translationGroup: z.string().nullable(),
|
|
697
|
+
translations: z.array(z.object({
|
|
698
|
+
id: z.string(),
|
|
699
|
+
name: z.string(),
|
|
700
|
+
label: z.string(),
|
|
701
|
+
locale: z.string()
|
|
702
|
+
}))
|
|
703
|
+
}).meta({ id: "TaxonomyDefTranslations" });
|
|
664
704
|
const taxonomyListResponseSchema = z.object({ taxonomies: z.array(taxonomyDefSchema) }).meta({ id: "TaxonomyListResponse" });
|
|
665
705
|
const termSchema = z.object({
|
|
666
706
|
id: z.string(),
|
|
@@ -668,8 +708,19 @@ const termSchema = z.object({
|
|
|
668
708
|
slug: z.string(),
|
|
669
709
|
label: z.string(),
|
|
670
710
|
parentId: z.string().nullable(),
|
|
671
|
-
description: z.string().optional()
|
|
711
|
+
description: z.string().optional(),
|
|
712
|
+
locale: z.string(),
|
|
713
|
+
translationGroup: z.string().nullable()
|
|
672
714
|
}).meta({ id: "Term" });
|
|
715
|
+
const termTranslationsSchema = z.object({
|
|
716
|
+
translationGroup: z.string().nullable(),
|
|
717
|
+
translations: z.array(z.object({
|
|
718
|
+
id: z.string(),
|
|
719
|
+
slug: z.string(),
|
|
720
|
+
label: z.string(),
|
|
721
|
+
locale: z.string()
|
|
722
|
+
}))
|
|
723
|
+
}).meta({ id: "TermTranslations" });
|
|
673
724
|
const termWithCountSchema = z.object({
|
|
674
725
|
id: z.string(),
|
|
675
726
|
name: z.string(),
|
|
@@ -678,7 +729,9 @@ const termWithCountSchema = z.object({
|
|
|
678
729
|
parentId: z.string().nullable(),
|
|
679
730
|
description: z.string().optional(),
|
|
680
731
|
count: z.number().int(),
|
|
681
|
-
children: z.array(z.lazy(() => termWithCountSchema))
|
|
732
|
+
children: z.array(z.lazy(() => termWithCountSchema)),
|
|
733
|
+
locale: z.string(),
|
|
734
|
+
translationGroup: z.string().nullable()
|
|
682
735
|
}).meta({ id: "TermWithCount" });
|
|
683
736
|
const termListResponseSchema = z.object({ terms: z.array(termWithCountSchema) }).meta({ id: "TermListResponse" });
|
|
684
737
|
const termResponseSchema = z.object({ term: termSchema }).meta({ id: "TermResponse" });
|
|
@@ -1020,4 +1073,4 @@ const notFoundSummarySchema = z.object({
|
|
|
1020
1073
|
const notFoundSummaryResponseSchema = z.object({ items: z.array(notFoundSummarySchema) }).meta({ id: "NotFoundSummaryResponse" });
|
|
1021
1074
|
|
|
1022
1075
|
//#endregion
|
|
1023
|
-
export {
|
|
1076
|
+
export { createMenuBody as $, contentItemSchema as $t, searchRebuildBody as A, offsetPaginationQuery as An, fieldResponseSchema as At, updateSectionBody as B, mediaConfirmBody as Bt, userDetailSchema as C, apiErrorSchema as Cn, collectionResponseSchema as Ct, usersListQuery as D, httpUrl as Dn, createFieldBody as Dt, userUpdateBody as E, deleteResponseSchema as En, createCollectionBody as Et, siteSettingsSchema as F, schemaExportQuery as Ft, taxonomyListResponseSchema as G, mediaListResponseSchema as Gt, createTermBody as H, mediaExistingResponseSchema as Ht, createSectionBody as I, updateCollectionBody as It, termResponseSchema as J, mediaUpdateBody as Jt, termGetResponseSchema as K, mediaProviderListQuery as Kt, sectionListResponseSchema as L, updateFieldBody as Lt, searchResultSchema as M, slugPattern as Mn, orphanRegisterBody as Mt, searchSuggestQuery as N, successEnvelope as Nn, orphanedTableListResponseSchema as Nt, searchEnableBody as O, localeCode as On, fieldListResponseSchema as Ot, settingsUpdateBody as P, orphanedTableSchema as Pt, updateTermBody as Q, contentCreateBody as Qt, sectionSchema as R, DEFAULT_MAX_UPLOAD_SIZE as Rt, allowedDomainUpdateBody as S, VALID_ROLE_LEVELS as Sn, collectionListResponseSchema as St, userSchema as T, cursorPaginationQuery as Tn, collectionWithFieldsResponseSchema as Tt, taxonomyDefSchema as U, mediaItemSchema as Ut, createTaxonomyDefBody as V, mediaConfirmResponseSchema as Vt, taxonomyDefTranslationsSchema as W, mediaListQuery as Wt, termTranslationsSchema as X, mediaUploadUrlResponseSchema as Xt, termSchema as Y, mediaUploadUrlBody as Yt, termWithCountSchema as Z, contentCompareResponseSchema as Zt, widgetAreaSchema as _, bylineListResponseSchema as _n, commentStatusBody as _t, notFoundPruneBody as a, contentScheduleBody as an, menuSchema as at, widgetSchema as b, bylinesListQuery as bn, publicCommentSchema as bt, notFoundSummarySchema as c, contentTermsBody as cn, reorderMenuItemsBody as ct, redirectsListQuery as d, contentTrashQuery as dn, adminCommentListResponseSchema as dt, contentListQuery as en, createMenuItemBody as et, updateRedirectBody as f, contentUpdateBody as fn, commentBulkBody as ft, updateWidgetBody as g, bylineCreditSchema as gn, commentSchema as gt, reorderWidgetsBody as h, bylineCreateBody as hn, commentListQuery as ht, notFoundListResponseSchema as i, contentResponseSchema as in, menuListItemSchema as it, searchResponseSchema as j, roleLevel as jn, fieldSchema as jt, searchQuery as k, localeFilterQuery as kn, fieldReorderBody as kt, redirectListResponseSchema as l, contentTranslationSchema as ln, updateMenuBody as lt, createWidgetBody as m, trashedContentListResponseSchema as mn, commentCountsResponseSchema as mt, notFoundEntrySchema as n, contentPreviewUrlBody as nn, menuItemSchema as nt, notFoundSummaryQuery as o, contentSeoInput as on, menuTranslationsSchema as ot, createWidgetAreaBody as p, trashedContentItemSchema as pn, commentBulkResponseSchema as pt, termListResponseSchema as q, mediaResponseSchema as qt, notFoundListQuery as r, contentPublishBody as rn, menuItemUpdateQuery as rt, notFoundSummaryResponseSchema as s, contentSeoSchema as sn, menuWithItemsSchema as st, createRedirectBody as t, contentListResponseSchema as tn, menuItemDeleteQuery as tt, redirectSchema as u, contentTranslationsResponseSchema as un, updateMenuItemBody as ut, widgetAreaWithWidgetsAndCountSchema as v, bylineSummarySchema as vn, createCommentBody as vt, userListResponseSchema as w, countResponseSchema as wn, collectionSchema as wt, allowedDomainCreateBody as x, contentBylineInputSchema as xn, collectionGetQuery as xt, widgetAreaWithWidgetsSchema as y, bylineUpdateBody as yn, publicCommentListResponseSchema as yt, sectionsListQuery as z, formatFileSize as zt };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as FTSManager } from "./fts-manager-
|
|
7
|
-
import { i as RESERVED_FIELD_SLUGS, n as FIELD_TYPE_TO_COLUMN, r as RESERVED_COLLECTION_SLUGS } from "./types-
|
|
3
|
+
import { c as listTablesLike, l as tableExists, r as currentTimestamp } from "./dialect-helpers-TkdbkFad.mjs";
|
|
4
|
+
import { t as withTransaction } from "./transaction-qfqpPVpu.mjs";
|
|
5
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-vkrCT4Ta.mjs";
|
|
6
|
+
import { t as FTSManager } from "./fts-manager-D7KVeBmg.mjs";
|
|
7
|
+
import { i as RESERVED_FIELD_SLUGS, n as FIELD_TYPE_TO_COLUMN, r as RESERVED_COLLECTION_SLUGS } from "./types-Dz2EKzsX.mjs";
|
|
8
8
|
import { sql } from "kysely";
|
|
9
9
|
import { ulid } from "ulidx";
|
|
10
10
|
|
|
@@ -27,7 +27,11 @@ function requestCached(key, fn) {
|
|
|
27
27
|
store.set(ctx, cache);
|
|
28
28
|
}
|
|
29
29
|
const existing = cache.get(key);
|
|
30
|
-
if (existing)
|
|
30
|
+
if (existing) {
|
|
31
|
+
if (ctx.metrics) ctx.metrics.cacheHits += 1;
|
|
32
|
+
return asTypedPromise(existing);
|
|
33
|
+
}
|
|
34
|
+
if (ctx.metrics) ctx.metrics.cacheMisses += 1;
|
|
31
35
|
const promise = Promise.resolve().then(fn).catch((error) => {
|
|
32
36
|
cache.delete(key);
|
|
33
37
|
throw error;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { QueryRecorder } from "./database/instrumentation.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/request-context.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Lightweight request counters surfaced in Server-Timing.
|
|
6
|
+
*
|
|
7
|
+
* Bumped by the Kysely log hook for database queries and by `requestCached`
|
|
8
|
+
* for cache hits/misses. Offsets are milliseconds from `start`.
|
|
9
|
+
*/
|
|
10
|
+
interface RequestMetrics {
|
|
11
|
+
start: number;
|
|
12
|
+
dbCount: number;
|
|
13
|
+
dbTotalMs: number;
|
|
14
|
+
dbFirstOffset: number | null;
|
|
15
|
+
dbLastOffset: number | null;
|
|
16
|
+
cacheHits: number;
|
|
17
|
+
cacheMisses: number;
|
|
18
|
+
}
|
|
19
|
+
declare function createRequestMetrics(start: number): RequestMetrics;
|
|
4
20
|
interface DinewayRequestContext {
|
|
5
21
|
/** Whether the current request is in visual editing mode */
|
|
6
22
|
editMode: boolean;
|
|
@@ -22,6 +38,8 @@ interface DinewayRequestContext {
|
|
|
22
38
|
db?: unknown;
|
|
23
39
|
/** Optional query recorder for per-request instrumentation. */
|
|
24
40
|
queryRecorder?: QueryRecorder;
|
|
41
|
+
/** Optional metrics collector for Server-Timing request counters. */
|
|
42
|
+
metrics?: RequestMetrics;
|
|
25
43
|
}
|
|
26
44
|
/**
|
|
27
45
|
* Run a function within a Dineway request context.
|
|
@@ -34,4 +52,4 @@ declare function runWithContext<T>(ctx: DinewayRequestContext, fn: () => T): T;
|
|
|
34
52
|
*/
|
|
35
53
|
declare function getRequestContext(): DinewayRequestContext | undefined;
|
|
36
54
|
//#endregion
|
|
37
|
-
export { DinewayRequestContext, getRequestContext, runWithContext };
|
|
55
|
+
export { DinewayRequestContext, RequestMetrics, createRequestMetrics, getRequestContext, runWithContext };
|
package/dist/request-context.mjs
CHANGED
|
@@ -8,8 +8,9 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
8
8
|
* without requiring explicit parameter passing. The middleware wraps next()
|
|
9
9
|
* in als.run(), making the context available to all code during rendering.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Middleware attaches a context whenever request-scoped state is needed: editing
|
|
12
|
+
* signals, preview state, a request-local database, instrumentation, or
|
|
13
|
+
* Server-Timing metrics.
|
|
13
14
|
*
|
|
14
15
|
* The AsyncLocalStorage instance is stored on globalThis with a Symbol key
|
|
15
16
|
* to guarantee a singleton even when bundlers duplicate this module across
|
|
@@ -17,6 +18,17 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
17
18
|
* multiple chunks (e.g. middleware and page components), each with its own
|
|
18
19
|
* ALS instance — breaking request-scoped state propagation.
|
|
19
20
|
*/
|
|
21
|
+
function createRequestMetrics(start) {
|
|
22
|
+
return {
|
|
23
|
+
start,
|
|
24
|
+
dbCount: 0,
|
|
25
|
+
dbTotalMs: 0,
|
|
26
|
+
dbFirstOffset: null,
|
|
27
|
+
dbLastOffset: null,
|
|
28
|
+
cacheHits: 0,
|
|
29
|
+
cacheMisses: 0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
20
32
|
const ALS_KEY = Symbol.for("dineway:request-context");
|
|
21
33
|
const storage = globalThis[ALS_KEY] ?? (() => {
|
|
22
34
|
const als = new AsyncLocalStorage();
|
|
@@ -39,4 +51,4 @@ function getRequestContext() {
|
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
//#endregion
|
|
42
|
-
export { getRequestContext, runWithContext };
|
|
54
|
+
export { createRequestMetrics, getRequestContext, runWithContext };
|