dineway 0.2.39 → 0.2.41
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-LXZdjKwI.mjs → activity-BuhkMdv8.mjs} +2 -2
- package/dist/{activity-events-DoqeOM8x.mjs → activity-events-DkHsy7Y0.mjs} +1 -1
- package/dist/{allowed-origins-DiVrMLxh.mjs → allowed-origins-Clitkhiv.mjs} +1 -1
- package/dist/api/route-utils.d.mts +15 -12
- package/dist/api/route-utils.mjs +27 -20
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +10 -5
- package/dist/{api-COSxvdOi.mjs → api-CMbsIQ46.mjs} +41 -13
- package/dist/{api-tokens-CNHnKO57.mjs → api-tokens-ciHNTdN2.mjs} +1 -1
- package/dist/{apply-D4rZHDyg.mjs → apply-B5qoX19G.mjs} +62 -18
- package/dist/astro/index.d.mts +16 -13
- package/dist/astro/index.mjs +31 -5
- package/dist/astro/middleware/auth.d.mts +14 -11
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs +10 -6
- package/dist/astro/middleware/request-context.mjs +5 -5
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +2 -2
- package/dist/astro/middleware.mjs +266 -176
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +12 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +12 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
- package/dist/astro/routes/api/admin/briefing.mjs +41 -22
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +14 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/index.mjs +25 -19
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +20 -16
- package/dist/astro/routes/api/admin/comments/_id_.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +18 -13
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +57 -44
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +57 -44
- package/dist/astro/routes/api/admin/context/diff.mjs +56 -43
- package/dist/astro/routes/api/admin/context/index.mjs +57 -44
- package/dist/astro/routes/api/admin/context/stale.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +56 -43
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +52 -40
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/updates.mjs +71 -60
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +38 -23
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +46 -36
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +63 -52
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +9 -9
- package/dist/astro/routes/api/admin/review-requests/index.mjs +61 -50
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +12 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +14 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +16 -11
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +17 -12
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +14 -11
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +12 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +19 -14
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +16 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/setup-token/index.mjs +6 -6
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +14 -11
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +23 -19
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +23 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +25 -20
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +14 -9
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +30 -20
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/trash.mjs +13 -8
- package/dist/astro/routes/api/dashboard.mjs +21 -13
- 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 +30 -23
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +13 -10
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +58 -47
- package/dist/astro/routes/api/import/wordpress/media.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/media.mjs +17 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +61 -48
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +15 -12
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +58 -45
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +32 -26
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +63 -52
- package/dist/astro/routes/api/integration/artifact.mjs +9 -9
- package/dist/astro/routes/api/integration/dispatch.mjs +14 -14
- package/dist/astro/routes/api/integrations/_provider_.mjs +9 -9
- package/dist/astro/routes/api/integrations/index.mjs +8 -8
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +141 -93
- package/dist/astro/routes/api/media/_id_/confirm.mjs +15 -12
- package/dist/astro/routes/api/media/_id_.mjs +14 -9
- 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 +16 -13
- package/dist/astro/routes/api/media.mjs +19 -16
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/items.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/translations.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_.mjs +57 -44
- package/dist/astro/routes/api/menus/index.mjs +57 -44
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- 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 +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +10 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +15 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs +15 -13
- package/dist/astro/routes/api/redirects/_id_.mjs +57 -44
- package/dist/astro/routes/api/redirects/index.mjs +57 -44
- 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 +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/index.mjs +73 -62
- package/dist/astro/routes/api/schema/index.mjs +13 -10
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +71 -60
- package/dist/astro/routes/api/schema/orphans/index.mjs +71 -60
- package/dist/astro/routes/api/search/enable.mjs +20 -13
- package/dist/astro/routes/api/search/index.mjs +19 -12
- package/dist/astro/routes/api/search/rebuild.mjs +20 -13
- package/dist/astro/routes/api/search/stats.mjs +12 -7
- package/dist/astro/routes/api/search/suggest.mjs +19 -12
- package/dist/astro/routes/api/sections/_slug_.mjs +57 -44
- package/dist/astro/routes/api/sections/index.mjs +57 -44
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings/reviews.mjs +11 -11
- package/dist/astro/routes/api/settings.mjs +57 -44
- package/dist/astro/routes/api/setup/admin-verify.mjs +19 -14
- package/dist/astro/routes/api/setup/admin.mjs +17 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +44 -32
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +47 -34
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/index.mjs +60 -47
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- 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 +56 -43
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_.mjs +53 -41
- package/dist/astro/routes/api/widget-areas/index.mjs +57 -44
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +14 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +20 -16
- package/dist/astro/routes/sitemap.xml.mjs +19 -15
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +8 -3
- package/dist/astro/types.d.mts +21 -14
- package/dist/{atomic-authority-CnBQJ14T.mjs → atomic-authority-Bf5QZboB.mjs} +2 -2
- package/dist/{audit-Cl495Ze3.mjs → audit-hXJBTPY0.mjs} +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-DbjgJdlo.mjs → auth-control-guard-DpUP6Fs_.mjs} +1 -1
- package/dist/{authorize-DDmgmnW-.mjs → authorize-DWNOqMKq.mjs} +1 -1
- package/dist/{briefing-DsD-Ouwc.mjs → briefing-BzvBeIJh.mjs} +1 -1
- package/dist/{briefing-COw-WcYz.mjs → briefing-DYiV93rg.mjs} +995 -7
- package/dist/{bundle-bhiszAui.mjs → bundle-DWn5eFKz.mjs} +2 -2
- package/dist/{byline-TYk2kad6.mjs → byline-3qjp1-oa.mjs} +65 -14
- package/dist/{byline-fields-CKhPED5o.d.mts → byline-fields-Bne2v0ti.d.mts} +42 -38
- package/dist/{byline-fields-BKj5f3Ub.mjs → byline-fields-DRMCc0V_.mjs} +1 -1
- package/dist/{byline-fields-DZ46DF10.mjs → byline-fields-wWu2Cb3l.mjs} +3 -3
- package/dist/{byline-registry-CJihchD1.mjs → byline-registry-Caj0_gbU.mjs} +1 -1
- package/dist/{bylines-6T9iVC9j.mjs → bylines-BSn9O1Wx.mjs} +3 -3
- package/dist/{bylines-CvTSCAw9.mjs → bylines-CGuJi-zu.mjs} +5 -5
- package/dist/{patterns-Ay-4KImK.mjs → cache-DsEbwFVE.mjs} +51 -1
- package/dist/{chunks-C8vSD_5L.mjs → chunks-Bb56aCtB.mjs} +1 -1
- package/dist/cli/index.mjs +488 -58
- package/dist/cli/plugin-kit.d.mts +14 -11
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +16 -13
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-C1ZQCMog.mjs → client-factory-BLbm250o.mjs} +1 -1
- package/dist/{comment-DAQfUjqt.mjs → comment-BWDG1nQm.mjs} +2 -2
- package/dist/{comment-reaction-Dp3G7UZc.mjs → comment-reaction-B7pLTlQ7.mjs} +1 -1
- package/dist/{comments-BrvIaRAx.mjs → comments-xkten8nV.mjs} +1 -1
- package/dist/config-6R0bchVE.mjs +125 -0
- package/dist/{content-CIKsrvU9.mjs → content-BigS8BAv.mjs} +302 -45
- package/dist/content-Dr22fzA_.mjs +390 -0
- package/dist/{content-refresh-BilzqcLt.mjs → content-refresh-DJuFIqQ4.mjs} +14 -8
- package/dist/content-storage/index.d.mts +180 -0
- package/dist/content-storage/index.mjs +29 -0
- package/dist/content-storage/store.d.mts +3 -0
- package/dist/content-storage/store.mjs +5 -0
- package/dist/{review-payload-Bap86e75.mjs → content-write-DAZCNKWl.mjs} +838 -131
- package/dist/{context-DAs_MZjJ.mjs → context-0806nV9h.mjs} +292 -23
- package/dist/{context-DVTvucNb.mjs → context-CCsI5nTK.mjs} +2 -2
- package/dist/{context-route-helpers-BP-UJ4u8.mjs → context-route-helpers-TP3EqxRQ.mjs} +2 -2
- package/dist/{dashboard-BAjWCGCP.mjs → dashboard-CSrnhBO6.mjs} +4 -4
- package/dist/database/batch.d.mts +1 -1
- package/dist/database/batch.mjs +1 -1
- package/dist/database/d1/index.d.mts +14 -11
- package/dist/database/d1/index.mjs +4 -4
- package/dist/database/instrumentation.mjs +3 -2
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- 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-Dh0rNlh1.mjs → device-flow-SoZh-HvN.mjs} +3 -3
- package/dist/{discovery-V0e0Gg8j.mjs → discovery-49qXmdwv.mjs} +4 -4
- package/dist/{enrich-B7PIJ8Iy.mjs → enrich-CAMsD1aT.mjs} +1 -1
- package/dist/{error-B5a45Tfb.mjs → error-sL4aemcW.mjs} +2 -0
- package/dist/{evidence-Vnp_fQbC.mjs → evidence-B3O9_VKm.mjs} +7 -7
- package/dist/{field-defs-cache-aXUeXJdC.mjs → field-defs-cache-dn5Tw79A.mjs} +4 -4
- package/dist/{fts-manager-BrPpYtK0.mjs → fts-manager-Zu5ITic0.mjs} +1 -1
- package/dist/{hitl-requests-BxMMON3s.mjs → hitl-requests-B5vOPseK.mjs} +2 -2
- package/dist/{hitl-route-helpers-sdnjpx2k.mjs → hitl-route-helpers-C3icmGdj.mjs} +5 -5
- package/dist/hook-events-BQw73jc7.d.mts +32 -0
- package/dist/{import-C2-v4FCs.mjs → import-CKnKQj3f.mjs} +9 -9
- package/dist/{index-BVGe04wF.d.mts → index-CLj17kW9.d.mts} +12 -5
- package/dist/index.d.mts +19 -16
- package/dist/index.mjs +107 -98
- package/dist/{integration-credentials-DMEXZU2J.mjs → integration-credentials-DpuRw1kx.mjs} +2 -2
- package/dist/{jsonld-XWmmAoVo.d.mts → jsonld-CN91qtDw.d.mts} +2 -2
- package/dist/{load-DvCVppOF.mjs → load-CiRTddkJ.mjs} +1 -1
- package/dist/{loader-Dp6zLmQm.mjs → loader-CCwWFQSh.mjs} +16 -5
- package/dist/{manifest-schema-CCvogfrP.mjs → manifest-schema-DaQpgyTB.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-B8Gbin3T.mjs → mcp-reviewed-executor-DA6Q9sDc.mjs} +6 -6
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +16 -13
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-C5ba8fvI.mjs → media-BjH5OD-A.mjs} +1 -1
- package/dist/{media-allowlist-DQvscVkS.mjs → media-allowlist-C8HJ2O61.mjs} +1 -1
- package/dist/{menus-CyNpBQrX.mjs → menus-CbBi7Ad7.mjs} +2 -2
- package/dist/{menus-w5xwT-f5.mjs → menus-D0c8CeVg.mjs} +7 -7
- package/dist/migration-DJuj7ZwN.mjs +526 -0
- package/dist/{migrations-CLlX25HO.mjs → migrations-BAjF60cl.mjs} +1 -1
- package/dist/{oauth-authorization-CdqJZUMf.mjs → oauth-authorization-CSSRMOKn.mjs} +4 -4
- package/dist/{oauth-clients-CHNb9MAZ.mjs → oauth-clients-DX5HIJJv.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-mxCW-Rpt.mjs → object-cache-DyI1SOBK.mjs} +3 -1
- package/dist/owned-metadata-BPmUjZqI.mjs +69 -0
- package/dist/page/index.d.mts +15 -12
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-THHCpJLB.mjs → parse-C6kCR1OT.mjs} +1 -1
- package/dist/plugin-utils.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-pfraURNp.mjs → plugins-V0W65r3v.mjs} +16 -962
- package/dist/{policy-B6mVa7ib.mjs → policy-DbceGc4P.mjs} +2 -2
- package/dist/{preview-Bh7D7F27.mjs → preview-CWiIjMDi.mjs} +2 -2
- package/dist/{provider-loader-DT7vQ5FI.d.mts → provider-loader-oLKm1AU8.d.mts} +1 -1
- package/dist/{public-url-Ccv0Xmue.d.mts → public-url-CEC1vj02.d.mts} +2 -2
- package/dist/{public-url-BvnTaacI.d.mts → public-url-CKrUov8D.d.mts} +1 -1
- package/dist/{publication-authorization-B_HJSnzR.mjs → publication-authorization-wMR-tEQ_.mjs} +43 -17
- package/dist/{query-xspvw7Ui.mjs → query-DDi367tF.mjs} +14 -14
- package/dist/{query-DLeahg3x.mjs → query-DLnnpEuf.mjs} +4 -4
- package/dist/{rate-limit-BsBr_U9g.mjs → rate-limit-DeVLLe4z.mjs} +2 -2
- package/dist/{redirect-BQFa1THe.mjs → redirect-CJ-FAbNK.mjs} +2 -2
- package/dist/{redirects-DJcsgz_X.mjs → redirects-BKi6mek4.mjs} +4 -5
- package/dist/{redirects-CVfxefrz.mjs → redirects-I78-ZYLV.mjs} +5 -386
- package/dist/{registry-Dclv9iHv.mjs → registry-zXXZezu-.mjs} +7 -7
- package/dist/{release-B3Q-9B7N.mjs → release-Cpi0-Bzq.mjs} +173 -22
- package/dist/request-context.d.mts +30 -0
- package/dist/{request-meta-CjORiJQ_.mjs → request-meta-DZYuLXx_.mjs} +1 -1
- package/dist/review-payload-Bhi52CbI.mjs +112 -0
- package/dist/{review-requests-CcSUTm_l.mjs → review-requests-C-ScxD9n.mjs} +2 -2
- package/dist/{review-requests-CUVn0RBl.mjs → review-requests-DZYM51yI.mjs} +2 -2
- package/dist/{review-route-helpers-CKBfGKCi.mjs → review-route-helpers-DXNDyx_q.mjs} +2 -2
- package/dist/{revision-W6FDfDqx.mjs → revision-B_HYO2AE.mjs} +42 -7
- package/dist/revisions-CQ7rMP5d.mjs +55 -0
- package/dist/{revocation-C_ZQvGRT.mjs → revocation-4we8kfBg.mjs} +2 -2
- package/dist/{runner-CRU7BXjr.mjs → runner-CuG8o1uW.mjs} +558 -487
- package/dist/{runner-SoP1rphP.d.mts → runner-DXQkyPeX.d.mts} +1 -1
- package/dist/{runs-BtaAiLTw.mjs → runs-BjgLfqCn.mjs} +5 -5
- package/dist/runtime-Bs2JMbb2.d.mts +45 -0
- package/dist/runtime-Ch5G-tnG.mjs +400 -0
- package/dist/runtime.d.mts +15 -12
- package/dist/runtime.mjs +9 -4
- package/dist/schema-BA05k0TN.mjs +8 -0
- package/dist/{search-BI9uKr7U.mjs → search-DMrzhfx_.mjs} +4 -98
- package/dist/{secrets-D_pergcD.mjs → secrets-CIYcw9T9.mjs} +4 -4
- package/dist/{sections-BqqYq9RW.mjs → sections-BTrSEhqB.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +38 -26
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +12 -9
- package/dist/{seo-Bs_DUxJf.mjs → seo-Cv7ud_m2.mjs} +44 -5
- package/dist/{seo-B-5PsaJO.mjs → seo-DkjtBh-y.mjs} +1 -1
- package/dist/{service-W2xuGLgw.mjs → service-BBJM08uD.mjs} +2 -2
- package/dist/{service-B65aJsN7.mjs → service-CkMuD5AE.mjs} +3 -3
- package/dist/{settings-DsBzKeUQ.mjs → settings-BUONaNnG.mjs} +7 -7
- package/dist/{settings-CyJ2-MKx.mjs → settings-CI-NtWEc.mjs} +2 -2
- package/dist/{setup-complete-DeivSVJi.mjs → setup-complete-DoVbVrHx.mjs} +1 -1
- package/dist/{site-activity-DU0UPDji.mjs → site-activity-hpfJkmxQ.mjs} +1 -1
- package/dist/{site-context-Dic2jHuw.mjs → site-context-BW3GRCJH.mjs} +15 -15
- package/dist/{site-url-Tw6CfBB2.mjs → site-url-CYatfe3q.mjs} +1 -1
- package/dist/{state-DM7blWfT.mjs → state-CKkqoA6i.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 +2 -2
- package/dist/{store-32e6dfD-.mjs → store-BzaAtszy.mjs} +3 -3
- package/dist/submission-DLgjQ_Ew.mjs +205 -0
- package/dist/{taxonomies-BFsUR7kc.mjs → taxonomies-C02-Vuh3.mjs} +3 -3
- package/dist/{taxonomies-lWGNLKgn.mjs → taxonomies-D5wO9zmB.mjs} +7 -7
- package/dist/{taxonomy-DN6i1upz.mjs → taxonomy-BK7JmHlo.mjs} +53 -3
- package/dist/terms-EskuqbKE.mjs +104 -0
- package/dist/text-extraction-CdqMGYQK.mjs +96 -0
- package/dist/{tokens-D-StaTAQ.mjs → tokens-D8HEH277.mjs} +1 -1
- package/dist/{trusted-proxy-hYufGFPK.mjs → trusted-proxy-Dg3U9Lrv.mjs} +1 -1
- package/dist/{types-RFzE_V1M.mjs → types-BI3ULB3A.mjs} +2 -2
- package/dist/{types-CJynaYg1.d.mts → types-C3jUu4Bc.d.mts} +90 -34
- package/dist/{types-B--VyN3n.d.mts → types-Dpv_MvwZ.d.mts} +1 -1
- package/dist/{types-CgcOeaiQ.d.mts → types-ex-UrNlz.d.mts} +1 -1
- package/dist/types-qOEot0UQ.d.mts +83 -0
- package/dist/ui/server-runtime.d.mts +18 -15
- package/dist/ui/server-runtime.mjs +29 -25
- package/dist/{user-Btai9rl3.mjs → user-Bl2_8rhJ.mjs} +2 -2
- package/dist/{utils-CYxGuO_P.mjs → utils-CklSLz9F.mjs} +2 -2
- package/dist/{validate-C05z0m7M.mjs → validate-C-yk7mmX.mjs} +3 -3
- package/dist/{validate-kmN2lS8H.d.mts → validate-DUscf6VG.d.mts} +3 -3
- package/dist/version-BlE1LEPb.mjs +6 -0
- package/dist/version-store-BXv2D0de.mjs +208 -0
- package/dist/version-store-B_THJCc0.d.mts +98 -0
- package/dist/{widgets-BOrDZdQ3.mjs → widgets-9xHBhL_L.mjs} +3 -3
- package/dist/{wordpress-slugs-ROzITIBK.mjs → wordpress-slugs-yaeD7cxn.mjs} +1 -1
- package/dist/{worker-Bg35R37I.mjs → worker-CC_Rt1pB.mjs} +10 -10
- package/dist/write-intent-DuHVqks9.mjs +108 -0
- package/dist/{zod-generator-DkrWuID7.mjs → zod-generator-B5Pt8fv0.mjs} +2 -2
- package/package.json +16 -4
- package/dist/cache-B5NSHhxG.mjs +0 -52
- package/dist/cron-C7HCJPPl.mjs +0 -271
- package/dist/schema-CosVhHJt.mjs +0 -8
- package/dist/submission-DJmRejGR.mjs +0 -411
- package/dist/version-BnLdwIT1.mjs +0 -6
- /package/dist/{actor-DxUAJgQX.mjs → actor-D0AW80ld.mjs} +0 -0
- /package/dist/{adapter-symbols-Bq3JsWGM.d.mts → adapter-symbols-B9mi-BUh.d.mts} +0 -0
- /package/dist/{adapters-C8nRpUuj.d.mts → adapters-lDnJjNDz.d.mts} +0 -0
- /package/dist/{api-tokens-0N3nafqZ.mjs → api-tokens-CdfsE9PL.mjs} +0 -0
- /package/dist/{base64-Cz-aU0X1.mjs → base64-qvSs0Gxy.mjs} +0 -0
- /package/dist/{challenge-store-BPn3goP9.mjs → challenge-store-7IZ_NqWg.mjs} +0 -0
- /package/dist/{components-rFN8NH3N.mjs → components-JA6tFHmE.mjs} +0 -0
- /package/dist/{context-types-CPWAJRs5.mjs → context-types-DDIJhGLs.mjs} +0 -0
- /package/dist/{default-BS6VQRkB.mjs → default-C2azCFSB.mjs} +0 -0
- /package/dist/{email-console-GqK6hgMJ.mjs → email-console-BYQp_5Qr.mjs} +0 -0
- /package/dist/{escape-CE7xOWzJ.mjs → escape-4_NNa6GR.mjs} +0 -0
- /package/dist/{experimental-workflows-BbxpWwBy.mjs → experimental-workflows-CPNiI2EL.mjs} +0 -0
- /package/dist/{forgeway-account-DcTxh3Gw.mjs → forgeway-account-YzraapbX.mjs} +0 -0
- /package/dist/{hash-D2Rqd2J2.mjs → hash-qSYPMJ8w.mjs} +0 -0
- /package/dist/{media-url-D9kdpoLS.mjs → media-url-D5E1a47B.mjs} +0 -0
- /package/dist/{mime-BnVhH671.mjs → mime-FkfazULS.mjs} +0 -0
- /package/dist/{mode-D0gePRtf.mjs → mode-C3RI5Z5t.mjs} +0 -0
- /package/dist/{normalize-aTwryvvi.mjs → normalize-DrmlLn40.mjs} +0 -0
- /package/dist/{oauth-authority-P5YMSk2z.mjs → oauth-authority-DVlLFhsZ.mjs} +0 -0
- /package/dist/{oauth-state-store-CMqLdo4I.mjs → oauth-state-store-nf-78RbK.mjs} +0 -0
- /package/dist/{options-JiLWB6Bt.mjs → options-yFkLUuTw.mjs} +0 -0
- /package/dist/{output-7HDrYTSQ.mjs → output-ljHaxIHX.mjs} +0 -0
- /package/dist/{parser-kettsjWc.mjs → parser-CTlxybRo.mjs} +0 -0
- /package/dist/{passkey-config-DVzQ3dv3.mjs → passkey-config-BLon3ct9.mjs} +0 -0
- /package/dist/{placeholder-DJLP_HY7.d.mts → placeholder-DdZV3I8x.d.mts} +0 -0
- /package/dist/{portable-text-tQhvPLf1.mjs → portable-text-CSbRjM-T.mjs} +0 -0
- /package/dist/{portable-text-BE7nszX6.d.mts → portable-text-HNmwL-7L.d.mts} +0 -0
- /package/dist/{process-cache-C19OA3am.mjs → process-cache-CMy5M80h.mjs} +0 -0
- /package/dist/{provider-loader-DERzBMUz.mjs → provider-loader-DlaT1usE.mjs} +0 -0
- /package/dist/{public-discovery-BGyhuD5U.mjs → public-discovery-BnqYofSK.mjs} +0 -0
- /package/dist/{public-url-DFXUU6Wp.mjs → public-url-BHjYWuaN.mjs} +0 -0
- /package/dist/{public-url-sR8SVmTt.mjs → public-url-GQygrYmg.mjs} +0 -0
- /package/dist/{redirect-BxacnBYL.mjs → redirect-CokmLN5o.mjs} +0 -0
- /package/dist/{request-cache-8_ifFzVw.mjs → request-cache-CizvDoxV.mjs} +0 -0
- /package/dist/{resolve-DEKC4qVa.mjs → resolve-BxFGSKYu.mjs} +0 -0
- /package/dist/{runtime-env-CPTzh0mZ.mjs → runtime-env-DpYGy4pT.mjs} +0 -0
- /package/dist/{scheduled-publish-BxdShRGs.d.mts → scheduled-publish-eCNGpvNm.d.mts} +0 -0
- /package/dist/{seo-contributions-LEFs1d7w.mjs → seo-contributions-ZKqrqsdT.mjs} +0 -0
- /package/dist/{service-kQ5ljRzX.mjs → service-DeX1PRNt.mjs} +0 -0
- /package/dist/{session-user-eweCNKzW.mjs → session-user-D36BRaZY.mjs} +0 -0
- /package/dist/{setup-nonce-B6A5Y1ea.mjs → setup-nonce-B9IO7PbK.mjs} +0 -0
- /package/dist/{sidecar-client-BwPhhz-F.mjs → sidecar-client-2hx5G46s.mjs} +0 -0
- /package/dist/{slugify-kD31VIv2.mjs → slugify-DvoaEPtL.mjs} +0 -0
- /package/dist/{ssrf-C9dyjU8O.mjs → ssrf-DcD8vn3E.mjs} +0 -0
- /package/dist/{stable-hash-B9Tbb2f_.mjs → stable-hash-9RDJgfif.mjs} +0 -0
- /package/dist/{status-Bjf_uSrW.mjs → status-B2xUokyJ.mjs} +0 -0
- /package/dist/{transport-BrU1aDY5.mjs → transport-BHYE4pox.mjs} +0 -0
- /package/dist/{transport-CZbtxgKZ.d.mts → transport-CVU5rp7W.d.mts} +0 -0
- /package/dist/{types-DNBL-4Sn.mjs → types-B3Uq7Czg.mjs} +0 -0
- /package/dist/{types-DsJTXStN.d.mts → types-BJztoTbF.d.mts} +0 -0
- /package/dist/{types-COvyXIp7.mjs → types-BgUxCuwu.mjs} +0 -0
- /package/dist/{types-KFzuijKE.d.mts → types-C0heD9oI.d.mts} +0 -0
- /package/dist/{types-B03h5jt_.d.mts → types-DheoByey.d.mts} +0 -0
- /package/dist/{types-SlLXjRpg.d.mts → types-I5LHzk_M.d.mts} +0 -0
- /package/dist/{types-PLJ9hlhh.mjs → types-Nm0cMxEh.mjs} +0 -0
- /package/dist/{types-CtGSEKEJ.d.mts → types-PxxPTFSl.d.mts} +0 -0
- /package/dist/{url-DGG3hw_h.mjs → url-Coamqvs4.mjs} +0 -0
- /package/dist/{url-DUz3LbCs.mjs → url-dn4mFfCI.mjs} +0 -0
- /package/dist/{workers-build-5UQ4j69Q.mjs → workers-build-4926MPc0.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
2
|
-
import { t as capabilitiesToDeclaredAccess } from "./types-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
|
+
import { t as capabilitiesToDeclaredAccess } from "./types-B3Uq7Czg.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { imageSize } from "image-size";
|
|
5
5
|
import { createWriteStream } from "node:fs";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
2
|
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
3
3
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
4
4
|
import { l as listTablesLike } from "./dialect-helpers-C6xtO-Ui.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { r as getContentStorage } from "./runtime-Ch5G-tnG.mjs";
|
|
6
|
+
import { i as encodeCursor, r as decodeCursor, t as DinewayValidationError } from "./types-BI3ULB3A.mjs";
|
|
7
|
+
import { i as setRequestCacheEntry, n as peekRequestCache, t as clearRequestCacheEntry } from "./request-cache-CizvDoxV.mjs";
|
|
8
|
+
import { n as getBylineFieldDefs } from "./field-defs-cache-dn5Tw79A.mjs";
|
|
9
|
+
import { a as invalidateBylineObjectCache, o as invalidateCollectionCache } from "./object-cache-DyI1SOBK.mjs";
|
|
10
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-Bb56aCtB.mjs";
|
|
10
11
|
import { sql } from "kysely";
|
|
11
12
|
import { ulid } from "ulidx";
|
|
12
13
|
|
|
@@ -370,7 +371,16 @@ var BylineRepository = class {
|
|
|
370
371
|
return true;
|
|
371
372
|
}
|
|
372
373
|
async getContentBylines(collectionSlug, contentId, options) {
|
|
373
|
-
|
|
374
|
+
const source = options?.assignments ? sql`(SELECT json_extract(value,'$.byline_id') AS byline_id,json_extract(value,'$.sort_order') AS sort_order,json_extract(value,'$.role_label') AS role_label FROM json_each(${JSON.stringify(options.assignments.map(({ byline_id, sort_order, role_label }) => ({
|
|
375
|
+
byline_id,
|
|
376
|
+
sort_order,
|
|
377
|
+
role_label
|
|
378
|
+
})))}))`.as("cb") : this.db.selectFrom("_dineway_content_bylines").select([
|
|
379
|
+
"byline_id",
|
|
380
|
+
"sort_order",
|
|
381
|
+
"role_label"
|
|
382
|
+
]).where("collection_slug", "=", collectionSlug).where("content_id", "=", contentId).as("cb");
|
|
383
|
+
let query = this.db.selectFrom(source).innerJoin("_dineway_bylines as b", (join) => join.onRef("b.translation_group", "=", "cb.byline_id")).leftJoin("media as m", "m.id", "b.avatar_media_id").select([
|
|
374
384
|
"cb.sort_order as sort_order",
|
|
375
385
|
"cb.role_label as role_label",
|
|
376
386
|
"b.id as id",
|
|
@@ -389,7 +399,7 @@ var BylineRepository = class {
|
|
|
389
399
|
"b.updated_at as updated_at",
|
|
390
400
|
"b.locale as locale",
|
|
391
401
|
"b.translation_group as translation_group"
|
|
392
|
-
]).
|
|
402
|
+
]).orderBy("cb.sort_order", "asc");
|
|
393
403
|
if (options?.locale !== void 0) query = query.where("b.locale", "=", options.locale);
|
|
394
404
|
const rows = await query.execute();
|
|
395
405
|
const bylines = await this.withCustomFields(rows);
|
|
@@ -499,6 +509,7 @@ var BylineRepository = class {
|
|
|
499
509
|
return result;
|
|
500
510
|
}
|
|
501
511
|
async prepareCopyContentBylines(collectionSlug, sourceContentId, targetContentId) {
|
|
512
|
+
if (getContentStorage(this.db, collectionSlug)) throw new Error("Prepare routed content with its bylines instead of copying a primary index separately.");
|
|
502
513
|
validateIdentifier(collectionSlug, "collection slug");
|
|
503
514
|
const source = await this.db.selectFrom("_dineway_content_bylines").selectAll().where("collection_slug", "=", collectionSlug).where("content_id", "=", sourceContentId).orderBy("sort_order", "asc").execute();
|
|
504
515
|
const checks = [
|
|
@@ -520,6 +531,30 @@ var BylineRepository = class {
|
|
|
520
531
|
}
|
|
521
532
|
async copyContentBylines(collectionSlug, sourceContentId, targetContentId) {
|
|
522
533
|
if (await this.db.selectFrom("_dineway_content_bylines").select("id").where("collection_slug", "=", collectionSlug).where("content_id", "=", targetContentId).executeTakeFirst()) return;
|
|
534
|
+
if (getContentStorage(this.db, collectionSlug)) {
|
|
535
|
+
const { snapshotOwnedContentMetadata } = await import("./owned-metadata-BPmUjZqI.mjs").then((n) => n.n);
|
|
536
|
+
const { prepareContentWrite } = await import("./content-write-DAZCNKWl.mjs").then((n) => n.t);
|
|
537
|
+
const source = await snapshotOwnedContentMetadata(this.db, collectionSlug, sourceContentId);
|
|
538
|
+
const credits = await this.getContentBylines(collectionSlug, sourceContentId);
|
|
539
|
+
const write = await prepareContentWrite(this.db, collectionSlug, {
|
|
540
|
+
id: targetContentId,
|
|
541
|
+
stageDraft: false,
|
|
542
|
+
bylines: credits.map((credit) => ({
|
|
543
|
+
bylineId: credit.byline.id,
|
|
544
|
+
roleLabel: credit.roleLabel
|
|
545
|
+
}))
|
|
546
|
+
});
|
|
547
|
+
await atomicBatch(this.db, {
|
|
548
|
+
checks: [
|
|
549
|
+
...write.batch.checks ?? [],
|
|
550
|
+
...source.checks,
|
|
551
|
+
sql`NOT EXISTS (SELECT 1 FROM _dineway_content_bylines WHERE collection_slug=${collectionSlug} AND content_id=${targetContentId})`
|
|
552
|
+
],
|
|
553
|
+
statements: write.batch.statements
|
|
554
|
+
});
|
|
555
|
+
write.afterCommit();
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
523
558
|
const prepared = await this.prepareCopyContentBylines(collectionSlug, sourceContentId, targetContentId);
|
|
524
559
|
await atomicBatch(this.db, {
|
|
525
560
|
...prepared,
|
|
@@ -527,7 +562,8 @@ var BylineRepository = class {
|
|
|
527
562
|
});
|
|
528
563
|
invalidateCollectionCache(collectionSlug);
|
|
529
564
|
}
|
|
530
|
-
async prepareContentBylines(collectionSlug, contentId, inputBylines) {
|
|
565
|
+
async prepareContentBylines(collectionSlug, contentId, inputBylines, identity = {}) {
|
|
566
|
+
if (getContentStorage(this.db, collectionSlug) && !identity.primaryIndex) throw new Error("Prepare routed content with its bylines instead of writing a primary index separately.");
|
|
531
567
|
validateIdentifier(collectionSlug, "collection slug");
|
|
532
568
|
const tableName = `ec_${collectionSlug}`;
|
|
533
569
|
validateIdentifier(tableName, "content table");
|
|
@@ -556,18 +592,21 @@ var BylineRepository = class {
|
|
|
556
592
|
});
|
|
557
593
|
}
|
|
558
594
|
statements.push(this.db.deleteFrom("_dineway_content_bylines").where("collection_slug", "=", collectionSlug).where("content_id", "=", contentId).compile());
|
|
595
|
+
const rows = [];
|
|
559
596
|
for (let i = 0; i < bylines.length; i++) {
|
|
560
597
|
const item = bylines[i];
|
|
561
598
|
if (!item) continue;
|
|
562
|
-
|
|
563
|
-
id: ulid(),
|
|
599
|
+
const row = {
|
|
600
|
+
id: identity.prefix ? `${identity.prefix}:${i}` : ulid(),
|
|
564
601
|
collection_slug: collectionSlug,
|
|
565
602
|
content_id: contentId,
|
|
566
603
|
byline_id: item.group,
|
|
567
604
|
sort_order: i,
|
|
568
605
|
role_label: item.roleLabel ?? null,
|
|
569
|
-
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
570
|
-
}
|
|
606
|
+
created_at: identity.now ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
607
|
+
};
|
|
608
|
+
rows.push(row);
|
|
609
|
+
statements.push(this.db.insertInto("_dineway_content_bylines").values(row).compile());
|
|
571
610
|
}
|
|
572
611
|
statements.push(sql`
|
|
573
612
|
UPDATE ${sql.ref(tableName)}
|
|
@@ -576,10 +615,22 @@ var BylineRepository = class {
|
|
|
576
615
|
`.compile(this.db));
|
|
577
616
|
return {
|
|
578
617
|
checks,
|
|
579
|
-
statements
|
|
618
|
+
statements,
|
|
619
|
+
rows
|
|
580
620
|
};
|
|
581
621
|
}
|
|
582
622
|
async setContentBylines(collectionSlug, contentId, inputBylines) {
|
|
623
|
+
if (getContentStorage(this.db, collectionSlug)) {
|
|
624
|
+
const { prepareContentWrite } = await import("./content-write-DAZCNKWl.mjs").then((n) => n.t);
|
|
625
|
+
const write = await prepareContentWrite(this.db, collectionSlug, {
|
|
626
|
+
id: contentId,
|
|
627
|
+
bylines: inputBylines,
|
|
628
|
+
stageDraft: false
|
|
629
|
+
});
|
|
630
|
+
await atomicBatch(this.db, write.batch);
|
|
631
|
+
write.afterCommit();
|
|
632
|
+
return this.getContentBylines(collectionSlug, contentId);
|
|
633
|
+
}
|
|
583
634
|
await atomicBatch(this.db, await this.prepareContentBylines(collectionSlug, contentId, inputBylines));
|
|
584
635
|
invalidateCollectionCache(collectionSlug);
|
|
585
636
|
return await this.getContentBylines(collectionSlug, contentId);
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
/** Valid role level values */
|
|
5
5
|
declare const VALID_ROLE_LEVELS: Set<number>;
|
|
6
6
|
/** Role level — coerces string/number to valid RoleLevel (10|20|30|40|50) */
|
|
7
|
-
declare const roleLevel: z.ZodCoercedNumber<unknown> & z.ZodType<
|
|
7
|
+
declare const roleLevel: z.ZodCoercedNumber<unknown> & z.ZodType<10 | 20 | 30 | 40 | 50, unknown, z.core.$ZodTypeInternals<10 | 20 | 30 | 40 | 50, unknown>>;
|
|
8
8
|
/** Pagination query params — cursor-based */
|
|
9
9
|
declare const cursorPaginationQuery: z.ZodObject<{
|
|
10
10
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -75,7 +75,9 @@ declare const contentListQuery: z.ZodObject<{
|
|
|
75
75
|
dateTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>>;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
declare const contentCreateBody: z.ZodObject<{
|
|
78
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
78
79
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
80
|
+
terms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
79
81
|
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
82
|
status: z.ZodOptional<z.ZodEnum<{
|
|
81
83
|
draft: "draft";
|
|
@@ -97,7 +99,9 @@ declare const contentCreateBody: z.ZodObject<{
|
|
|
97
99
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
98
100
|
}, z.core.$strip>;
|
|
99
101
|
declare const contentUpdateBody: z.ZodObject<{
|
|
102
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
100
103
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
104
|
+
terms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
101
105
|
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
106
|
status: z.ZodOptional<z.ZodEnum<{
|
|
103
107
|
draft: "draft";
|
|
@@ -807,8 +811,8 @@ declare const createCollectionBody: z.ZodObject<{
|
|
|
807
811
|
icon: z.ZodOptional<z.ZodString>;
|
|
808
812
|
supports: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
809
813
|
search: "search";
|
|
810
|
-
revisions: "revisions";
|
|
811
814
|
drafts: "drafts";
|
|
815
|
+
revisions: "revisions";
|
|
812
816
|
preview: "preview";
|
|
813
817
|
scheduling: "scheduling";
|
|
814
818
|
}>>>;
|
|
@@ -828,8 +832,8 @@ declare const updateCollectionBody: z.ZodObject<{
|
|
|
828
832
|
icon: z.ZodOptional<z.ZodString>;
|
|
829
833
|
supports: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
830
834
|
search: "search";
|
|
831
|
-
revisions: "revisions";
|
|
832
835
|
drafts: "drafts";
|
|
836
|
+
revisions: "revisions";
|
|
833
837
|
preview: "preview";
|
|
834
838
|
scheduling: "scheduling";
|
|
835
839
|
}>>>;
|
|
@@ -860,13 +864,13 @@ declare const createFieldBody: z.ZodObject<{
|
|
|
860
864
|
url: "url";
|
|
861
865
|
file: "file";
|
|
862
866
|
slug: "slug";
|
|
863
|
-
|
|
864
|
-
integer: "integer";
|
|
867
|
+
image: "image";
|
|
865
868
|
datetime: "datetime";
|
|
869
|
+
text: "text";
|
|
866
870
|
select: "select";
|
|
871
|
+
integer: "integer";
|
|
867
872
|
multiSelect: "multiSelect";
|
|
868
873
|
portableText: "portableText";
|
|
869
|
-
image: "image";
|
|
870
874
|
reference: "reference";
|
|
871
875
|
repeater: "repeater";
|
|
872
876
|
}>;
|
|
@@ -888,11 +892,11 @@ declare const createFieldBody: z.ZodObject<{
|
|
|
888
892
|
number: "number";
|
|
889
893
|
boolean: "boolean";
|
|
890
894
|
url: "url";
|
|
891
|
-
|
|
892
|
-
integer: "integer";
|
|
895
|
+
image: "image";
|
|
893
896
|
datetime: "datetime";
|
|
897
|
+
text: "text";
|
|
894
898
|
select: "select";
|
|
895
|
-
|
|
899
|
+
integer: "integer";
|
|
896
900
|
}>;
|
|
897
901
|
label: z.ZodString;
|
|
898
902
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -918,13 +922,13 @@ declare const updateFieldBody: z.ZodObject<{
|
|
|
918
922
|
url: "url";
|
|
919
923
|
file: "file";
|
|
920
924
|
slug: "slug";
|
|
921
|
-
|
|
922
|
-
integer: "integer";
|
|
925
|
+
image: "image";
|
|
923
926
|
datetime: "datetime";
|
|
927
|
+
text: "text";
|
|
924
928
|
select: "select";
|
|
929
|
+
integer: "integer";
|
|
925
930
|
multiSelect: "multiSelect";
|
|
926
931
|
portableText: "portableText";
|
|
927
|
-
image: "image";
|
|
928
932
|
reference: "reference";
|
|
929
933
|
repeater: "repeater";
|
|
930
934
|
}>>;
|
|
@@ -946,11 +950,11 @@ declare const updateFieldBody: z.ZodObject<{
|
|
|
946
950
|
number: "number";
|
|
947
951
|
boolean: "boolean";
|
|
948
952
|
url: "url";
|
|
949
|
-
|
|
950
|
-
integer: "integer";
|
|
953
|
+
image: "image";
|
|
951
954
|
datetime: "datetime";
|
|
955
|
+
text: "text";
|
|
952
956
|
select: "select";
|
|
953
|
-
|
|
957
|
+
integer: "integer";
|
|
954
958
|
}>;
|
|
955
959
|
label: z.ZodString;
|
|
956
960
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1012,13 +1016,13 @@ declare const fieldSchema: z.ZodObject<{
|
|
|
1012
1016
|
url: "url";
|
|
1013
1017
|
file: "file";
|
|
1014
1018
|
slug: "slug";
|
|
1015
|
-
|
|
1016
|
-
integer: "integer";
|
|
1019
|
+
image: "image";
|
|
1017
1020
|
datetime: "datetime";
|
|
1021
|
+
text: "text";
|
|
1018
1022
|
select: "select";
|
|
1023
|
+
integer: "integer";
|
|
1019
1024
|
multiSelect: "multiSelect";
|
|
1020
1025
|
portableText: "portableText";
|
|
1021
|
-
image: "image";
|
|
1022
1026
|
reference: "reference";
|
|
1023
1027
|
repeater: "repeater";
|
|
1024
1028
|
}>;
|
|
@@ -1087,13 +1091,13 @@ declare const collectionWithFieldsResponseSchema: z.ZodObject<{
|
|
|
1087
1091
|
url: "url";
|
|
1088
1092
|
file: "file";
|
|
1089
1093
|
slug: "slug";
|
|
1090
|
-
|
|
1091
|
-
integer: "integer";
|
|
1094
|
+
image: "image";
|
|
1092
1095
|
datetime: "datetime";
|
|
1096
|
+
text: "text";
|
|
1093
1097
|
select: "select";
|
|
1098
|
+
integer: "integer";
|
|
1094
1099
|
multiSelect: "multiSelect";
|
|
1095
1100
|
portableText: "portableText";
|
|
1096
|
-
image: "image";
|
|
1097
1101
|
reference: "reference";
|
|
1098
1102
|
repeater: "repeater";
|
|
1099
1103
|
}>;
|
|
@@ -1146,13 +1150,13 @@ declare const fieldResponseSchema: z.ZodObject<{
|
|
|
1146
1150
|
url: "url";
|
|
1147
1151
|
file: "file";
|
|
1148
1152
|
slug: "slug";
|
|
1149
|
-
|
|
1150
|
-
integer: "integer";
|
|
1153
|
+
image: "image";
|
|
1151
1154
|
datetime: "datetime";
|
|
1155
|
+
text: "text";
|
|
1152
1156
|
select: "select";
|
|
1157
|
+
integer: "integer";
|
|
1153
1158
|
multiSelect: "multiSelect";
|
|
1154
1159
|
portableText: "portableText";
|
|
1155
|
-
image: "image";
|
|
1156
1160
|
reference: "reference";
|
|
1157
1161
|
repeater: "repeater";
|
|
1158
1162
|
}>;
|
|
@@ -1183,13 +1187,13 @@ declare const fieldListResponseSchema: z.ZodObject<{
|
|
|
1183
1187
|
url: "url";
|
|
1184
1188
|
file: "file";
|
|
1185
1189
|
slug: "slug";
|
|
1186
|
-
|
|
1187
|
-
integer: "integer";
|
|
1190
|
+
image: "image";
|
|
1188
1191
|
datetime: "datetime";
|
|
1192
|
+
text: "text";
|
|
1189
1193
|
select: "select";
|
|
1194
|
+
integer: "integer";
|
|
1190
1195
|
multiSelect: "multiSelect";
|
|
1191
1196
|
portableText: "portableText";
|
|
1192
|
-
image: "image";
|
|
1193
1197
|
reference: "reference";
|
|
1194
1198
|
repeater: "repeater";
|
|
1195
1199
|
}>;
|
|
@@ -1234,8 +1238,8 @@ declare const createReactionBody: z.ZodObject<{
|
|
|
1234
1238
|
}, z.core.$strip>;
|
|
1235
1239
|
declare const commentStatusBody: z.ZodObject<{
|
|
1236
1240
|
status: z.ZodEnum<{
|
|
1237
|
-
approved: "approved";
|
|
1238
1241
|
pending: "pending";
|
|
1242
|
+
approved: "approved";
|
|
1239
1243
|
spam: "spam";
|
|
1240
1244
|
trash: "trash";
|
|
1241
1245
|
}>;
|
|
@@ -1251,8 +1255,8 @@ declare const commentBulkBody: z.ZodObject<{
|
|
|
1251
1255
|
}, z.core.$strip>;
|
|
1252
1256
|
declare const commentListQuery: z.ZodObject<{
|
|
1253
1257
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1254
|
-
approved: "approved";
|
|
1255
1258
|
pending: "pending";
|
|
1259
|
+
approved: "approved";
|
|
1256
1260
|
spam: "spam";
|
|
1257
1261
|
trash: "trash";
|
|
1258
1262
|
}>>;
|
|
@@ -1287,8 +1291,8 @@ declare const commentSchema: z.ZodObject<{
|
|
|
1287
1291
|
authorEmail: z.ZodString;
|
|
1288
1292
|
body: z.ZodString;
|
|
1289
1293
|
status: z.ZodEnum<{
|
|
1290
|
-
approved: "approved";
|
|
1291
1294
|
pending: "pending";
|
|
1295
|
+
approved: "approved";
|
|
1292
1296
|
spam: "spam";
|
|
1293
1297
|
trash: "trash";
|
|
1294
1298
|
}>;
|
|
@@ -1320,8 +1324,8 @@ declare const adminCommentListResponseSchema: z.ZodObject<{
|
|
|
1320
1324
|
authorEmail: z.ZodString;
|
|
1321
1325
|
body: z.ZodString;
|
|
1322
1326
|
status: z.ZodEnum<{
|
|
1323
|
-
approved: "approved";
|
|
1324
1327
|
pending: "pending";
|
|
1328
|
+
approved: "approved";
|
|
1325
1329
|
spam: "spam";
|
|
1326
1330
|
trash: "trash";
|
|
1327
1331
|
}>;
|
|
@@ -1368,13 +1372,13 @@ declare const contextEntryListQuery: z.ZodObject<{
|
|
|
1368
1372
|
declare const contextEntryStaleQuery: z.ZodObject<{
|
|
1369
1373
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1370
1374
|
cursor: z.ZodOptional<z.ZodString>;
|
|
1375
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
1371
1376
|
includeInherited: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
|
|
1372
1377
|
true: "true";
|
|
1373
1378
|
false: "false";
|
|
1374
1379
|
}>>, z.ZodTransform<boolean | undefined, "true" | "false" | undefined>>;
|
|
1375
1380
|
contextTypes: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
1376
1381
|
tags: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
1377
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
1378
1382
|
createdByActorType: z.ZodOptional<z.ZodEnum<{
|
|
1379
1383
|
user: "user";
|
|
1380
1384
|
api_token: "api_token";
|
|
@@ -1461,8 +1465,8 @@ declare const siteBriefingQuery: z.ZodObject<{
|
|
|
1461
1465
|
//#region src/api/schemas/hitl-requests.d.ts
|
|
1462
1466
|
declare const hitlRequestListQuery: z.ZodObject<{
|
|
1463
1467
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1464
|
-
approved: "approved";
|
|
1465
1468
|
pending: "pending";
|
|
1469
|
+
approved: "approved";
|
|
1466
1470
|
rejected: "rejected";
|
|
1467
1471
|
}>>;
|
|
1468
1472
|
priority: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1495,8 +1499,8 @@ declare const reviewRequestCreateBody: z.ZodObject<{
|
|
|
1495
1499
|
}, z.core.$strip>;
|
|
1496
1500
|
declare const reviewRequestListQuery: z.ZodObject<{
|
|
1497
1501
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1498
|
-
approved: "approved";
|
|
1499
1502
|
pending: "pending";
|
|
1503
|
+
approved: "approved";
|
|
1500
1504
|
rejected: "rejected";
|
|
1501
1505
|
resolved: "resolved";
|
|
1502
1506
|
}>>;
|
|
@@ -1545,7 +1549,7 @@ declare const signupCompleteBody: z.ZodObject<{
|
|
|
1545
1549
|
}, z.core.$strip>;
|
|
1546
1550
|
declare const inviteCreateBody: z.ZodObject<{
|
|
1547
1551
|
email: z.ZodString;
|
|
1548
|
-
role: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<
|
|
1552
|
+
role: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<10 | 20 | 30 | 40 | 50, unknown, z.core.$ZodTypeInternals<10 | 20 | 30 | 40 | 50, unknown>>>;
|
|
1549
1553
|
}, z.core.$strip>;
|
|
1550
1554
|
declare const inviteCompleteBody: z.ZodObject<{
|
|
1551
1555
|
token: z.ZodString;
|
|
@@ -2097,15 +2101,15 @@ declare const usersListQuery: z.ZodObject<{
|
|
|
2097
2101
|
declare const userUpdateBody: z.ZodObject<{
|
|
2098
2102
|
name: z.ZodOptional<z.ZodString>;
|
|
2099
2103
|
email: z.ZodOptional<z.ZodString>;
|
|
2100
|
-
role: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<
|
|
2104
|
+
role: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<10 | 20 | 30 | 40 | 50, unknown, z.core.$ZodTypeInternals<10 | 20 | 30 | 40 | 50, unknown>>>;
|
|
2101
2105
|
}, z.core.$strip>;
|
|
2102
2106
|
declare const allowedDomainCreateBody: z.ZodObject<{
|
|
2103
2107
|
domain: z.ZodString;
|
|
2104
|
-
defaultRole: z.ZodCoercedNumber<unknown> & z.ZodType<
|
|
2108
|
+
defaultRole: z.ZodCoercedNumber<unknown> & z.ZodType<10 | 20 | 30 | 40 | 50, unknown, z.core.$ZodTypeInternals<10 | 20 | 30 | 40 | 50, unknown>>;
|
|
2105
2109
|
}, z.core.$strip>;
|
|
2106
2110
|
declare const allowedDomainUpdateBody: z.ZodObject<{
|
|
2107
2111
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2108
|
-
defaultRole: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<
|
|
2112
|
+
defaultRole: z.ZodOptional<z.ZodCoercedNumber<unknown> & z.ZodType<10 | 20 | 30 | 40 | 50, unknown, z.core.$ZodTypeInternals<10 | 20 | 30 | 40 | 50, unknown>>>;
|
|
2109
2113
|
}, z.core.$strip>;
|
|
2110
2114
|
declare const userSchema: z.ZodObject<{
|
|
2111
2115
|
id: z.ZodString;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BylineSchemaRegistry, r as mapBylineSchemaError, t as BylineSchemaError } from "./byline-registry-
|
|
1
|
+
import { n as BylineSchemaRegistry, r as mapBylineSchemaError, t as BylineSchemaError } from "./byline-registry-Caj0_gbU.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/handlers/byline-fields.ts
|
|
4
4
|
function bylineSchemaErrorResult(error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as RESERVED_BYLINE_FIELD_SLUGS } from "./types-
|
|
2
|
-
import { n as isSiteContextType, t as SITE_CONTEXT_TYPES } from "./context-types-
|
|
3
|
-
import {
|
|
1
|
+
import { i as RESERVED_BYLINE_FIELD_SLUGS } from "./types-BgUxCuwu.mjs";
|
|
2
|
+
import { n as isSiteContextType, t as SITE_CONTEXT_TYPES } from "./context-types-DDIJhGLs.mjs";
|
|
3
|
+
import { L as httpUrl, V as roleLevel } from "./content-Dr22fzA_.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/api/schemas/context.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
3
|
-
import { i as RESERVED_BYLINE_FIELD_SLUGS, t as BYLINE_FIELD_TYPES } from "./types-
|
|
3
|
+
import { i as RESERVED_BYLINE_FIELD_SLUGS, t as BYLINE_FIELD_TYPES } from "./types-BgUxCuwu.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
import { ulid } from "ulidx";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
2
|
import { n as getI18nConfig } from "./config-XW5tMrH8.mjs";
|
|
3
|
-
import { t as DinewayValidationError } from "./types-
|
|
4
|
-
import { t as BylineRepository } from "./byline-
|
|
3
|
+
import { t as DinewayValidationError } from "./types-BI3ULB3A.mjs";
|
|
4
|
+
import { t as BylineRepository } from "./byline-3qjp1-oa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/api/handlers/bylines.ts
|
|
7
7
|
var bylines_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as __exportAll } from "./runner-
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
3
|
-
import { o as isMissingTableError, r as getDb } from "./loader-
|
|
4
|
-
import { t as BylineRepository } from "./byline-
|
|
5
|
-
import { n as resolveLocaleChain } from "./resolve-
|
|
3
|
+
import { o as isMissingTableError, r as getDb } from "./loader-CCwWFQSh.mjs";
|
|
4
|
+
import { t as BylineRepository } from "./byline-3qjp1-oa.mjs";
|
|
5
|
+
import { n as resolveLocaleChain } from "./resolve-BxFGSKYu.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
|
|
8
8
|
//#region src/bylines/index.ts
|
|
@@ -184,7 +184,7 @@ async function getBylinesForEntries(collection, entries) {
|
|
|
184
184
|
*/
|
|
185
185
|
async function getEntriesByByline(collection, byline, options = {}) {
|
|
186
186
|
validateIdentifier(collection, "collection");
|
|
187
|
-
const { getDinewayCollection } = await import("./query-
|
|
187
|
+
const { getDinewayCollection } = await import("./query-DDi367tF.mjs").then((n) => n.o);
|
|
188
188
|
const { entries } = await getDinewayCollection(collection, {
|
|
189
189
|
where: { byline },
|
|
190
190
|
...options.locale !== void 0 ? { locale: options.locale } : {},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { c as __exportAll } from "./runner-CuG8o1uW.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/redirects/patterns.ts
|
|
2
4
|
/**
|
|
3
5
|
* URL pattern matching for redirects.
|
|
@@ -141,4 +143,52 @@ function interpolateDestination(destination, params) {
|
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
//#endregion
|
|
144
|
-
|
|
146
|
+
//#region src/redirects/cache.ts
|
|
147
|
+
var cache_exports = /* @__PURE__ */ __exportAll({
|
|
148
|
+
compileRedirectRules: () => compileRedirectRules,
|
|
149
|
+
getCachedRedirects: () => getCachedRedirects,
|
|
150
|
+
invalidateRedirectCache: () => invalidateRedirectCache,
|
|
151
|
+
matchCachedPatterns: () => matchCachedPatterns,
|
|
152
|
+
setCachedRedirects: () => setCachedRedirects
|
|
153
|
+
});
|
|
154
|
+
let cachedRedirects = null;
|
|
155
|
+
function invalidateRedirectCache() {
|
|
156
|
+
cachedRedirects = null;
|
|
157
|
+
}
|
|
158
|
+
function getCachedRedirects() {
|
|
159
|
+
return cachedRedirects;
|
|
160
|
+
}
|
|
161
|
+
function compileRedirectRules(redirects) {
|
|
162
|
+
return redirects.map((redirect) => ({
|
|
163
|
+
redirect,
|
|
164
|
+
compiled: compilePattern(redirect.source)
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
function setCachedRedirects(redirects) {
|
|
168
|
+
const exact = /* @__PURE__ */ new Map();
|
|
169
|
+
const patterns = [];
|
|
170
|
+
for (const redirect of redirects) if (redirect.isPattern) patterns.push({
|
|
171
|
+
redirect,
|
|
172
|
+
compiled: compilePattern(redirect.source)
|
|
173
|
+
});
|
|
174
|
+
else exact.set(redirect.source, redirect);
|
|
175
|
+
cachedRedirects = {
|
|
176
|
+
exact,
|
|
177
|
+
patterns
|
|
178
|
+
};
|
|
179
|
+
return cachedRedirects;
|
|
180
|
+
}
|
|
181
|
+
function matchCachedPatterns(rules, pathname) {
|
|
182
|
+
for (const { redirect, compiled } of rules) {
|
|
183
|
+
const params = matchPattern(compiled, pathname);
|
|
184
|
+
if (!params) continue;
|
|
185
|
+
return {
|
|
186
|
+
redirect,
|
|
187
|
+
destination: interpolateDestination(redirect.destination, params)
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
//#endregion
|
|
194
|
+
export { matchCachedPatterns as a, interpolateDestination as c, validateDestinationParams as d, validatePattern as f, invalidateRedirectCache as i, isPattern as l, compileRedirectRules as n, setCachedRedirects as o, getCachedRedirects as r, compilePattern as s, cache_exports as t, matchPattern as u };
|