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,15 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { n as getI18nConfig } from "./config-XW5tMrH8.mjs";
|
|
3
|
+
import { r as RevisionRepository, t as ContentRepository } from "./content-DvpMad_N.mjs";
|
|
4
|
+
import { t as MediaRepository } from "./media-Cg4zc9fq.mjs";
|
|
5
|
+
import { t as TaxonomyRepository } from "./taxonomy-DI-0HgKe.mjs";
|
|
6
|
+
import { t as withTransaction } from "./transaction-qfqpPVpu.mjs";
|
|
7
|
+
import { t as RedirectRepository } from "./redirect-BHo9--Jz.mjs";
|
|
8
|
+
import { t as BylineRepository } from "./byline-BxAf79s1.mjs";
|
|
9
|
+
import { t as FTSManager } from "./fts-manager-D7KVeBmg.mjs";
|
|
10
|
+
import { n as SchemaRegistry } from "./registry-DumDzFDn.mjs";
|
|
11
|
+
import { o as setSiteSettings } from "./settings-qPzY2KIF.mjs";
|
|
12
|
+
import { a as validateExternalUrl, r as ssrfSafeFetch } from "./ssrf-BOSGjXxb.mjs";
|
|
13
|
+
import { t as validateSeed } from "./validate-B8ZvLeOE.mjs";
|
|
13
14
|
import { ulid } from "ulidx";
|
|
14
15
|
import { imageSize } from "image-size";
|
|
15
16
|
import mime from "mime/lite";
|
|
@@ -184,49 +185,78 @@ async function applySeed(db, seed, options = {}) {
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
if (seed.taxonomies)
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
188
|
+
if (seed.taxonomies) {
|
|
189
|
+
const defSeedIdMap = /* @__PURE__ */ new Map();
|
|
190
|
+
const termSeedIdMap = /* @__PURE__ */ new Map();
|
|
191
|
+
const fallbackLocale = getI18nConfig()?.defaultLocale ?? "en";
|
|
192
|
+
for (const taxonomy of seed.taxonomies) {
|
|
193
|
+
const defLocale = taxonomy.locale ?? fallbackLocale;
|
|
194
|
+
const existingDef = await db.selectFrom("_dineway_taxonomy_defs").selectAll().where("name", "=", taxonomy.name).where("locale", "=", defLocale).executeTakeFirst();
|
|
195
|
+
let defId;
|
|
196
|
+
let defTranslationGroup;
|
|
197
|
+
if (existingDef) {
|
|
198
|
+
defId = existingDef.id;
|
|
199
|
+
defTranslationGroup = existingDef.translation_group ?? existingDef.id;
|
|
200
|
+
if (onConflict === "error") throw new Error(`Conflict: taxonomy "${taxonomy.name}" (${defLocale}) already exists`);
|
|
201
|
+
if (onConflict === "update") await db.updateTable("_dineway_taxonomy_defs").set({
|
|
202
|
+
label: taxonomy.label,
|
|
203
|
+
label_singular: taxonomy.labelSingular ?? null,
|
|
204
|
+
hierarchical: taxonomy.hierarchical ? 1 : 0,
|
|
205
|
+
collections: JSON.stringify(taxonomy.collections)
|
|
206
|
+
}).where("id", "=", existingDef.id).execute();
|
|
207
|
+
} else {
|
|
208
|
+
defId = ulid();
|
|
209
|
+
defTranslationGroup = defId;
|
|
210
|
+
if (taxonomy.translationOf) {
|
|
211
|
+
const source = defSeedIdMap.get(taxonomy.translationOf);
|
|
212
|
+
if (source) defTranslationGroup = source.translationGroup;
|
|
213
|
+
else console.warn(`taxonomy "${taxonomy.name}" (${defLocale}): translationOf "${taxonomy.translationOf}" not found yet; minting a fresh group.`);
|
|
214
|
+
}
|
|
215
|
+
await db.insertInto("_dineway_taxonomy_defs").values({
|
|
216
|
+
id: defId,
|
|
217
|
+
name: taxonomy.name,
|
|
218
|
+
label: taxonomy.label,
|
|
219
|
+
label_singular: taxonomy.labelSingular ?? null,
|
|
220
|
+
hierarchical: taxonomy.hierarchical ? 1 : 0,
|
|
221
|
+
collections: JSON.stringify(taxonomy.collections),
|
|
222
|
+
locale: defLocale,
|
|
223
|
+
translation_group: defTranslationGroup
|
|
224
|
+
}).execute();
|
|
225
|
+
result.taxonomies.created++;
|
|
226
|
+
}
|
|
227
|
+
if (taxonomy.id) defSeedIdMap.set(taxonomy.id, {
|
|
228
|
+
id: defId,
|
|
229
|
+
translationGroup: defTranslationGroup
|
|
230
|
+
});
|
|
231
|
+
if (taxonomy.terms && taxonomy.terms.length > 0) {
|
|
232
|
+
const termRepo = new TaxonomyRepository(db);
|
|
233
|
+
if (taxonomy.hierarchical) await applyHierarchicalTerms(termRepo, taxonomy.name, defLocale, taxonomy.terms, termSeedIdMap, result, onConflict);
|
|
234
|
+
else for (const term of taxonomy.terms) {
|
|
235
|
+
const termLocale = term.locale ?? defLocale;
|
|
236
|
+
const existing = await termRepo.findBySlug(taxonomy.name, term.slug, termLocale);
|
|
237
|
+
if (existing) {
|
|
238
|
+
if (onConflict === "error") throw new Error(`Conflict: taxonomy term "${term.slug}" in "${taxonomy.name}" (${termLocale}) already exists`);
|
|
239
|
+
if (onConflict === "update") {
|
|
240
|
+
await termRepo.update(existing.id, {
|
|
241
|
+
label: term.label,
|
|
242
|
+
data: term.description ? { description: term.description } : {}
|
|
243
|
+
});
|
|
244
|
+
result.taxonomies.terms++;
|
|
245
|
+
}
|
|
246
|
+
if (term.id) termSeedIdMap.set(term.id, existing.id);
|
|
247
|
+
} else {
|
|
248
|
+
const translationOf = term.translationOf ? termSeedIdMap.get(term.translationOf) : void 0;
|
|
249
|
+
const created = await termRepo.create({
|
|
250
|
+
name: taxonomy.name,
|
|
251
|
+
slug: term.slug,
|
|
217
252
|
label: term.label,
|
|
218
|
-
data: term.description ? { description: term.description } :
|
|
253
|
+
data: term.description ? { description: term.description } : void 0,
|
|
254
|
+
locale: termLocale,
|
|
255
|
+
translationOf
|
|
219
256
|
});
|
|
257
|
+
if (term.id) termSeedIdMap.set(term.id, created.id);
|
|
220
258
|
result.taxonomies.terms++;
|
|
221
259
|
}
|
|
222
|
-
} else {
|
|
223
|
-
await termRepo.create({
|
|
224
|
-
name: taxonomy.name,
|
|
225
|
-
slug: term.slug,
|
|
226
|
-
label: term.label,
|
|
227
|
-
data: term.description ? { description: term.description } : void 0
|
|
228
|
-
});
|
|
229
|
-
result.taxonomies.terms++;
|
|
230
260
|
}
|
|
231
261
|
}
|
|
232
262
|
}
|
|
@@ -329,25 +359,45 @@ async function applySeed(db, seed, options = {}) {
|
|
|
329
359
|
result.content.created++;
|
|
330
360
|
}
|
|
331
361
|
}
|
|
332
|
-
if (seed.menus)
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
menuId
|
|
340
|
-
|
|
362
|
+
if (seed.menus) {
|
|
363
|
+
const menuSeedIdMap = /* @__PURE__ */ new Map();
|
|
364
|
+
const itemSeedIdMap = /* @__PURE__ */ new Map();
|
|
365
|
+
const fallbackLocale = getI18nConfig()?.defaultLocale ?? "en";
|
|
366
|
+
for (const menu of seed.menus) {
|
|
367
|
+
const locale = menu.locale ?? fallbackLocale;
|
|
368
|
+
const existingMenu = await db.selectFrom("_dineway_menus").selectAll().where("name", "=", menu.name).where("locale", "=", locale).executeTakeFirst();
|
|
369
|
+
let menuId;
|
|
370
|
+
let translationGroup;
|
|
371
|
+
if (existingMenu) {
|
|
372
|
+
menuId = existingMenu.id;
|
|
373
|
+
translationGroup = existingMenu.translation_group ?? existingMenu.id;
|
|
374
|
+
await db.deleteFrom("_dineway_menu_items").where("menu_id", "=", menuId).execute();
|
|
375
|
+
} else {
|
|
376
|
+
menuId = ulid();
|
|
377
|
+
translationGroup = menuId;
|
|
378
|
+
if (menu.translationOf) {
|
|
379
|
+
const source = menuSeedIdMap.get(menu.translationOf);
|
|
380
|
+
if (source) translationGroup = source.translationGroup;
|
|
381
|
+
else console.warn(`menu "${menu.name}" (${locale}): translationOf "${menu.translationOf}" not found yet; minting a fresh group.`);
|
|
382
|
+
}
|
|
383
|
+
await db.insertInto("_dineway_menus").values({
|
|
384
|
+
id: menuId,
|
|
385
|
+
name: menu.name,
|
|
386
|
+
label: menu.label,
|
|
387
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
388
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
389
|
+
locale,
|
|
390
|
+
translation_group: translationGroup
|
|
391
|
+
}).execute();
|
|
392
|
+
result.menus.created++;
|
|
393
|
+
}
|
|
394
|
+
if (menu.id) menuSeedIdMap.set(menu.id, {
|
|
341
395
|
id: menuId,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}).execute();
|
|
347
|
-
result.menus.created++;
|
|
396
|
+
translationGroup
|
|
397
|
+
});
|
|
398
|
+
const itemCount = await applyMenuItems(db, menuId, locale, menu.items, null, 0, seedIdMap, itemSeedIdMap);
|
|
399
|
+
result.menus.items += itemCount;
|
|
348
400
|
}
|
|
349
|
-
const itemCount = await applyMenuItems(db, menuId, menu.items, null, 0, seedIdMap);
|
|
350
|
-
result.menus.items += itemCount;
|
|
351
401
|
}
|
|
352
402
|
if (seed.redirects) {
|
|
353
403
|
const redirectRepo = new RedirectRepository(db);
|
|
@@ -446,9 +496,9 @@ async function applySeed(db, seed, options = {}) {
|
|
|
446
496
|
}
|
|
447
497
|
}
|
|
448
498
|
}
|
|
449
|
-
const { invalidateBylineCache } = await import("./bylines-
|
|
450
|
-
const { invalidateUrlPatternCache } = await import("./query-
|
|
451
|
-
const { invalidateRedirectCache } = await import("./cache-
|
|
499
|
+
const { invalidateBylineCache } = await import("./bylines-DhCnhR70.mjs").then((n) => n.t);
|
|
500
|
+
const { invalidateUrlPatternCache } = await import("./query-CWPxZjGM.mjs").then((n) => n.o);
|
|
501
|
+
const { invalidateRedirectCache } = await import("./cache-inQvbrP5.mjs").then((n) => n.t);
|
|
452
502
|
invalidateBylineCache();
|
|
453
503
|
invalidateUrlPatternCache();
|
|
454
504
|
invalidateRedirectCache();
|
|
@@ -457,17 +507,22 @@ async function applySeed(db, seed, options = {}) {
|
|
|
457
507
|
/**
|
|
458
508
|
* Apply hierarchical taxonomy terms (parents before children)
|
|
459
509
|
*/
|
|
460
|
-
async function applyHierarchicalTerms(termRepo, taxonomyName, terms, result, onConflict = "skip") {
|
|
510
|
+
async function applyHierarchicalTerms(termRepo, taxonomyName, defLocale, terms, termSeedIdMap, result, onConflict = "skip") {
|
|
461
511
|
const slugToId = /* @__PURE__ */ new Map();
|
|
462
512
|
let remaining = [...terms];
|
|
463
513
|
let maxPasses = 10;
|
|
464
514
|
while (remaining.length > 0 && maxPasses > 0) {
|
|
465
515
|
const processedThisPass = [];
|
|
466
|
-
for (const term of remaining)
|
|
467
|
-
const
|
|
468
|
-
const
|
|
516
|
+
for (const term of remaining) {
|
|
517
|
+
const termLocale = term.locale ?? defLocale;
|
|
518
|
+
const parentReady = !term.parent || slugToId.has(`${termLocale}::${term.parent}`);
|
|
519
|
+
const translationReady = !term.translationOf || termSeedIdMap.has(term.translationOf);
|
|
520
|
+
if (!parentReady || !translationReady) continue;
|
|
521
|
+
const parentId = term.parent ? slugToId.get(`${termLocale}::${term.parent}`) : void 0;
|
|
522
|
+
const translationOf = term.translationOf ? termSeedIdMap.get(term.translationOf) : void 0;
|
|
523
|
+
const existing = await termRepo.findBySlug(taxonomyName, term.slug, termLocale);
|
|
469
524
|
if (existing) {
|
|
470
|
-
if (onConflict === "error") throw new Error(`Conflict: taxonomy term "${term.slug}" in "${taxonomyName}" already exists`);
|
|
525
|
+
if (onConflict === "error") throw new Error(`Conflict: taxonomy term "${term.slug}" in "${taxonomyName}" (${termLocale}) already exists`);
|
|
471
526
|
if (onConflict === "update") {
|
|
472
527
|
await termRepo.update(existing.id, {
|
|
473
528
|
label: term.label,
|
|
@@ -476,24 +531,28 @@ async function applyHierarchicalTerms(termRepo, taxonomyName, terms, result, onC
|
|
|
476
531
|
});
|
|
477
532
|
result.taxonomies.terms++;
|
|
478
533
|
}
|
|
479
|
-
slugToId.set(term.slug
|
|
534
|
+
slugToId.set(`${termLocale}::${term.slug}`, existing.id);
|
|
535
|
+
if (term.id) termSeedIdMap.set(term.id, existing.id);
|
|
480
536
|
} else {
|
|
481
537
|
const created = await termRepo.create({
|
|
482
538
|
name: taxonomyName,
|
|
483
539
|
slug: term.slug,
|
|
484
540
|
label: term.label,
|
|
485
541
|
parentId,
|
|
486
|
-
data: term.description ? { description: term.description } : void 0
|
|
542
|
+
data: term.description ? { description: term.description } : void 0,
|
|
543
|
+
locale: termLocale,
|
|
544
|
+
translationOf
|
|
487
545
|
});
|
|
488
|
-
slugToId.set(term.slug
|
|
546
|
+
slugToId.set(`${termLocale}::${term.slug}`, created.id);
|
|
547
|
+
if (term.id) termSeedIdMap.set(term.id, created.id);
|
|
489
548
|
result.taxonomies.terms++;
|
|
490
549
|
}
|
|
491
|
-
processedThisPass.push(term.slug);
|
|
550
|
+
processedThisPass.push(`${term.slug}::${termLocale}`);
|
|
492
551
|
}
|
|
493
|
-
remaining = remaining.filter((
|
|
552
|
+
remaining = remaining.filter((term) => !processedThisPass.includes(`${term.slug}::${term.locale ?? defLocale}`));
|
|
494
553
|
maxPasses--;
|
|
495
554
|
}
|
|
496
|
-
if (remaining.length > 0) console.warn(`Could not process ${remaining.length} terms due to missing parents`);
|
|
555
|
+
if (remaining.length > 0) console.warn(`Could not process ${remaining.length} terms due to missing parents/translations`);
|
|
497
556
|
}
|
|
498
557
|
/**
|
|
499
558
|
* Apply byline credits to a content entry.
|
|
@@ -521,7 +580,13 @@ async function applyContentBylines(bylineRepo, collectionSlug, contentId, entry,
|
|
|
521
580
|
*/
|
|
522
581
|
async function applyContentTaxonomies(db, collectionSlug, contentId, entry, isUpdate) {
|
|
523
582
|
if (isUpdate) await db.deleteFrom("content_taxonomies").where("collection", "=", collectionSlug).where("entry_id", "=", contentId).execute();
|
|
524
|
-
if (!entry.taxonomies)
|
|
583
|
+
if (!entry.taxonomies) {
|
|
584
|
+
if (isUpdate) {
|
|
585
|
+
const { invalidateTermCache } = await import("./taxonomies-BWmxbumf.mjs").then((n) => n.l);
|
|
586
|
+
invalidateTermCache();
|
|
587
|
+
}
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
525
590
|
for (const [taxonomyName, termSlugs] of Object.entries(entry.taxonomies)) {
|
|
526
591
|
const termRepo = new TaxonomyRepository(db);
|
|
527
592
|
for (const termSlug of termSlugs) {
|
|
@@ -529,15 +594,18 @@ async function applyContentTaxonomies(db, collectionSlug, contentId, entry, isUp
|
|
|
529
594
|
if (term) await termRepo.attachToEntry(collectionSlug, contentId, term.id);
|
|
530
595
|
}
|
|
531
596
|
}
|
|
597
|
+
const { invalidateTermCache } = await import("./taxonomies-BWmxbumf.mjs").then((n) => n.l);
|
|
598
|
+
invalidateTermCache();
|
|
532
599
|
}
|
|
533
600
|
/**
|
|
534
601
|
* Apply menu items recursively
|
|
535
602
|
*/
|
|
536
|
-
async function applyMenuItems(db, menuId, items, parentId, startOrder, seedIdMap) {
|
|
603
|
+
async function applyMenuItems(db, menuId, locale, items, parentId, startOrder, seedIdMap, itemSeedIdMap) {
|
|
537
604
|
let count = 0;
|
|
538
605
|
let order = startOrder;
|
|
539
606
|
for (const item of items) {
|
|
540
607
|
const itemId = ulid();
|
|
608
|
+
const itemLocale = item.locale ?? locale;
|
|
541
609
|
let referenceId = null;
|
|
542
610
|
let referenceCollection = null;
|
|
543
611
|
if (item.type === "page" || item.type === "post") {
|
|
@@ -546,6 +614,12 @@ async function applyMenuItems(db, menuId, items, parentId, startOrder, seedIdMap
|
|
|
546
614
|
referenceCollection = item.collection || `${item.type}s`;
|
|
547
615
|
}
|
|
548
616
|
}
|
|
617
|
+
let translationGroup = itemId;
|
|
618
|
+
if (item.translationOf) {
|
|
619
|
+
const source = itemSeedIdMap.get(item.translationOf);
|
|
620
|
+
if (source) translationGroup = source.translationGroup;
|
|
621
|
+
else console.warn(`menu item "${item.label ?? item.url ?? item.ref ?? "(unlabeled)"}" (${itemLocale}): translationOf "${item.translationOf}" not found yet; minting a fresh group.`);
|
|
622
|
+
}
|
|
549
623
|
await db.insertInto("_dineway_menu_items").values({
|
|
550
624
|
id: itemId,
|
|
551
625
|
menu_id: menuId,
|
|
@@ -559,12 +633,18 @@ async function applyMenuItems(db, menuId, items, parentId, startOrder, seedIdMap
|
|
|
559
633
|
title_attr: item.titleAttr ?? null,
|
|
560
634
|
target: item.target ?? null,
|
|
561
635
|
css_classes: item.cssClasses ?? null,
|
|
562
|
-
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
636
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
637
|
+
locale: itemLocale,
|
|
638
|
+
translation_group: translationGroup
|
|
563
639
|
}).execute();
|
|
640
|
+
if (item.id) itemSeedIdMap.set(item.id, {
|
|
641
|
+
id: itemId,
|
|
642
|
+
translationGroup
|
|
643
|
+
});
|
|
564
644
|
count++;
|
|
565
645
|
order++;
|
|
566
646
|
if (item.children && item.children.length > 0) {
|
|
567
|
-
const childCount = await applyMenuItems(db, menuId, item.children, itemId, 0, seedIdMap);
|
|
647
|
+
const childCount = await applyMenuItems(db, menuId, itemLocale, item.children, itemId, 0, seedIdMap, itemSeedIdMap);
|
|
568
648
|
count += childCount;
|
|
569
649
|
}
|
|
570
650
|
}
|
package/dist/astro/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { r as ContentItem } from "../types-
|
|
2
|
-
import { Kn as MediaItem, a as S3StorageConfig, i as LocalStorageConfig, o as StorageDescriptor, r as getStoredConfig, t as DinewayConfig } from "../runtime-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { X as ResolvedPlugin } from "../types-
|
|
5
|
-
import "../types-
|
|
6
|
-
import "../runner-
|
|
7
|
-
import "../index-
|
|
8
|
-
import "../index-
|
|
9
|
-
import "../bylines-
|
|
10
|
-
import "../types-
|
|
11
|
-
import "../validate-
|
|
1
|
+
import { r as ContentItem } from "../types-6N-00csp.mjs";
|
|
2
|
+
import { Kn as MediaItem, a as S3StorageConfig, i as LocalStorageConfig, o as StorageDescriptor, r as getStoredConfig, t as DinewayConfig } from "../runtime-DY_XmE9Y.mjs";
|
|
3
|
+
import "../types-CYBaBvtm.mjs";
|
|
4
|
+
import { X as ResolvedPlugin } from "../types-DS5PYew4.mjs";
|
|
5
|
+
import "../types-B45uSz1j.mjs";
|
|
6
|
+
import "../runner-CHR_W79l.mjs";
|
|
7
|
+
import "../index-JzJUzE4o.mjs";
|
|
8
|
+
import "../index-DpMWSamU.mjs";
|
|
9
|
+
import "../bylines-DE9bfDur.mjs";
|
|
10
|
+
import "../types-BeYn-Yf0.mjs";
|
|
11
|
+
import "../validate-BQ24E8rK.mjs";
|
|
12
12
|
import { DinewayHandlers, DinewayManifest, ManifestCollection } from "./types.mjs";
|
|
13
13
|
import { AstroIntegration } from "astro";
|
|
14
14
|
|
package/dist/astro/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
2
|
-
import { t as defaultSeed } from "../default-
|
|
3
|
-
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-
|
|
1
|
+
import { n as VERSION, t as COMMIT } from "../version-HdNieFOD.mjs";
|
|
2
|
+
import { t as defaultSeed } from "../default-2JDm1rj_.mjs";
|
|
3
|
+
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-D85wzUp6.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../runtime-
|
|
2
|
-
import "../../types-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import "../../types-
|
|
5
|
-
import "../../runner-
|
|
6
|
-
import "../../index-
|
|
7
|
-
import "../../index-
|
|
8
|
-
import "../../bylines-
|
|
9
|
-
import "../../types-
|
|
10
|
-
import "../../validate-
|
|
1
|
+
import "../../runtime-DY_XmE9Y.mjs";
|
|
2
|
+
import "../../types-CYBaBvtm.mjs";
|
|
3
|
+
import "../../types-DS5PYew4.mjs";
|
|
4
|
+
import "../../types-B45uSz1j.mjs";
|
|
5
|
+
import "../../runner-CHR_W79l.mjs";
|
|
6
|
+
import "../../index-JzJUzE4o.mjs";
|
|
7
|
+
import "../../index-DpMWSamU.mjs";
|
|
8
|
+
import "../../bylines-DE9bfDur.mjs";
|
|
9
|
+
import "../../types-BeYn-Yf0.mjs";
|
|
10
|
+
import "../../validate-BQ24E8rK.mjs";
|
|
11
11
|
import { DinewayHandlers } from "../types.mjs";
|
|
12
12
|
import { Kysely } from "kysely";
|
|
13
13
|
import { User } from "@dineway-ai/auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as apiError } from "../../error-
|
|
2
|
-
import { n as getPublicOrigin } from "../../public-url-
|
|
3
|
-
import { t as getAuthMode } from "../../mode-
|
|
4
|
-
import { i as hasScope } from "../../api-tokens-
|
|
5
|
-
import { a as resolveOAuthToken, i as resolveApiToken } from "../../api-tokens-
|
|
1
|
+
import { t as apiError } from "../../error-Dyf9fGZE.mjs";
|
|
2
|
+
import { n as getPublicOrigin } from "../../public-url-5fFLJhjh.mjs";
|
|
3
|
+
import { t as getAuthMode } from "../../mode-DWw2di1I.mjs";
|
|
4
|
+
import { i as hasScope } from "../../api-tokens-B7fvbHM2.mjs";
|
|
5
|
+
import { a as resolveOAuthToken, i as resolveApiToken } from "../../api-tokens-CMmUPFae.mjs";
|
|
6
6
|
import { ulid } from "ulidx";
|
|
7
7
|
import { defineMiddleware } from "astro:middleware";
|
|
8
8
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getRequestContext } from "../../request-context.mjs";
|
|
2
|
-
import "../../dialect-helpers-
|
|
3
|
-
import "../../base64-
|
|
4
|
-
import "../../types-
|
|
5
|
-
import { t as RedirectRepository } from "../../redirect-
|
|
6
|
-
import { a as matchCachedPatterns, n as compileRedirectRules, o as setCachedRedirects, r as getCachedRedirects } from "../../cache-
|
|
7
|
-
import { r as getDb } from "../../loader-
|
|
2
|
+
import "../../dialect-helpers-TkdbkFad.mjs";
|
|
3
|
+
import "../../base64-C1Q9yr0B.mjs";
|
|
4
|
+
import "../../types-D1DjBFA9.mjs";
|
|
5
|
+
import { t as RedirectRepository } from "../../redirect-BHo9--Jz.mjs";
|
|
6
|
+
import { a as matchCachedPatterns, n as compileRedirectRules, o as setCachedRedirects, r as getCachedRedirects } from "../../cache-inQvbrP5.mjs";
|
|
7
|
+
import { r as getDb } from "../../loader-CQFxFOt1.mjs";
|
|
8
8
|
import { defineMiddleware } from "astro:middleware";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/middleware/redirect.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { runWithContext } from "../../request-context.mjs";
|
|
2
|
-
import "../../base64-
|
|
3
|
-
import "../../options-
|
|
4
|
-
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-
|
|
5
|
-
import { i as resolveSecretsCached } from "../../secrets-
|
|
2
|
+
import "../../base64-C1Q9yr0B.mjs";
|
|
3
|
+
import "../../options-BF11H_FD.mjs";
|
|
4
|
+
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-DB4dASZl.mjs";
|
|
5
|
+
import { i as resolveSecretsCached } from "../../secrets-AFKoqUXj.mjs";
|
|
6
6
|
import { defineMiddleware } from "astro:middleware";
|
|
7
7
|
|
|
8
8
|
//#region src/visual-editing/toolbar.ts
|