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
package/dist/index.mjs
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
import { getRequestContext, runWithContext } from "./request-context.mjs";
|
|
2
2
|
import { t as DinewayDatabaseError } from "./connection-BCNICDWN.mjs";
|
|
3
|
-
import "./dialect-helpers-
|
|
4
|
-
import { t as getMigrationStatus } from "./runner-
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import { t as
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import
|
|
22
|
-
import { t as
|
|
23
|
-
import "./
|
|
24
|
-
import
|
|
25
|
-
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import { n as
|
|
32
|
-
import "./
|
|
33
|
-
import
|
|
34
|
-
import "./
|
|
35
|
-
import "./briefing-
|
|
36
|
-
import "./review-requests-
|
|
37
|
-
import { n as hashString, t as computeContentHash } from "./hash-
|
|
38
|
-
import { t as getCollectionInfo } from "./query-
|
|
39
|
-
import "./zod-generator-
|
|
40
|
-
import "./schema-
|
|
41
|
-
import "./seo-
|
|
42
|
-
import "./menus-
|
|
43
|
-
import { o as getSection, s as getSections } from "./sections-
|
|
44
|
-
import "./settings-
|
|
45
|
-
import { a as getTaxonomyTerms, i as getTaxonomyDefs, n as getEntryTerms, o as getTerm, r as getTaxonomyDef, s as getTermsForEntries, t as getEntriesByTerm } from "./taxonomies-
|
|
46
|
-
import "./taxonomies-
|
|
47
|
-
import { i as pluginManifestSchema } from "./manifest-schema-
|
|
48
|
-
import { t as DinewayStorageError } from "./types-
|
|
49
|
-
import "./parse-
|
|
50
|
-
import "./redirects-
|
|
51
|
-
import "./import-
|
|
52
|
-
import { n as sanitizeHref, t as isSafeHref } from "./url-
|
|
53
|
-
import { c as createEditable, i as getTranslations, l as createNoop, n as getDinewayEntry, r as getEditMeta, s as resolveDinewayPath, t as getDinewayCollection } from "./query-
|
|
54
|
-
import { a as verifyPreviewSignature, i as signPreviewUrl, n as defaultPreviewSidecarClient, r as parsePreviewSignatureHeader, t as buildPreviewSignatureHeader } from "./sidecar-client-
|
|
55
|
-
import { a as createFilePreviewMiddleware, c as dropSessionDatabaseTables, d as SessionDatabaseLimitError, f as isBlockedInPreview, i as getPreviewUrl, l as getAppliedSnapshotMeta, n as isPreviewRequest, o as renderPreviewToolbar, p as renderPreviewLoadingPage, r as buildPreviewUrl, s as applySnapshotToDatabase, t as getPreviewToken, u as FileSessionDatabaseFactory } from "./preview-
|
|
56
|
-
import { a as getAllSources, c as getUrlSources, d as importReusableBlocksAsSections, f as parseWxr, i as clearSources, l as probeUrl, n as parseWxrDate, o as getFileSources, p as parseWxrString, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource } from "./import-
|
|
3
|
+
import "./dialect-helpers-TkdbkFad.mjs";
|
|
4
|
+
import { t as getMigrationStatus } from "./runner-lqEiJbO-.mjs";
|
|
5
|
+
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-XW5tMrH8.mjs";
|
|
6
|
+
import { _ as portableTextToProsemirror, a as SandboxNotAvailableError, b as reference, c as createPluginManager, f as HookPipeline, g as after, h as definePlugin, i as NoopSandboxRunner, l as PluginRouteError, n as NodeSandboxRunner, o as createNoopSandboxRunner, p as createHookPipeline, r as createNodeSandboxRunner, s as PluginManager, t as isStandardPluginDefinition, v as prosemirrorToPortableText, x as image, y as portableText } from "./plugins-DKceDtUM.mjs";
|
|
7
|
+
import { t as decodeSlug } from "./slugify-BzGxlOFx.mjs";
|
|
8
|
+
import { t as ContentRepository } from "./content-DvpMad_N.mjs";
|
|
9
|
+
import "./base64-C1Q9yr0B.mjs";
|
|
10
|
+
import { t as DinewayValidationError } from "./types-D1DjBFA9.mjs";
|
|
11
|
+
import { t as MediaRepository } from "./media-Cg4zc9fq.mjs";
|
|
12
|
+
import "./user-2aI21yV1.mjs";
|
|
13
|
+
import "./taxonomy-DI-0HgKe.mjs";
|
|
14
|
+
import "./comment-BmJXz3lc.mjs";
|
|
15
|
+
import "./options-BF11H_FD.mjs";
|
|
16
|
+
import "./site-activity-lsCX_cqp.mjs";
|
|
17
|
+
import "./review-requests-BYuoyse0.mjs";
|
|
18
|
+
import "./entity-aliases-PJV8IxDq.mjs";
|
|
19
|
+
import "./context-CT44ux1O.mjs";
|
|
20
|
+
import "./redirect-BHo9--Jz.mjs";
|
|
21
|
+
import "./byline-BxAf79s1.mjs";
|
|
22
|
+
import { t as normalizeMediaValue } from "./normalize-9GU-bv_T.mjs";
|
|
23
|
+
import { t as generatePlaceholder } from "./placeholder-BJPmhjHP.mjs";
|
|
24
|
+
import "./seo-BPz1KkCq.mjs";
|
|
25
|
+
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-CgxdfUg4.mjs";
|
|
26
|
+
import "./request-cache-DmVyQUBh.mjs";
|
|
27
|
+
import "./dashboard-6gH7SlPM.mjs";
|
|
28
|
+
import "./briefing-4k6R0KAr.mjs";
|
|
29
|
+
import "./context-types-DuiyY6xF.mjs";
|
|
30
|
+
import { t as FTSManager } from "./fts-manager-D7KVeBmg.mjs";
|
|
31
|
+
import { i as RESERVED_FIELD_SLUGS, n as FIELD_TYPE_TO_COLUMN, r as RESERVED_COLLECTION_SLUGS } from "./types-Dz2EKzsX.mjs";
|
|
32
|
+
import { n as SchemaRegistry, t as SchemaError } from "./registry-DumDzFDn.mjs";
|
|
33
|
+
import "./loader-CQFxFOt1.mjs";
|
|
34
|
+
import { i as getSiteSettings, n as getPluginSettings, o as setSiteSettings, r as getSiteSetting, t as getPluginSetting } from "./settings-qPzY2KIF.mjs";
|
|
35
|
+
import "./briefing-DM7e2yd3.mjs";
|
|
36
|
+
import "./review-requests-vCw7_3DS.mjs";
|
|
37
|
+
import { n as hashString, t as computeContentHash } from "./hash-V8oZo1W2.mjs";
|
|
38
|
+
import { t as getCollectionInfo } from "./query-BtuwuZRd.mjs";
|
|
39
|
+
import "./zod-generator-BKhtHT3e.mjs";
|
|
40
|
+
import "./schema-D1z41cq_.mjs";
|
|
41
|
+
import "./seo-DJoop90w.mjs";
|
|
42
|
+
import "./menus-CwI7DQJ5.mjs";
|
|
43
|
+
import { o as getSection, s as getSections } from "./sections-B9RYyf3I.mjs";
|
|
44
|
+
import "./settings-BGCo_c2y.mjs";
|
|
45
|
+
import { a as getTaxonomyTerms, i as getTaxonomyDefs, n as getEntryTerms, o as getTerm, r as getTaxonomyDef, s as getTermsForEntries, t as getEntriesByTerm } from "./taxonomies-BWmxbumf.mjs";
|
|
46
|
+
import "./taxonomies-aQXvYVPm.mjs";
|
|
47
|
+
import { i as pluginManifestSchema } from "./manifest-schema-CU0XL_ZK.mjs";
|
|
48
|
+
import { t as DinewayStorageError } from "./types-iNqHe2-V.mjs";
|
|
49
|
+
import "./parse-BBfZRZYb.mjs";
|
|
50
|
+
import "./redirects-xVDvj_yQ.mjs";
|
|
51
|
+
import "./import-DE2ziezs.mjs";
|
|
52
|
+
import { n as sanitizeHref, t as isSafeHref } from "./url-DOS4RGym.mjs";
|
|
53
|
+
import { c as createEditable, i as getTranslations, l as createNoop, n as getDinewayEntry, r as getEditMeta, s as resolveDinewayPath, t as getDinewayCollection } from "./query-CWPxZjGM.mjs";
|
|
54
|
+
import { a as verifyPreviewSignature, i as signPreviewUrl, n as defaultPreviewSidecarClient, r as parsePreviewSignatureHeader, t as buildPreviewSignatureHeader } from "./sidecar-client-Dta0AELf.mjs";
|
|
55
|
+
import { a as createFilePreviewMiddleware, c as dropSessionDatabaseTables, d as SessionDatabaseLimitError, f as isBlockedInPreview, i as getPreviewUrl, l as getAppliedSnapshotMeta, n as isPreviewRequest, o as renderPreviewToolbar, p as renderPreviewLoadingPage, r as buildPreviewUrl, s as applySnapshotToDatabase, t as getPreviewToken, u as FileSessionDatabaseFactory } from "./preview-CIDYFBzd.mjs";
|
|
56
|
+
import { a as getAllSources, c as getUrlSources, d as importReusableBlocksAsSections, f as parseWxr, i as clearSources, l as probeUrl, n as parseWxrDate, o as getFileSources, p as parseWxrString, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource } from "./import-BVqG28WP.mjs";
|
|
57
57
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
58
|
-
import "./ssrf-
|
|
59
|
-
import "./cron-
|
|
60
|
-
import "./utils-
|
|
61
|
-
import { n as parseContentId, r as verifyPreviewToken, t as generatePreviewToken } from "./tokens-
|
|
58
|
+
import "./ssrf-BOSGjXxb.mjs";
|
|
59
|
+
import "./cron-fV9baRVc.mjs";
|
|
60
|
+
import "./utils-BJF19gfk.mjs";
|
|
61
|
+
import { n as parseContentId, r as verifyPreviewToken, t as generatePreviewToken } from "./tokens-DB4dASZl.mjs";
|
|
62
62
|
import { getContentSeo, getSeoMeta } from "./seo/index.mjs";
|
|
63
|
-
import { i as getComments, n as getMenus, r as getCommentCount, t as getMenu } from "./menus-
|
|
64
|
-
import { n as getByline, r as getBylineBySlug } from "./bylines-
|
|
65
|
-
import { n as getWidgetAreas, r as getWidgetComponents, t as getWidgetArea } from "./widgets-
|
|
66
|
-
import { t as validateSeed } from "./validate-
|
|
67
|
-
import { t as applySeed } from "./apply-
|
|
68
|
-
import "./load-
|
|
63
|
+
import { i as getComments, n as getMenus, r as getCommentCount, t as getMenu } from "./menus-BDW1yIdj.mjs";
|
|
64
|
+
import { n as getByline, r as getBylineBySlug } from "./bylines-DhCnhR70.mjs";
|
|
65
|
+
import { n as getWidgetAreas, r as getWidgetComponents, t as getWidgetArea } from "./widgets-Cce2-2fM.mjs";
|
|
66
|
+
import { t as validateSeed } from "./validate-B8ZvLeOE.mjs";
|
|
67
|
+
import { t as applySeed } from "./apply-CGVHi2r7.mjs";
|
|
68
|
+
import "./load-BvyvS_76.mjs";
|
|
69
69
|
import "./seed/index.mjs";
|
|
70
|
-
import { a as getSuggestions, c as searchWithDb, i as getSearchStats, n as extractPlainText, o as search, r as extractSearchableFields, s as searchCollection } from "./search-
|
|
70
|
+
import { a as getSuggestions, c as searchWithDb, i as getSearchStats, n as extractPlainText, o as search, r as extractSearchableFields, s as searchCollection } from "./search-CPcQGTHW.mjs";
|
|
71
71
|
import { ulid } from "ulidx";
|
|
72
72
|
|
|
73
73
|
export { ContentRepository, DinewayDatabaseError, DinewayStorageError, DinewayValidationError, FIELD_TYPE_TO_COLUMN, FTSManager, FileSessionDatabaseFactory, HookPipeline, MediaRepository, NodeSandboxRunner, NoopSandboxRunner, PluginManager, PluginRouteError, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, SandboxNotAvailableError, SchemaError, SchemaRegistry, SessionDatabaseLimitError, adaptSandboxEntry, after, applySeed, applySnapshotToDatabase, buildPreviewSignatureHeader, buildPreviewUrl, clearSources, computeContentHash, createEditable, createFilePreviewMiddleware, createHookPipeline, createNodeSandboxRunner, createNoop, createNoopSandboxRunner, createPluginManager, decodeSlug, defaultPreviewSidecarClient, definePlugin, dropSessionDatabaseTables, extractPlainText, extractSearchableFields, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAppliedSnapshotMeta, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getDinewayCollection, getDinewayEntry, getEditMeta, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, isBlockedInPreview, isI18nEnabled, isPreviewRequest, isSafeHref, isStandardPluginDefinition, normalizeMediaValue, parseContentId, parsePreviewSignatureHeader, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, renderPreviewLoadingPage, renderPreviewToolbar, resolveDinewayPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, signPreviewUrl, ulid, validateSeed, verifyPreviewSignature, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as PageMetadataContribution, D as PageFragmentContribution, N as PageMetadataLinkRel, P as PagePlacement, q as PublicPageContext, t as BreadcrumbItem } from "./types-
|
|
2
|
-
import { n as SeoSettings } from "./types-
|
|
1
|
+
import { A as PageMetadataContribution, D as PageFragmentContribution, N as PageMetadataLinkRel, P as PagePlacement, q as PublicPageContext, t as BreadcrumbItem } from "./types-DS5PYew4.mjs";
|
|
2
|
+
import { n as SeoSettings } from "./types-CsnHvu4J.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/page/context.d.ts
|
|
5
5
|
/** Fields shared by both input forms */
|
|
@@ -2,8 +2,8 @@ import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
|
2
2
|
import { getRequestContext } from "./request-context.mjs";
|
|
3
3
|
import { kyselyLogOption } from "./database/instrumentation.mjs";
|
|
4
4
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { n as decodeCursor, r as encodeCursor } from "./types-
|
|
5
|
+
import { a as isPostgres, i as currentTimestampValue } from "./dialect-helpers-TkdbkFad.mjs";
|
|
6
|
+
import { n as decodeCursor, r as encodeCursor } from "./types-D1DjBFA9.mjs";
|
|
7
7
|
import { Kysely, sql } from "kysely";
|
|
8
8
|
|
|
9
9
|
//#region src/loader.ts
|
package/dist/media/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as mediaItemToValue, a as EmbedResult, c as MediaListResult, d as MediaProviderDescriptor, f as MediaProviderItem, g as VideoEmbed, h as ThumbnailOptions, i as EmbedOptions, l as MediaProvider, m as MediaValue, n as ComponentEmbed, o as ImageEmbed, p as MediaUploadInput, r as CreateMediaProviderFn, s as MediaListOptions, t as AudioEmbed, u as MediaProviderCapabilities } from "../types-
|
|
2
|
-
import { n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "../placeholder-
|
|
1
|
+
import { _ as mediaItemToValue, a as EmbedResult, c as MediaListResult, d as MediaProviderDescriptor, f as MediaProviderItem, g as VideoEmbed, h as ThumbnailOptions, i as EmbedOptions, l as MediaProvider, m as MediaValue, n as ComponentEmbed, o as ImageEmbed, p as MediaUploadInput, r as CreateMediaProviderFn, s as MediaListOptions, t as AudioEmbed, u as MediaProviderCapabilities } from "../types-D_wGrwiY.mjs";
|
|
2
|
+
import { n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "../placeholder-DKMMLt42.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/media/local.d.ts
|
|
5
5
|
interface LocalMediaConfig {
|
package/dist/media/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as normalizeMediaValue } from "../normalize-
|
|
2
|
-
import { t as generatePlaceholder } from "../placeholder-
|
|
1
|
+
import { t as normalizeMediaValue } from "../normalize-9GU-bv_T.mjs";
|
|
2
|
+
import { t as generatePlaceholder } from "../placeholder-BJPmhjHP.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/media/types.ts
|
|
5
5
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "../runtime-
|
|
2
|
-
import { t as Database } from "../types-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../types-
|
|
5
|
-
import { f as MediaProviderItem, r as CreateMediaProviderFn } from "../types-
|
|
6
|
-
import "../runner-
|
|
7
|
-
import "../index-
|
|
8
|
-
import "../index-
|
|
9
|
-
import { d as Storage } from "../types-
|
|
10
|
-
import "../bylines
|
|
11
|
-
import "../types-
|
|
12
|
-
import "../validate-
|
|
1
|
+
import "../runtime-B5hJAnKF.mjs";
|
|
2
|
+
import { t as Database } from "../types-CYBaBvtm.mjs";
|
|
3
|
+
import "../types-DS5PYew4.mjs";
|
|
4
|
+
import "../types-B45uSz1j.mjs";
|
|
5
|
+
import { f as MediaProviderItem, r as CreateMediaProviderFn } from "../types-D_wGrwiY.mjs";
|
|
6
|
+
import "../runner-CHR_W79l.mjs";
|
|
7
|
+
import "../index-JzJUzE4o.mjs";
|
|
8
|
+
import "../index-DpMWSamU.mjs";
|
|
9
|
+
import { d as Storage } from "../types-BDm7Ipoq.mjs";
|
|
10
|
+
import "../bylines--KurdDQK.mjs";
|
|
11
|
+
import "../types-BeYn-Yf0.mjs";
|
|
12
|
+
import "../validate-BQ24E8rK.mjs";
|
|
13
13
|
import "../index.mjs";
|
|
14
14
|
import { Kysely } from "kysely";
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../base64-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { t as MediaRepository } from "../media-
|
|
1
|
+
import "../base64-C1Q9yr0B.mjs";
|
|
2
|
+
import "../types-D1DjBFA9.mjs";
|
|
3
|
+
import { t as MediaRepository } from "../media-Cg4zc9fq.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/media/local-runtime.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as decodeCursor, r as encodeCursor } from "./types-
|
|
1
|
+
import { n as decodeCursor, r as encodeCursor } from "./types-D1DjBFA9.mjs";
|
|
2
2
|
import { sql } from "kysely";
|
|
3
3
|
import { ulid } from "ulidx";
|
|
4
4
|
|
|
@@ -7,6 +7,13 @@ import { ulid } from "ulidx";
|
|
|
7
7
|
function escapeLike(value) {
|
|
8
8
|
return value.replaceAll("\\", "\\\\").replaceAll("%", "\\%").replaceAll("_", "\\_");
|
|
9
9
|
}
|
|
10
|
+
function normalizeMimeFilter(input) {
|
|
11
|
+
if (!input) return [];
|
|
12
|
+
return (Array.isArray(input) ? input : [input]).filter((entry) => typeof entry === "string" && entry.length > 0).map((entry) => entry.endsWith("/") ? entry.toLowerCase() : entry.split(";")[0].trim().toLowerCase());
|
|
13
|
+
}
|
|
14
|
+
function mimeMatchExpr(eb, filters) {
|
|
15
|
+
return eb.or(filters.map((entry) => entry.endsWith("/") ? sql`mime_type LIKE ${`${escapeLike(entry)}%`} ESCAPE '\\'` : eb("mime_type", "=", entry)));
|
|
16
|
+
}
|
|
10
17
|
/**
|
|
11
18
|
* Media repository for database operations
|
|
12
19
|
*/
|
|
@@ -108,10 +115,8 @@ var MediaRepository = class {
|
|
|
108
115
|
query = query.where((eb) => eb.or([eb("created_at", "<", createdAt), eb.and([eb("created_at", "=", createdAt), eb("id", "<", cursorId)])]));
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
query = query.where(sql`mime_type LIKE ${pattern} ESCAPE '\\'`);
|
|
114
|
-
}
|
|
118
|
+
const mimeFilters = normalizeMimeFilter(options.mimeType);
|
|
119
|
+
if (mimeFilters.length > 0) query = query.where((eb) => mimeMatchExpr(eb, mimeFilters));
|
|
115
120
|
if (options.status !== "all") query = query.where("status", "=", options.status ?? "ready");
|
|
116
121
|
const rows = await query.execute();
|
|
117
122
|
const hasMore = rows.length > limit;
|
|
@@ -149,11 +154,9 @@ var MediaRepository = class {
|
|
|
149
154
|
* Count media items
|
|
150
155
|
*/
|
|
151
156
|
async count(mimeType) {
|
|
157
|
+
const filters = normalizeMimeFilter(mimeType);
|
|
152
158
|
let query = this.db.selectFrom("media").select((eb) => eb.fn.count("id").as("count"));
|
|
153
|
-
if (
|
|
154
|
-
const pattern = `${escapeLike(mimeType)}%`;
|
|
155
|
-
query = query.where(sql`mime_type LIKE ${pattern} ESCAPE '\\'`);
|
|
156
|
-
}
|
|
159
|
+
if (filters.length > 0) query = query.where((eb) => mimeMatchExpr(eb, filters));
|
|
157
160
|
const result = await query.executeTakeFirst();
|
|
158
161
|
return Number(result?.count || 0);
|
|
159
162
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as parseAllowedMimeTypes } from "./mime-DJOFDGux.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/api/handlers/media-allowlist.ts
|
|
4
|
+
/**
|
|
5
|
+
* MIME types allowed for upload by default when no field-specific list
|
|
6
|
+
* overrides this. Entries ending with "/" are prefix-matched.
|
|
7
|
+
*/
|
|
8
|
+
const GLOBAL_UPLOAD_ALLOWLIST = [
|
|
9
|
+
"image/",
|
|
10
|
+
"video/",
|
|
11
|
+
"audio/",
|
|
12
|
+
"application/pdf"
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the MIME allowlist for a specific file/image field.
|
|
16
|
+
*
|
|
17
|
+
* Returns null when the field is missing, unconstrained, or not a media field;
|
|
18
|
+
* callers should fall back to GLOBAL_UPLOAD_ALLOWLIST.
|
|
19
|
+
*/
|
|
20
|
+
async function resolveFieldAllowlist(db, fieldId) {
|
|
21
|
+
const row = await db.selectFrom("_dineway_fields").select(["type", "validation"]).where("id", "=", fieldId).where("type", "in", ["file", "image"]).executeTakeFirst();
|
|
22
|
+
return row ? parseAllowedMimeTypes(row.validation) : null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { resolveFieldAllowlist as n, GLOBAL_UPLOAD_ALLOWLIST as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
2
|
-
import { t as CommentRepository } from "./comment-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { t as CommentRepository } from "./comment-BmJXz3lc.mjs";
|
|
3
|
+
import { n as requestCached } from "./request-cache-DmVyQUBh.mjs";
|
|
4
|
+
import { r as getDb } from "./loader-CQFxFOt1.mjs";
|
|
5
|
+
import { d as resolveLocaleChain, u as resolveLocale } from "./taxonomies-BWmxbumf.mjs";
|
|
6
|
+
import { n as sanitizeHref } from "./url-DOS4RGym.mjs";
|
|
6
7
|
import { sql } from "kysely";
|
|
7
8
|
|
|
8
9
|
//#region src/comments/query.ts
|
|
@@ -70,71 +71,67 @@ async function getCommentCountWithDb(db, collection, contentId) {
|
|
|
70
71
|
//#endregion
|
|
71
72
|
//#region src/menus/index.ts
|
|
72
73
|
/**
|
|
73
|
-
* Get menu by name with resolved URLs
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* import { getMenu } from "dineway";
|
|
78
|
-
*
|
|
79
|
-
* const menu = await getMenu("primary");
|
|
80
|
-
* if (menu) {
|
|
81
|
-
* console.log(menu.items); // Array of MenuItem with resolved URLs
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
74
|
+
* Get menu by name with resolved URLs.
|
|
84
75
|
*/
|
|
85
|
-
function getMenu(name) {
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
function getMenu(name, options = {}) {
|
|
77
|
+
const locale = resolveLocale(options.locale);
|
|
78
|
+
return requestCached(`menu:${name}:${locale ?? "*"}`, async () => {
|
|
79
|
+
return getMenuWithDb(name, await getDb(), { locale });
|
|
88
80
|
});
|
|
89
81
|
}
|
|
90
82
|
/**
|
|
91
|
-
* Get menu by name with resolved URLs (with explicit db)
|
|
83
|
+
* Get menu by name with resolved URLs (with explicit db).
|
|
92
84
|
*
|
|
93
|
-
* @internal Use `getMenu()` in templates. This variant is for
|
|
94
|
-
*
|
|
85
|
+
* @internal Use `getMenu()` in templates. This variant is for routes that
|
|
86
|
+
* already have a database handle.
|
|
95
87
|
*/
|
|
96
|
-
async function getMenuWithDb(name, db) {
|
|
97
|
-
const
|
|
88
|
+
async function getMenuWithDb(name, db, options = {}) {
|
|
89
|
+
const chain = resolveLocaleChain(options.locale);
|
|
90
|
+
const selectMenu = () => db.selectFrom("_dineway_menus").selectAll().where("name", "=", name);
|
|
91
|
+
let menuRow;
|
|
92
|
+
if (chain.length === 0) menuRow = await selectMenu().orderBy("locale", "asc").executeTakeFirst();
|
|
93
|
+
else {
|
|
94
|
+
menuRow = void 0;
|
|
95
|
+
for (const locale of chain) {
|
|
96
|
+
menuRow = await selectMenu().where("locale", "=", locale).executeTakeFirst();
|
|
97
|
+
if (menuRow) break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
98
100
|
if (!menuRow) return null;
|
|
99
|
-
const items = await buildMenuTree(await db.selectFrom("_dineway_menu_items").selectAll().$castTo().where("menu_id", "=", menuRow.id).orderBy("sort_order", "asc").execute(), db);
|
|
101
|
+
const items = await buildMenuTree(await db.selectFrom("_dineway_menu_items").selectAll().$castTo().where("menu_id", "=", menuRow.id).orderBy("sort_order", "asc").execute(), db, menuRow.locale);
|
|
100
102
|
return {
|
|
101
103
|
id: menuRow.id,
|
|
102
104
|
name: menuRow.name,
|
|
103
105
|
label: menuRow.label,
|
|
104
|
-
items
|
|
106
|
+
items,
|
|
107
|
+
locale: menuRow.locale,
|
|
108
|
+
translationGroup: menuRow.translation_group
|
|
105
109
|
};
|
|
106
110
|
}
|
|
107
111
|
/**
|
|
108
|
-
* Get all menus
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```ts
|
|
112
|
-
* import { getMenus } from "dineway";
|
|
113
|
-
*
|
|
114
|
-
* const menus = await getMenus();
|
|
115
|
-
* console.log(menus); // [{ id, name, label }]
|
|
116
|
-
* ```
|
|
112
|
+
* Get all menus without items.
|
|
117
113
|
*/
|
|
118
|
-
async function getMenus() {
|
|
119
|
-
return getMenusWithDb(await getDb());
|
|
114
|
+
async function getMenus(options = {}) {
|
|
115
|
+
return getMenusWithDb(await getDb(), options);
|
|
120
116
|
}
|
|
121
117
|
/**
|
|
122
|
-
* Get all menus (with explicit db)
|
|
118
|
+
* Get all menus (with explicit db).
|
|
123
119
|
*
|
|
124
|
-
* @internal Use `getMenus()` in templates. This variant is for
|
|
125
|
-
*
|
|
120
|
+
* @internal Use `getMenus()` in templates. This variant is for routes that
|
|
121
|
+
* already have a database handle.
|
|
126
122
|
*/
|
|
127
|
-
async function getMenusWithDb(db) {
|
|
128
|
-
|
|
123
|
+
async function getMenusWithDb(db, options = {}) {
|
|
124
|
+
const locale = resolveLocale(options.locale);
|
|
125
|
+
let query = db.selectFrom("_dineway_menus").select([
|
|
129
126
|
"id",
|
|
130
127
|
"name",
|
|
131
|
-
"label"
|
|
132
|
-
|
|
128
|
+
"label",
|
|
129
|
+
"locale"
|
|
130
|
+
]).orderBy("name", "asc");
|
|
131
|
+
if (locale !== void 0) query = query.where("locale", "=", locale);
|
|
132
|
+
return query.execute();
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
* Build hierarchical menu tree from flat array of items
|
|
136
|
-
*/
|
|
137
|
-
async function buildMenuTree(items, db) {
|
|
134
|
+
async function buildMenuTree(items, db, locale) {
|
|
138
135
|
const collectionSlugs = /* @__PURE__ */ new Set();
|
|
139
136
|
for (const item of items) {
|
|
140
137
|
if (item.reference_collection) collectionSlugs.add(item.reference_collection);
|
|
@@ -145,7 +142,7 @@ async function buildMenuTree(items, db) {
|
|
|
145
142
|
const rows = await db.selectFrom("_dineway_collections").select(["slug", "url_pattern"]).where("slug", "in", [...collectionSlugs]).execute();
|
|
146
143
|
for (const row of rows) urlPatterns.set(row.slug, row.url_pattern);
|
|
147
144
|
}
|
|
148
|
-
const validItems = (await Promise.all(items.map((item) => resolveMenuItem(item, db, urlPatterns)))).filter((item) => item !== null);
|
|
145
|
+
const validItems = (await Promise.all(items.map((item) => resolveMenuItem(item, db, urlPatterns, locale)))).filter((item) => item !== null);
|
|
149
146
|
const itemMap = /* @__PURE__ */ new Map();
|
|
150
147
|
const rootItems = [];
|
|
151
148
|
for (const item of validItems) itemMap.set(item.id, {
|
|
@@ -163,12 +160,7 @@ async function buildMenuTree(items, db) {
|
|
|
163
160
|
}
|
|
164
161
|
return rootItems;
|
|
165
162
|
}
|
|
166
|
-
|
|
167
|
-
* Resolve a single menu item's URL
|
|
168
|
-
*
|
|
169
|
-
* Returns null if the referenced content no longer exists (item should be skipped)
|
|
170
|
-
*/
|
|
171
|
-
async function resolveMenuItem(item, db, urlPatterns) {
|
|
163
|
+
async function resolveMenuItem(item, db, urlPatterns, locale) {
|
|
172
164
|
let url;
|
|
173
165
|
try {
|
|
174
166
|
switch (item.type) {
|
|
@@ -177,18 +169,18 @@ async function resolveMenuItem(item, db, urlPatterns) {
|
|
|
177
169
|
break;
|
|
178
170
|
case "page":
|
|
179
171
|
case "post":
|
|
180
|
-
url = await resolveContentUrl(item.reference_collection || `${item.type}s`, item.reference_id, db, urlPatterns);
|
|
172
|
+
url = await resolveContentUrl(item.reference_collection || `${item.type}s`, item.reference_id, db, urlPatterns, locale);
|
|
181
173
|
if (url === null) return null;
|
|
182
174
|
break;
|
|
183
175
|
case "taxonomy":
|
|
184
|
-
url = await resolveTaxonomyUrl(item.reference_id, db);
|
|
176
|
+
url = await resolveTaxonomyUrl(item.reference_id, db, locale);
|
|
185
177
|
if (url === null) return null;
|
|
186
178
|
break;
|
|
187
179
|
case "collection":
|
|
188
180
|
url = `/${item.reference_collection}/`;
|
|
189
181
|
break;
|
|
190
182
|
default: if (item.reference_collection && item.reference_id) {
|
|
191
|
-
url = await resolveContentUrl(item.reference_collection, item.reference_id, db, urlPatterns);
|
|
183
|
+
url = await resolveContentUrl(item.reference_collection, item.reference_id, db, urlPatterns, locale);
|
|
192
184
|
if (url === null) return null;
|
|
193
185
|
} else url = "#";
|
|
194
186
|
}
|
|
@@ -208,46 +200,47 @@ async function resolveMenuItem(item, db, urlPatterns) {
|
|
|
208
200
|
}
|
|
209
201
|
const SLUG_PLACEHOLDER = /\{slug\}/g;
|
|
210
202
|
const ID_PLACEHOLDER = /\{id\}/g;
|
|
211
|
-
/**
|
|
212
|
-
* Interpolate a URL pattern with entry data
|
|
213
|
-
*
|
|
214
|
-
* Replaces `{slug}` and `{id}` placeholders.
|
|
215
|
-
*/
|
|
216
203
|
function interpolateUrlPattern(pattern, slug, id) {
|
|
217
204
|
return pattern.replace(SLUG_PLACEHOLDER, slug).replace(ID_PLACEHOLDER, id);
|
|
218
205
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
*
|
|
222
|
-
* Uses the collection's url_pattern if set, otherwise falls back to /{collection}/{slug}.
|
|
223
|
-
* Returns null if content not found (item should be skipped).
|
|
224
|
-
*/
|
|
225
|
-
async function resolveContentUrl(collection, entryId, db, urlPatterns) {
|
|
226
|
-
if (!entryId) return null;
|
|
206
|
+
async function resolveContentUrl(collection, referenceGroup, db, urlPatterns, locale) {
|
|
207
|
+
if (!referenceGroup) return null;
|
|
227
208
|
try {
|
|
228
209
|
validateIdentifier(collection, "menu item collection");
|
|
229
|
-
|
|
230
|
-
SELECT slug FROM ${sql.ref(`ec_${collection}`)}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
210
|
+
let result = await sql`
|
|
211
|
+
SELECT id, slug FROM ${sql.ref(`ec_${collection}`)}
|
|
212
|
+
WHERE translation_group = ${referenceGroup} AND locale = ${locale}
|
|
213
|
+
LIMIT 1
|
|
214
|
+
`.execute(db);
|
|
215
|
+
let row = result.rows[0];
|
|
216
|
+
if (!row) {
|
|
217
|
+
result = await sql`
|
|
218
|
+
SELECT id, slug FROM ${sql.ref(`ec_${collection}`)}
|
|
219
|
+
WHERE translation_group = ${referenceGroup}
|
|
220
|
+
ORDER BY locale ASC
|
|
221
|
+
LIMIT 1
|
|
222
|
+
`.execute(db);
|
|
223
|
+
row = result.rows[0];
|
|
236
224
|
}
|
|
237
|
-
|
|
225
|
+
if (!row) row = (await sql`
|
|
226
|
+
SELECT id, slug FROM ${sql.ref(`ec_${collection}`)}
|
|
227
|
+
WHERE id = ${referenceGroup}
|
|
228
|
+
LIMIT 1
|
|
229
|
+
`.execute(db)).rows[0];
|
|
230
|
+
if (!row) return null;
|
|
231
|
+
const pattern = urlPatterns.get(collection);
|
|
232
|
+
if (pattern) return interpolateUrlPattern(pattern, row.slug, row.id);
|
|
233
|
+
return `/${collection}/${row.slug}`;
|
|
238
234
|
} catch (error) {
|
|
239
|
-
console.error(`Failed to resolve content URL for ${collection}/${
|
|
235
|
+
console.error(`Failed to resolve content URL for ${collection}/${referenceGroup}:`, error);
|
|
240
236
|
return null;
|
|
241
237
|
}
|
|
242
238
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
async function resolveTaxonomyUrl(taxonomyId, db) {
|
|
249
|
-
if (!taxonomyId) return null;
|
|
250
|
-
const taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("id", "=", taxonomyId).executeTakeFirst();
|
|
239
|
+
async function resolveTaxonomyUrl(referenceGroup, db, locale) {
|
|
240
|
+
if (!referenceGroup) return null;
|
|
241
|
+
let taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("translation_group", "=", referenceGroup).where("locale", "=", locale).executeTakeFirst();
|
|
242
|
+
if (!taxonomy) taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("translation_group", "=", referenceGroup).orderBy("locale", "asc").executeTakeFirst();
|
|
243
|
+
if (!taxonomy) taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("id", "=", referenceGroup).executeTakeFirst();
|
|
251
244
|
if (!taxonomy) return null;
|
|
252
245
|
return `/${taxonomy.name}/${taxonomy.slug}`;
|
|
253
246
|
}
|