dineway 0.1.47 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -54
- package/dist/{activity-events-CNk3clTT.mjs → activity-events-C9u37D5z.mjs} +1 -1
- package/dist/api/route-utils.d.mts +8 -22
- package/dist/api/route-utils.mjs +8 -8
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-ePsOhL3q.mjs → api-Eiy8_zVZ.mjs} +63 -16
- package/dist/{apply-BpRBCqUt.mjs → apply-CX3no7XE.mjs} +54 -48
- package/dist/astro/index.d.mts +8 -8
- package/dist/astro/index.mjs +67 -25
- package/dist/astro/middleware/auth.d.mts +7 -7
- package/dist/astro/middleware/auth.mjs +1 -1
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- 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 -1
- package/dist/astro/middleware.mjs +362 -143
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +2 -2
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +2 -2
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +1 -1
- package/dist/astro/routes/api/admin/briefing.mjs +14 -14
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +2 -2
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +4 -4
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/index.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +5 -5
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +23 -23
- package/dist/astro/routes/api/admin/context/diff.mjs +22 -22
- package/dist/astro/routes/api/admin/context/index.mjs +23 -23
- package/dist/astro/routes/api/admin/context/stale.mjs +22 -22
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +21 -21
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +23 -23
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +20 -20
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/updates.mjs +35 -35
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +22 -22
- package/dist/astro/routes/api/admin/review-requests/index.mjs +5 -5
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +35 -35
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +2 -2
- package/dist/astro/routes/api/auth/dev-bypass.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/index.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/register-options.mjs +4 -4
- package/dist/astro/routes/api/auth/magic-link/send.mjs +4 -4
- 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/passkey/_id_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/verify.mjs +5 -5
- package/dist/astro/routes/api/auth/setup-token/index.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +5 -5
- package/dist/astro/routes/api/auth/signup/request.mjs +4 -4
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +11 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/authors.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs +16 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/trash.mjs +2 -2
- package/dist/astro/routes/api/dashboard.mjs +6 -6
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +2 -2
- package/dist/astro/routes/api/import/probe.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.mjs +23 -23
- package/dist/astro/routes/api/import/wordpress/media.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +26 -26
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +24 -24
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +24 -24
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +46 -46
- package/dist/astro/routes/api/media/_id_/confirm.mjs +4 -4
- package/dist/astro/routes/api/media/_id_.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +4 -4
- package/dist/astro/routes/api/media.mjs +4 -4
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/items.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/translations.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_.mjs +23 -23
- package/dist/astro/routes/api/menus/index.mjs +23 -23
- package/dist/astro/routes/api/oauth/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/authorize.mjs +2 -2
- package/dist/astro/routes/api/oauth/device/code.mjs +2 -2
- package/dist/astro/routes/api/oauth/device/token.mjs +2 -2
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/revoke.mjs +2 -2
- package/dist/astro/routes/api/oauth/token.mjs +3 -3
- package/dist/astro/routes/api/openapi.json.mjs +16 -2
- package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
- package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
- package/dist/astro/routes/api/redirects/_id_.mjs +24 -24
- package/dist/astro/routes/api/redirects/index.mjs +24 -24
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/index.mjs +36 -36
- package/dist/astro/routes/api/schema/index.mjs +3 -3
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +35 -35
- package/dist/astro/routes/api/schema/orphans/index.mjs +35 -35
- package/dist/astro/routes/api/search/enable.mjs +6 -6
- package/dist/astro/routes/api/search/index.mjs +6 -6
- package/dist/astro/routes/api/search/rebuild.mjs +6 -6
- package/dist/astro/routes/api/search/stats.mjs +4 -4
- package/dist/astro/routes/api/search/suggest.mjs +6 -6
- package/dist/astro/routes/api/sections/_slug_.mjs +23 -23
- package/dist/astro/routes/api/sections/index.mjs +23 -23
- package/dist/astro/routes/api/settings/email.mjs +1 -1
- package/dist/astro/routes/api/settings.mjs +23 -23
- package/dist/astro/routes/api/setup/admin-verify.mjs +6 -6
- package/dist/astro/routes/api/setup/admin.mjs +4 -4
- package/dist/astro/routes/api/setup/dev-bypass.mjs +17 -17
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +20 -20
- package/dist/astro/routes/api/setup/status.mjs +2 -2
- package/dist/astro/routes/api/snapshot.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/index.mjs +25 -25
- package/dist/astro/routes/api/themes/preview.mjs +2 -2
- package/dist/astro/routes/api/typegen.mjs +3 -3
- package/dist/astro/routes/api/well-known/auth.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +22 -22
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +23 -23
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +23 -23
- package/dist/astro/routes/api/widget-areas/_name_.mjs +21 -21
- package/dist/astro/routes/api/widget-areas/index.mjs +23 -23
- package/dist/astro/routes/robots.txt.mjs +45 -22
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +6 -6
- package/dist/astro/routes/sitemap.xml.mjs +6 -6
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +15 -8
- package/dist/{audit-DuRbTm8L.mjs → audit-D1cbG7xH.mjs} +1 -1
- package/dist/{briefing-C4fJSVYW.mjs → briefing-CObXGOGz.mjs} +1 -1
- package/dist/{briefing-BFEWeJtR.mjs → briefing-gKWiGLt1.mjs} +6 -6
- package/dist/{byline-CXQcMsBu.mjs → byline-1ntDwv8c.mjs} +5 -5
- package/dist/{byline-fields-D7TJ_oHF.mjs → byline-fields-B-ZkoVft.mjs} +2 -2
- package/dist/{byline-fields-Cuo-JI3B.d.mts → byline-fields-BX7rWKNU.d.mts} +54 -30
- package/dist/{byline-fields-Dc7L6Yry.mjs → byline-fields-C9_iaPaM.mjs} +1 -1
- package/dist/{byline-registry-CL8BxPPp.mjs → byline-registry-CUSvkasJ.mjs} +2 -2
- package/dist/{bylines-BgriNlW7.mjs → bylines-DtxChhN_.mjs} +38 -4
- package/dist/{bylines-D2vqm1aZ.mjs → bylines-bC15ZqAv.mjs} +2 -2
- package/dist/{cache-GRK71jOU.mjs → cache-DbKyr60Q.mjs} +2 -2
- package/dist/{chunks-DgEw12Bc.mjs → chunks-C5zp2xir.mjs} +1 -1
- package/dist/cli/index.mjs +42 -31
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/{comment-ogMaF1gk.mjs → comment-CXDOQ93N.mjs} +1 -1
- package/dist/{comments-CTSOKrZq.mjs → comments-hK-rdzJ9.mjs} +1 -1
- package/dist/{content-BfyjOiMi.mjs → content-QaryevFO.mjs} +103 -40
- package/dist/{context-ZMHhwzkG.mjs → context-CoYb_fvK.mjs} +7 -7
- package/dist/{context-CdsYb1m8.mjs → context-DBL1ib4v.mjs} +2 -2
- package/dist/{context-route-helpers-YLWx2N1j.mjs → context-route-helpers-CYQVmbIm.mjs} +1 -1
- package/dist/{dashboard-D0gWuzNp.mjs → dashboard-DNlqsknJ.mjs} +4 -4
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{default-BHauvIdG.mjs → default-B6iaLvP7.mjs} +4 -2
- package/dist/{device-flow-B3_FEoMI.mjs → device-flow-DygsFPGL.mjs} +3 -3
- package/dist/{fts-manager-EHY2Kes9.mjs → fts-manager-CIZlScg5.mjs} +1 -1
- package/dist/{hitl-requests-B1Zqgut6.mjs → hitl-requests-CGQwOEiq.mjs} +2 -2
- package/dist/{hitl-route-helpers-CjpWUMuw.mjs → hitl-route-helpers-GSDLNPpN.mjs} +3 -3
- package/dist/{index-DJVaYiUV.d.mts → index-CwRuZ-u8.d.mts} +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +51 -51
- package/dist/{jsonld-AcPnCEGD.d.mts → jsonld-DZ67souc.d.mts} +1 -1
- package/dist/{load-BdbvtoDb.mjs → load-xE01Jm0V.mjs} +1 -1
- package/dist/{loader-Y0QvC_QO.mjs → loader-tg63WSY2.mjs} +138 -36
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-DhBwiCYR.mjs → media-DUAjMfvR.mjs} +1 -1
- package/dist/{menus-fqqzXyHd.mjs → menus-DU1eZqw_.mjs} +13 -8
- package/dist/{menus-BzGQpw9d.mjs → menus-WpFRMXjz.mjs} +2 -2
- package/dist/{normalize-O-hi3a27.mjs → normalize-DUnoXAa9.mjs} +1 -1
- package/dist/{oauth-authorization-DsF81vki.mjs → oauth-authorization-D-1p52Je.mjs} +3 -3
- package/dist/{oauth-clients-Du-V0fEm.mjs → oauth-clients-CzeMGyUU.mjs} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/plugin-utils.d.mts +7 -7
- package/dist/plugins/adapt-sandbox-entry.d.mts +7 -7
- package/dist/{plugins-BQ5Joz6v.mjs → plugins-C57YQi4l.mjs} +195 -5
- package/dist/public-url-B5HaoGzj.d.mts +18 -0
- package/dist/{query-CSx0EdSW.mjs → query-BYc3oruA.mjs} +29 -18
- package/dist/{query-BJuUydtD.mjs → query-DKEwzobh.mjs} +3 -3
- package/dist/{redirect-BqFMj67n.mjs → redirect-C2zXRj3c.mjs} +2 -2
- package/dist/{redirects-CJwHl_YG.mjs → redirects-YZo_znWG.mjs} +4 -4
- package/dist/{redirects-q_cToaHv.mjs → redirects-ocRJmQHP.mjs} +23 -3
- package/dist/{registry-Cq3QRBW2.mjs → registry-CTkbIDB9.mjs} +38 -6
- package/dist/{review-requests-GYqjl2jO.mjs → review-requests-C0un5kdV.mjs} +1 -1
- package/dist/{review-requests-tPw8_pAO.mjs → review-requests-gGMyYYhy.mjs} +1 -1
- package/dist/{runner-DTfG5v0G.mjs → runner-B-tbV751.mjs} +233 -193
- package/dist/{runner-Cnz4dl0f.d.mts → runner-D4FL9usy.d.mts} +1 -1
- package/dist/{runtime-Cd-kjPfN.d.mts → runtime-DEWQpZ-4.d.mts} +154 -22
- package/dist/runtime.d.mts +8 -8
- package/dist/runtime.mjs +2 -2
- package/dist/schema-B6zyB-Xn.mjs +8 -0
- package/dist/{search-BAiFLz81.mjs → search-axGQ1KY3.mjs} +3 -3
- package/dist/{secrets-CPoFLJjm.mjs → secrets-062Izo8i.mjs} +1 -1
- package/dist/{sections-DsuIrFDC.mjs → sections-OLKgXL10.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +17 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-uMFBaR8G.mjs → seo-Cd45Po8L.mjs} +1 -1
- package/dist/{service-CifrxCru.mjs → service-Bwad8s5h.mjs} +1 -1
- package/dist/{settings-BYGdocdj.mjs → settings-lAHjaUit.mjs} +2 -2
- package/dist/{settings-DNRQuX3d.mjs → settings-yLjz_I4T.mjs} +4 -4
- package/dist/{setup-complete-4EiBS1E5.mjs → setup-complete--PradA4R.mjs} +1 -1
- package/dist/{site-activity-6x1JccoR.mjs → site-activity-D7Xyropw.mjs} +1 -1
- package/dist/{site-context-c1ZFa_OF.mjs → site-context-DaN9Z91j.mjs} +13 -13
- package/dist/{site-url-C-cu8Ff2.mjs → site-url-DpGZo9Z6.mjs} +1 -1
- package/dist/{taxonomies-faQVeMgj.mjs → taxonomies-CNOGeC-3.mjs} +9 -7
- package/dist/{taxonomies-CQFmkP5u.mjs → taxonomies-uXVEoQso.mjs} +3 -3
- package/dist/{taxonomy-BnH-6VsX.mjs → taxonomy-CBmkmMuU.mjs} +2 -2
- package/dist/{types-DEAQG87T.d.mts → types-CwawBUTa.d.mts} +1 -1
- package/dist/{types-B7_vSiPD.d.mts → types-DRIKLmJI.d.mts} +14 -2
- package/dist/{types-UGmU5sWx.d.mts → types-DSPGWjxO.d.mts} +1 -1
- package/dist/{types-Ck7-WoUD.mjs → types-DfuD0Afl.mjs} +9 -2
- package/dist/{types-DYKtk8f1.d.mts → types-eu5UDgHN.d.mts} +22 -0
- package/dist/ui/server-runtime.d.mts +58 -10
- package/dist/ui/server-runtime.mjs +97 -15
- package/dist/{user-CqZwN21P.mjs → user-DtNmjNYt.mjs} +15 -1
- package/dist/{validate-CK4a1sIF.mjs → validate-7SYRbz2f.mjs} +5 -2
- package/dist/{validate-BJuG-ISL.d.mts → validate-BMs11tan.d.mts} +10 -2
- package/dist/version-xlzMSXF2.mjs +6 -0
- package/dist/{widgets-CdDvF4fV.mjs → widgets-DR8EHuRO.mjs} +1 -1
- package/dist/{wordpress-slugs-B6Gw9q3Q.mjs → wordpress-slugs-Dvhxh4cl.mjs} +1 -1
- package/dist/{zod-generator-D1ROBNuC.mjs → zod-generator-BS9-umbk.mjs} +3 -2
- package/package.json +5 -5
- package/src/components/DinewayImage.astro +23 -5
- package/src/components/Image.astro +19 -3
- package/dist/schema-DmHMWnSA.mjs +0 -8
- package/dist/version-Cb1tZ6s_.mjs +0 -6
- /package/dist/{allowed-origins-QirBXiDj.mjs → allowed-origins-DhipQNLb.mjs} +0 -0
- /package/dist/{challenge-store-DFxX0_15.mjs → challenge-store-CRSz-Xim.mjs} +0 -0
- /package/dist/{entity-aliases-uOrKvlPg.mjs → entity-aliases-Egjmqc7I.mjs} +0 -0
- /package/dist/{experimental-workflows-CSMffP6q.mjs → experimental-workflows-Dh4DUoD_.mjs} +0 -0
- /package/dist/{mode-CZqCF9dZ.mjs → mode-CpyEz8pe.mjs} +0 -0
- /package/dist/{options-BF11H_FD.mjs → options-BvJoSSJR.mjs} +0 -0
- /package/dist/{patterns-D9iDO3j8.mjs → patterns-r-0n824Y.mjs} +0 -0
- /package/dist/{provider-loader-B5PMjpN7.d.mts → provider-loader-9it4vd6L.d.mts} +0 -0
- /package/dist/{request-cache-w5cj5itT.mjs → request-cache-CYMbwZc6.mjs} +0 -0
- /package/dist/{transaction-D0FOsb3X.mjs → transaction-CShMWIej.mjs} +0 -0
- /package/dist/{transport-DidKKxvW.d.mts → transport-BnsNxh2l.d.mts} +0 -0
- /package/dist/{types-DbZhHtqS.mjs → types-BO8TGjS8.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-B-tbV751.mjs";
|
|
2
2
|
import { n as getI18nConfig } from "./config-CVssduLe.mjs";
|
|
3
|
-
import { t as withTransaction } from "./transaction-
|
|
3
|
+
import { t as withTransaction } from "./transaction-CShMWIej.mjs";
|
|
4
4
|
import { ulid } from "ulidx";
|
|
5
5
|
|
|
6
6
|
//#region src/database/repositories/menu.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as withTransaction } from "./transaction-
|
|
2
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
1
|
+
import { t as withTransaction } from "./transaction-CShMWIej.mjs";
|
|
2
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-Dh4DUoD_.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-CYUoFGo7.mjs";
|
|
4
|
-
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-
|
|
4
|
+
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-CzeMGyUU.mjs";
|
|
5
5
|
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-BFjWF8wK.mjs";
|
|
6
6
|
import { clampScopes, computeS256Challenge, secureCompare } from "@dineway-ai/auth";
|
|
7
7
|
import { generateCodeVerifier } from "arctic";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
1
|
+
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-Dh4DUoD_.mjs";
|
|
2
2
|
import { s as validateScopes } from "./api-tokens-CYUoFGo7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/oauth/redirect-uri.ts
|
package/dist/page/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as PageMetadataContribution, D as PageFragmentContribution, q as PublicPageContext } from "../types-
|
|
2
|
-
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as resolvePageMetadata, f as safeJsonLdSerialize, i as generateBaseSeoContributions, l as escapeHtmlAttr, m as createPublicPageContext, n as buildWebSiteJsonLd, o as renderFragments, p as CreatePublicPageContextInput, r as cleanJsonLd, s as resolveFragments, t as buildBlogPostingJsonLd, u as renderPageMetadata } from "../jsonld-
|
|
1
|
+
import { A as PageMetadataContribution, D as PageFragmentContribution, q as PublicPageContext } from "../types-DSPGWjxO.mjs";
|
|
2
|
+
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as resolvePageMetadata, f as safeJsonLdSerialize, i as generateBaseSeoContributions, l as escapeHtmlAttr, m as createPublicPageContext, n as buildWebSiteJsonLd, o as renderFragments, p as CreatePublicPageContextInput, r as cleanJsonLd, s as resolveFragments, t as buildBlogPostingJsonLd, u as renderPageMetadata } from "../jsonld-DZ67souc.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/page/index.d.ts
|
|
5
5
|
/**
|
package/dist/plugin-utils.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./runtime-
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./types-
|
|
1
|
+
import "./runtime-DEWQpZ-4.mjs";
|
|
2
|
+
import "./types-eu5UDgHN.mjs";
|
|
3
|
+
import "./types-DSPGWjxO.mjs";
|
|
4
4
|
import "./types-Dryvv7LH.mjs";
|
|
5
|
-
import "./runner-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./byline-fields-
|
|
5
|
+
import "./runner-D4FL9usy.mjs";
|
|
6
|
+
import "./index-CwRuZ-u8.mjs";
|
|
7
|
+
import "./byline-fields-BX7rWKNU.mjs";
|
|
8
8
|
import "./types-GaCtZ1k9.mjs";
|
|
9
|
-
import "./validate-
|
|
9
|
+
import "./validate-BMs11tan.mjs";
|
|
10
10
|
import { DinewayHandlers } from "./astro/types.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/plugin-utils.d.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { n as PluginDescriptor } from "../runtime-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-
|
|
1
|
+
import { n as PluginDescriptor } from "../runtime-DEWQpZ-4.mjs";
|
|
2
|
+
import "../types-eu5UDgHN.mjs";
|
|
3
|
+
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-DSPGWjxO.mjs";
|
|
4
4
|
import "../types-Dryvv7LH.mjs";
|
|
5
|
-
import "../runner-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../byline-fields-
|
|
5
|
+
import "../runner-D4FL9usy.mjs";
|
|
6
|
+
import "../index-CwRuZ-u8.mjs";
|
|
7
|
+
import "../byline-fields-BX7rWKNU.mjs";
|
|
8
8
|
import "../types-GaCtZ1k9.mjs";
|
|
9
|
-
import "../validate-
|
|
9
|
+
import "../validate-BMs11tan.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/plugins/adapt-sandbox-entry.d.ts
|
|
12
12
|
/**
|
|
@@ -1,12 +1,193 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-C5zp2xir.mjs";
|
|
2
|
+
import { t as OptionsRepository } from "./options-BvJoSSJR.mjs";
|
|
3
|
+
import { n as createPluginContext, t as PluginContextFactory } from "./context-CoYb_fvK.mjs";
|
|
3
4
|
import { t as extractRequestMeta } from "./request-meta-DAb6xaP9.mjs";
|
|
4
5
|
import { r as setCronTasksEnabled } from "./cron-DxCAU_Sn.mjs";
|
|
5
6
|
import { sql } from "kysely";
|
|
7
|
+
import { ulid } from "ulidx";
|
|
6
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
9
|
import { z } from "astro/zod";
|
|
8
10
|
import { Worker } from "node:worker_threads";
|
|
9
11
|
|
|
12
|
+
//#region src/database/repositories/relation.ts
|
|
13
|
+
var RelationRepository = class {
|
|
14
|
+
constructor(db) {
|
|
15
|
+
this.db = db;
|
|
16
|
+
}
|
|
17
|
+
async create(input) {
|
|
18
|
+
const id = ulid();
|
|
19
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
20
|
+
let translationGroup = id;
|
|
21
|
+
let name = input.name;
|
|
22
|
+
let parentCollection = input.parentCollection;
|
|
23
|
+
let childCollection = input.childCollection;
|
|
24
|
+
if (input.translationOf) {
|
|
25
|
+
const source = await this.findById(input.translationOf);
|
|
26
|
+
if (!source) throw new Error("Source relation for translation not found");
|
|
27
|
+
translationGroup = source.translationGroup;
|
|
28
|
+
name = source.name;
|
|
29
|
+
parentCollection = source.parentCollection;
|
|
30
|
+
childCollection = source.childCollection;
|
|
31
|
+
}
|
|
32
|
+
await this.db.insertInto("_dineway_relations").values({
|
|
33
|
+
id,
|
|
34
|
+
name,
|
|
35
|
+
parent_collection: parentCollection,
|
|
36
|
+
child_collection: childCollection,
|
|
37
|
+
parent_label: input.parentLabel,
|
|
38
|
+
child_label: input.childLabel,
|
|
39
|
+
created_at: now,
|
|
40
|
+
updated_at: now,
|
|
41
|
+
...input.locale !== void 0 ? { locale: input.locale } : {},
|
|
42
|
+
translation_group: translationGroup
|
|
43
|
+
}).execute();
|
|
44
|
+
const relation = await this.findById(id);
|
|
45
|
+
if (!relation) throw new Error("Failed to create relation");
|
|
46
|
+
return relation;
|
|
47
|
+
}
|
|
48
|
+
async findById(id) {
|
|
49
|
+
const row = await this.db.selectFrom("_dineway_relations").selectAll().where("id", "=", id).executeTakeFirst();
|
|
50
|
+
return row ? this.rowToRelation(row) : null;
|
|
51
|
+
}
|
|
52
|
+
async findByName(name, locale) {
|
|
53
|
+
let query = this.db.selectFrom("_dineway_relations").selectAll().where("name", "=", name);
|
|
54
|
+
if (locale !== void 0) query = query.where("locale", "=", locale);
|
|
55
|
+
const row = await query.orderBy("locale", "asc").executeTakeFirst();
|
|
56
|
+
return row ? this.rowToRelation(row) : null;
|
|
57
|
+
}
|
|
58
|
+
async findTranslations(translationGroup) {
|
|
59
|
+
return (await this.db.selectFrom("_dineway_relations").selectAll().where("translation_group", "=", translationGroup).orderBy("locale", "asc").execute()).map((row) => this.rowToRelation(row));
|
|
60
|
+
}
|
|
61
|
+
async list(locale) {
|
|
62
|
+
let query = this.db.selectFrom("_dineway_relations").selectAll().orderBy("name", "asc").orderBy("id", "asc");
|
|
63
|
+
if (locale !== void 0) query = query.where("locale", "=", locale);
|
|
64
|
+
return (await query.execute()).map((row) => this.rowToRelation(row));
|
|
65
|
+
}
|
|
66
|
+
async findForCollection(collection, locale) {
|
|
67
|
+
let query = this.db.selectFrom("_dineway_relations").selectAll().where((eb) => eb.or([eb("parent_collection", "=", collection), eb("child_collection", "=", collection)])).orderBy("name", "asc").orderBy("id", "asc");
|
|
68
|
+
if (locale !== void 0) query = query.where("locale", "=", locale);
|
|
69
|
+
return (await query.execute()).map((row) => this.rowToRelation(row));
|
|
70
|
+
}
|
|
71
|
+
async update(id, input) {
|
|
72
|
+
if (!await this.findById(id)) return null;
|
|
73
|
+
const updates = {};
|
|
74
|
+
if (input.parentLabel !== void 0) updates.parent_label = input.parentLabel;
|
|
75
|
+
if (input.childLabel !== void 0) updates.child_label = input.childLabel;
|
|
76
|
+
if (Object.keys(updates).length > 0) {
|
|
77
|
+
updates.updated_at = (/* @__PURE__ */ new Date()).toISOString();
|
|
78
|
+
await this.db.updateTable("_dineway_relations").set(updates).where("id", "=", id).execute();
|
|
79
|
+
}
|
|
80
|
+
return this.findById(id);
|
|
81
|
+
}
|
|
82
|
+
async delete(id) {
|
|
83
|
+
const relation = await this.findById(id);
|
|
84
|
+
if (!relation) return false;
|
|
85
|
+
if ((await this.db.selectFrom("_dineway_relations").select("id").where("translation_group", "=", relation.translationGroup).where("id", "!=", id).execute()).length === 0) await this.db.deleteFrom("_dineway_content_references").where("relation_group", "=", relation.translationGroup).execute();
|
|
86
|
+
const result = await this.db.deleteFrom("_dineway_relations").where("id", "=", id).executeTakeFirst();
|
|
87
|
+
return Number(result.numDeletedRows ?? 0) > 0;
|
|
88
|
+
}
|
|
89
|
+
async addReference(relation, parentGroup, childGroup, sortOrder) {
|
|
90
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
91
|
+
if (!relationGroup) return;
|
|
92
|
+
let order = sortOrder;
|
|
93
|
+
if (order === void 0) {
|
|
94
|
+
const max = await this.db.selectFrom("_dineway_content_references").select((eb) => eb.fn.max("sort_order").as("max")).where("relation_group", "=", relationGroup).where("parent_group", "=", parentGroup).executeTakeFirst();
|
|
95
|
+
order = max?.max === null || max?.max === void 0 ? 0 : Number(max.max) + 1;
|
|
96
|
+
}
|
|
97
|
+
await this.db.insertInto("_dineway_content_references").values({
|
|
98
|
+
id: ulid(),
|
|
99
|
+
relation_group: relationGroup,
|
|
100
|
+
parent_group: parentGroup,
|
|
101
|
+
child_group: childGroup,
|
|
102
|
+
sort_order: order,
|
|
103
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
104
|
+
}).onConflict((oc) => oc.doNothing()).execute();
|
|
105
|
+
}
|
|
106
|
+
async removeReference(relation, parentGroup, childGroup) {
|
|
107
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
108
|
+
if (!relationGroup) return;
|
|
109
|
+
await this.db.deleteFrom("_dineway_content_references").where("relation_group", "=", relationGroup).where("parent_group", "=", parentGroup).where("child_group", "=", childGroup).execute();
|
|
110
|
+
}
|
|
111
|
+
async getChildren(relation, parentGroup) {
|
|
112
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
113
|
+
if (!relationGroup) return [];
|
|
114
|
+
return (await this.db.selectFrom("_dineway_content_references").selectAll().where("relation_group", "=", relationGroup).where("parent_group", "=", parentGroup).orderBy("sort_order", "asc").orderBy("id", "asc").execute()).map((row) => this.rowToReference(row));
|
|
115
|
+
}
|
|
116
|
+
async getParents(relation, childGroup) {
|
|
117
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
118
|
+
if (!relationGroup) return [];
|
|
119
|
+
return (await this.db.selectFrom("_dineway_content_references").selectAll().where("relation_group", "=", relationGroup).where("child_group", "=", childGroup).orderBy("id", "asc").execute()).map((row) => this.rowToReference(row));
|
|
120
|
+
}
|
|
121
|
+
async setChildren(relation, parentGroup, childGroups) {
|
|
122
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
123
|
+
if (!relationGroup) return;
|
|
124
|
+
await this.db.deleteFrom("_dineway_content_references").where("relation_group", "=", relationGroup).where("parent_group", "=", parentGroup).execute();
|
|
125
|
+
const uniqueChildGroups = [...new Set(childGroups)];
|
|
126
|
+
if (uniqueChildGroups.length === 0) return;
|
|
127
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
128
|
+
await this.db.insertInto("_dineway_content_references").values(uniqueChildGroups.map((childGroup, index) => ({
|
|
129
|
+
id: ulid(),
|
|
130
|
+
relation_group: relationGroup,
|
|
131
|
+
parent_group: parentGroup,
|
|
132
|
+
child_group: childGroup,
|
|
133
|
+
sort_order: index,
|
|
134
|
+
created_at: now
|
|
135
|
+
}))).onConflict((oc) => oc.doNothing()).execute();
|
|
136
|
+
}
|
|
137
|
+
async clearReferencesForGroup(group) {
|
|
138
|
+
const result = await this.db.deleteFrom("_dineway_content_references").where((eb) => eb.or([eb("parent_group", "=", group), eb("child_group", "=", group)])).executeTakeFirst();
|
|
139
|
+
return Number(result.numDeletedRows ?? 0);
|
|
140
|
+
}
|
|
141
|
+
async countChildren(relation, parentGroup) {
|
|
142
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
143
|
+
if (!relationGroup) return 0;
|
|
144
|
+
const result = await this.db.selectFrom("_dineway_content_references").select((eb) => eb.fn.count("id").as("count")).where("relation_group", "=", relationGroup).where("parent_group", "=", parentGroup).executeTakeFirst();
|
|
145
|
+
return Number(result?.count ?? 0);
|
|
146
|
+
}
|
|
147
|
+
async countParents(relation, childGroup) {
|
|
148
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
149
|
+
if (!relationGroup) return 0;
|
|
150
|
+
const result = await this.db.selectFrom("_dineway_content_references").select((eb) => eb.fn.count("id").as("count")).where("relation_group", "=", relationGroup).where("child_group", "=", childGroup).executeTakeFirst();
|
|
151
|
+
return Number(result?.count ?? 0);
|
|
152
|
+
}
|
|
153
|
+
async countChildrenForParents(relation, parentGroups) {
|
|
154
|
+
const counts = /* @__PURE__ */ new Map();
|
|
155
|
+
if (parentGroups.length === 0) return counts;
|
|
156
|
+
const relationGroup = await this.resolveRelationGroup(relation);
|
|
157
|
+
if (!relationGroup) return counts;
|
|
158
|
+
for (const chunk of chunks(parentGroups, SQL_BATCH_SIZE)) {
|
|
159
|
+
const rows = await this.db.selectFrom("_dineway_content_references").select(["parent_group", (eb) => eb.fn.count("id").as("count")]).where("relation_group", "=", relationGroup).where("parent_group", "in", chunk).groupBy("parent_group").execute();
|
|
160
|
+
for (const row of rows) counts.set(row.parent_group, Number(row.count ?? 0));
|
|
161
|
+
}
|
|
162
|
+
return counts;
|
|
163
|
+
}
|
|
164
|
+
async resolveRelationGroup(idOrGroup) {
|
|
165
|
+
return (await this.db.selectFrom("_dineway_relations").select("translation_group").where((eb) => eb.or([eb("id", "=", idOrGroup), eb("translation_group", "=", idOrGroup)])).executeTakeFirst())?.translation_group ?? null;
|
|
166
|
+
}
|
|
167
|
+
rowToReference(row) {
|
|
168
|
+
return {
|
|
169
|
+
id: row.id,
|
|
170
|
+
relationGroup: row.relation_group,
|
|
171
|
+
parentGroup: row.parent_group,
|
|
172
|
+
childGroup: row.child_group,
|
|
173
|
+
sortOrder: row.sort_order
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
rowToRelation(row) {
|
|
177
|
+
return {
|
|
178
|
+
id: row.id,
|
|
179
|
+
name: row.name,
|
|
180
|
+
parentCollection: row.parent_collection,
|
|
181
|
+
childCollection: row.child_collection,
|
|
182
|
+
parentLabel: row.parent_label,
|
|
183
|
+
childLabel: row.child_label,
|
|
184
|
+
locale: row.locale,
|
|
185
|
+
translationGroup: row.translation_group
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
//#endregion
|
|
10
191
|
//#region src/fields/image.ts
|
|
11
192
|
/**
|
|
12
193
|
* Image field schema
|
|
@@ -1645,14 +1826,22 @@ const EXCLUSIVE_HOOK_KEY_PREFIX$1 = "dineway:exclusive_hook:";
|
|
|
1645
1826
|
* 5. If multiple providers and no hint → leave unselected (admin must choose).
|
|
1646
1827
|
*/
|
|
1647
1828
|
async function resolveExclusiveHooks(opts) {
|
|
1648
|
-
const { pipeline, isActive, getOption, setOption, deleteOption, preferredHints } = opts;
|
|
1829
|
+
const { pipeline, isActive, getOption, getOptions, setOption, deleteOption, preferredHints } = opts;
|
|
1649
1830
|
const exclusiveHookNames = pipeline.getRegisteredExclusiveHooks();
|
|
1831
|
+
if (exclusiveHookNames.length === 0) return;
|
|
1832
|
+
let currentSelections;
|
|
1833
|
+
if (getOptions) try {
|
|
1834
|
+
currentSelections = await getOptions(exclusiveHookNames.map((hookName) => `${EXCLUSIVE_HOOK_KEY_PREFIX$1}${hookName}`));
|
|
1835
|
+
} catch {
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1650
1838
|
for (const hookName of exclusiveHookNames) {
|
|
1651
1839
|
const providers = pipeline.getExclusiveHookProviders(hookName);
|
|
1652
1840
|
const activeProviderIds = new Set(providers.map((p) => p.pluginId).filter((id) => isActive(id)));
|
|
1653
1841
|
const key = `${EXCLUSIVE_HOOK_KEY_PREFIX$1}${hookName}`;
|
|
1654
1842
|
let currentSelection = null;
|
|
1655
|
-
|
|
1843
|
+
if (currentSelections) currentSelection = currentSelections.get(key) ?? null;
|
|
1844
|
+
else try {
|
|
1656
1845
|
currentSelection = await getOption(key);
|
|
1657
1846
|
} catch {
|
|
1658
1847
|
continue;
|
|
@@ -2329,6 +2518,7 @@ var PluginManager = class {
|
|
|
2329
2518
|
pipeline: this.hookPipeline,
|
|
2330
2519
|
isActive: (pluginId) => this.isActive(pluginId),
|
|
2331
2520
|
getOption: (key) => optionsRepo.get(key),
|
|
2521
|
+
getOptions: (keys) => optionsRepo.getMany(keys),
|
|
2332
2522
|
setOption: (key, value) => optionsRepo.set(key, value),
|
|
2333
2523
|
deleteOption: async (key) => {
|
|
2334
2524
|
await optionsRepo.delete(key);
|
|
@@ -3277,4 +3467,4 @@ function isStandardPluginDefinition(value) {
|
|
|
3277
3467
|
}
|
|
3278
3468
|
|
|
3279
3469
|
//#endregion
|
|
3280
|
-
export { portableTextToProsemirror as _, SandboxNotAvailableError as a, reference as b, createPluginManager as c, EmailPipeline as d, HookPipeline as f, after as g, definePlugin as h, NoopSandboxRunner as i, PluginRouteError as l, resolveExclusiveHooks as m, NodeSandboxRunner as n, createNoopSandboxRunner as o, createHookPipeline as p, createNodeSandboxRunner as r, PluginManager as s, isStandardPluginDefinition as t, PluginRouteRegistry as u, prosemirrorToPortableText as v, image as x, portableText as y };
|
|
3470
|
+
export { RelationRepository as S, portableTextToProsemirror as _, SandboxNotAvailableError as a, reference as b, createPluginManager as c, EmailPipeline as d, HookPipeline as f, after as g, definePlugin as h, NoopSandboxRunner as i, PluginRouteError as l, resolveExclusiveHooks as m, NodeSandboxRunner as n, createNoopSandboxRunner as o, createHookPipeline as p, createNodeSandboxRunner as r, PluginManager as s, isStandardPluginDefinition as t, PluginRouteRegistry as u, prosemirrorToPortableText as v, image as x, portableText as y };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as DinewayConfig } from "./runtime-DEWQpZ-4.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/api/public-url.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Return the public-facing origin for the site.
|
|
6
|
+
*
|
|
7
|
+
* Resolution order:
|
|
8
|
+
* 1. `config.siteUrl` (set in astro.config.mjs, origin-normalized at startup)
|
|
9
|
+
* 2. `DINEWAY_SITE_URL` or `SITE_URL` env var (resolved at runtime for containers)
|
|
10
|
+
* 3. `url.origin` (internal request URL — correct when no proxy)
|
|
11
|
+
*
|
|
12
|
+
* @param url The request URL (`new URL(request.url)` or `Astro.url`)
|
|
13
|
+
* @param config The Dineway config (from `locals.dineway?.config`)
|
|
14
|
+
* @returns Origin string, e.g. `"https://mysite.example.com"`
|
|
15
|
+
*/
|
|
16
|
+
declare function getPublicOrigin(url: URL, config?: DinewayConfig): string;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getPublicOrigin as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-B-tbV751.mjs";
|
|
2
2
|
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-CVssduLe.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as encodeCursor } from "./types-DfuD0Afl.mjs";
|
|
4
4
|
import { getRequestContext } from "./request-context.mjs";
|
|
5
|
-
import { r as requestCached } from "./request-cache-
|
|
6
|
-
import { a as isMissingTableError, t as CURSOR_RAW_VALUES } from "./loader-
|
|
5
|
+
import { r as requestCached } from "./request-cache-CYMbwZc6.mjs";
|
|
6
|
+
import { a as isMissingTableError, o as takeLiveCollectionMeta, t as CURSOR_RAW_VALUES } from "./loader-tg63WSY2.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/visual-editing/editable.ts
|
|
9
9
|
/**
|
|
@@ -180,22 +180,29 @@ async function getDinewayCollection(type, filter) {
|
|
|
180
180
|
const { getLiveCollection } = await import("astro:content");
|
|
181
181
|
const requestedFetchLimit = bucketed.fetchFilter?.limit;
|
|
182
182
|
const liveLimit = requestedFetchLimit !== void 0 && requestedFetchLimit > 0 ? requestedFetchLimit + 1 : requestedFetchLimit;
|
|
183
|
-
const
|
|
183
|
+
const liveFilter = {
|
|
184
184
|
type,
|
|
185
185
|
status: bucketed.fetchFilter?.status,
|
|
186
186
|
limit: liveLimit,
|
|
187
187
|
cursor: bucketed.fetchFilter?.cursor,
|
|
188
188
|
where: bucketed.fetchFilter?.where,
|
|
189
|
+
q: bucketed.fetchFilter?.q,
|
|
190
|
+
searchColumns: bucketed.fetchFilter?.searchColumns,
|
|
189
191
|
orderBy: bucketed.fetchFilter?.orderBy,
|
|
190
192
|
locale: resolvedLocale
|
|
191
|
-
}
|
|
193
|
+
};
|
|
194
|
+
const result = await getLiveCollection(COLLECTION_NAME, liveFilter);
|
|
195
|
+
const meta = takeLiveCollectionMeta(liveFilter);
|
|
192
196
|
const { entries, error, cacheHint } = result;
|
|
193
197
|
const rawCursor = Object.getOwnPropertyDescriptor(result, "nextCursor")?.value;
|
|
194
|
-
const nextCursor = typeof rawCursor === "string" ? rawCursor :
|
|
198
|
+
const nextCursor = typeof rawCursor === "string" ? rawCursor : meta?.nextCursor;
|
|
199
|
+
const rawTotal = Object.getOwnPropertyDescriptor(result, "total")?.value;
|
|
200
|
+
const total = typeof rawTotal === "number" ? rawTotal : meta?.total;
|
|
195
201
|
if (error) return {
|
|
196
202
|
entries: [],
|
|
197
203
|
error,
|
|
198
|
-
cacheHint: {}
|
|
204
|
+
cacheHint: {},
|
|
205
|
+
total
|
|
199
206
|
};
|
|
200
207
|
const hasMore = requestedFetchLimit !== void 0 && requestedFetchLimit > 0 && entries.length > requestedFetchLimit;
|
|
201
208
|
const pageEntries = hasMore ? entries.slice(0, requestedFetchLimit) : entries;
|
|
@@ -209,10 +216,11 @@ async function getDinewayCollection(type, filter) {
|
|
|
209
216
|
edit: isEditMode ? createEditable(type, dbId, entryEditOptions(entry)) : createNoop()
|
|
210
217
|
};
|
|
211
218
|
});
|
|
212
|
-
await Promise.all([hydrateEntryBylines(type, entriesWithEdit), hydrateEntryTerms(type, entriesWithEdit)]);
|
|
219
|
+
await Promise.all([hydrateEntryBylines(type, entriesWithEdit), hydrateEntryTerms(type, entriesWithEdit, resolvedLocale)]);
|
|
213
220
|
return {
|
|
214
221
|
entries: entriesWithEdit,
|
|
215
222
|
nextCursor: pageNextCursor,
|
|
223
|
+
total,
|
|
216
224
|
cacheHint: cacheHint ?? {}
|
|
217
225
|
};
|
|
218
226
|
});
|
|
@@ -285,6 +293,8 @@ function collectionCacheKey(type, filter, locale) {
|
|
|
285
293
|
filter?.limit ?? "",
|
|
286
294
|
filter?.cursor ?? "",
|
|
287
295
|
filter?.where ? stableStringify(filter.where) : "",
|
|
296
|
+
filter?.q ?? "",
|
|
297
|
+
filter?.searchColumns ? JSON.stringify(filter.searchColumns) : "",
|
|
288
298
|
filter?.orderBy ? JSON.stringify(filter.orderBy) : "",
|
|
289
299
|
locale ?? ""
|
|
290
300
|
].join("|")}`;
|
|
@@ -347,7 +357,8 @@ async function getDinewayEntry(type, id, options) {
|
|
|
347
357
|
const localeChain = requestedLocale && isI18nEnabled() ? getFallbackChain(requestedLocale) : [requestedLocale];
|
|
348
358
|
/** Return a successful EntryResult with runtime data hydrated */
|
|
349
359
|
async function successResult(wrapped, opts) {
|
|
350
|
-
|
|
360
|
+
const termLocale = isI18nEnabled() ? dataStr(entryData(wrapped), "locale") || void 0 : void 0;
|
|
361
|
+
await Promise.all([hydrateEntryBylines(type, [wrapped]), hydrateEntryTerms(type, [wrapped], termLocale)]);
|
|
351
362
|
return {
|
|
352
363
|
entry: wrapped,
|
|
353
364
|
isPreview: opts.isPreview,
|
|
@@ -446,7 +457,7 @@ async function getDinewayEntry(type, id, options) {
|
|
|
446
457
|
async function hydrateEntryBylines(type, entries) {
|
|
447
458
|
if (entries.length === 0) return;
|
|
448
459
|
try {
|
|
449
|
-
const { getBylinesForEntries } = await import("./bylines-
|
|
460
|
+
const { getBylinesForEntries } = await import("./bylines-DtxChhN_.mjs").then((n) => n.t);
|
|
450
461
|
const refs = entries.map((entry) => {
|
|
451
462
|
const data = entryData(entry);
|
|
452
463
|
const id = dataStr(data, "id");
|
|
@@ -474,13 +485,13 @@ async function hydrateEntryBylines(type, entries) {
|
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
487
|
}
|
|
477
|
-
async function hydrateEntryTerms(type, entries) {
|
|
488
|
+
async function hydrateEntryTerms(type, entries, locale) {
|
|
478
489
|
if (entries.length === 0) return;
|
|
479
490
|
try {
|
|
480
|
-
const { getAllTermsForEntries } = await import("./taxonomies-
|
|
491
|
+
const { getAllTermsForEntries } = await import("./taxonomies-CNOGeC-3.mjs").then((n) => n.l);
|
|
481
492
|
const ids = entries.map((entry) => dataStr(entryData(entry), "id")).filter(Boolean);
|
|
482
493
|
if (ids.length === 0) return;
|
|
483
|
-
const termsMap = await getAllTermsForEntries(type, ids);
|
|
494
|
+
const termsMap = await getAllTermsForEntries(type, ids, { locale });
|
|
484
495
|
for (const entry of entries) {
|
|
485
496
|
const data = entryData(entry);
|
|
486
497
|
const dbId = dataStr(data, "id");
|
|
@@ -511,9 +522,9 @@ async function hydrateEntryTerms(type, entries) {
|
|
|
511
522
|
*/
|
|
512
523
|
async function getTranslations(type, id) {
|
|
513
524
|
try {
|
|
514
|
-
const db = (await import("./loader-
|
|
525
|
+
const db = (await import("./loader-tg63WSY2.mjs").then((n) => n.i)).getDb;
|
|
515
526
|
const dbInstance = await db();
|
|
516
|
-
const { ContentRepository } = await import("./content-
|
|
527
|
+
const { ContentRepository } = await import("./content-QaryevFO.mjs").then((n) => n.n);
|
|
517
528
|
const repo = new ContentRepository(dbInstance);
|
|
518
529
|
const item = await repo.findByIdOrSlug(type, id);
|
|
519
530
|
if (!item) return {
|
|
@@ -580,8 +591,8 @@ async function resolveDinewayPath(path) {
|
|
|
580
591
|
const hasDbOverride = !!getRequestContext()?.db;
|
|
581
592
|
let patterns = !hasDbOverride ? cachedUrlPatterns : null;
|
|
582
593
|
if (!patterns) {
|
|
583
|
-
const { getDb } = await import("./loader-
|
|
584
|
-
const { SchemaRegistry } = await import("./registry-
|
|
594
|
+
const { getDb } = await import("./loader-tg63WSY2.mjs").then((n) => n.i);
|
|
595
|
+
const { SchemaRegistry } = await import("./registry-CTkbIDB9.mjs").then((n) => n.r);
|
|
585
596
|
patterns = (await new SchemaRegistry(await getDb()).listCollections()).filter((collection) => collection.urlPattern).map((collection) => {
|
|
586
597
|
const { regex, paramNames } = patternToRegex(collection.urlPattern);
|
|
587
598
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as requestCached } from "./request-cache-
|
|
2
|
-
import { n as SchemaRegistry } from "./registry-
|
|
3
|
-
import { r as getDb } from "./loader-
|
|
1
|
+
import { r as requestCached } from "./request-cache-CYMbwZc6.mjs";
|
|
2
|
+
import { n as SchemaRegistry } from "./registry-CTkbIDB9.mjs";
|
|
3
|
+
import { r as getDb } from "./loader-tg63WSY2.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/query.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as currentTimestampValue } from "./dialect-helpers-fk43GbDb.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-
|
|
2
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-DfuD0Afl.mjs";
|
|
3
|
+
import { i as matchPattern, n as interpolateDestination, r as isPattern, t as compilePattern } from "./patterns-r-0n824Y.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
5
5
|
import { ulid } from "ulidx";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as OptionsRepository } from "./options-
|
|
2
|
-
import { t as RedirectRepository } from "./redirect-
|
|
3
|
-
import { a as validateDestinationParams, i as matchPattern, n as interpolateDestination, o as validatePattern, r as isPattern, t as compilePattern } from "./patterns-
|
|
4
|
-
import { i as invalidateRedirectCache } from "./cache-
|
|
1
|
+
import { t as OptionsRepository } from "./options-BvJoSSJR.mjs";
|
|
2
|
+
import { t as RedirectRepository } from "./redirect-C2zXRj3c.mjs";
|
|
3
|
+
import { a as validateDestinationParams, i as matchPattern, n as interpolateDestination, o as validatePattern, r as isPattern, t as compilePattern } from "./patterns-r-0n824Y.mjs";
|
|
4
|
+
import { i as invalidateRedirectCache } from "./cache-DbKyr60Q.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/redirects/loops.ts
|
|
7
7
|
/**
|
|
@@ -129,12 +129,24 @@ const contentSeoInput = z.object({
|
|
|
129
129
|
canonical: httpUrl.nullish(),
|
|
130
130
|
noIndex: z.boolean().optional()
|
|
131
131
|
}).meta({ id: "ContentSeoInput" });
|
|
132
|
+
const contentDateBound = z.union([z.iso.datetime({
|
|
133
|
+
offset: true,
|
|
134
|
+
message: "must be an ISO 8601 datetime"
|
|
135
|
+
}), z.iso.date({ message: "must be an ISO 8601 date" })]).optional();
|
|
132
136
|
const contentListQuery = cursorPaginationQuery.extend({
|
|
133
137
|
status: z.string().optional(),
|
|
134
138
|
orderBy: z.string().optional(),
|
|
135
139
|
order: z.enum(["asc", "desc"]).optional(),
|
|
136
140
|
locale: localeCode.optional(),
|
|
137
|
-
q: z.string().trim().min(1).max(200).optional()
|
|
141
|
+
q: z.string().trim().min(1).max(200).optional(),
|
|
142
|
+
authorId: z.string().min(1).max(64).optional(),
|
|
143
|
+
dateField: z.enum([
|
|
144
|
+
"createdAt",
|
|
145
|
+
"updatedAt",
|
|
146
|
+
"publishedAt"
|
|
147
|
+
]).optional(),
|
|
148
|
+
dateFrom: contentDateBound,
|
|
149
|
+
dateTo: contentDateBound
|
|
138
150
|
}).meta({ id: "ContentListQuery" });
|
|
139
151
|
const contentDateOverride = z.iso.datetime({
|
|
140
152
|
offset: true,
|
|
@@ -217,6 +229,13 @@ const contentListResponseSchema = z.object({
|
|
|
217
229
|
nextCursor: z.string().optional(),
|
|
218
230
|
total: z.number().int().nonnegative().optional()
|
|
219
231
|
}).meta({ id: "ContentListResponse" });
|
|
232
|
+
const contentAuthorSchema = z.object({
|
|
233
|
+
id: z.string(),
|
|
234
|
+
name: z.string().nullable(),
|
|
235
|
+
email: z.string(),
|
|
236
|
+
avatarUrl: z.string().nullable()
|
|
237
|
+
}).meta({ id: "ContentAuthor" });
|
|
238
|
+
const contentAuthorsResponseSchema = z.object({ items: z.array(contentAuthorSchema) }).meta({ id: "ContentAuthorsResponse" });
|
|
220
239
|
/** Trashed content item */
|
|
221
240
|
const trashedContentItemSchema = z.object({
|
|
222
241
|
id: z.string(),
|
|
@@ -379,7 +398,8 @@ const repeaterSubFieldSchema = z.object({
|
|
|
379
398
|
"integer",
|
|
380
399
|
"boolean",
|
|
381
400
|
"datetime",
|
|
382
|
-
"select"
|
|
401
|
+
"select",
|
|
402
|
+
"image"
|
|
383
403
|
]),
|
|
384
404
|
label: z.string().min(1),
|
|
385
405
|
required: z.boolean().optional(),
|
|
@@ -1098,4 +1118,4 @@ const notFoundSummarySchema = z.object({
|
|
|
1098
1118
|
const notFoundSummaryResponseSchema = z.object({ items: z.array(notFoundSummarySchema) }).meta({ id: "NotFoundSummaryResponse" });
|
|
1099
1119
|
|
|
1100
1120
|
//#endregion
|
|
1101
|
-
export { createMenuBody as $,
|
|
1121
|
+
export { createMenuBody as $, contentCreateBody as $t, searchRebuildBody as A, localeFilterQuery as An, fieldSchema as At, updateSectionBody as B, mediaConfirmResponseSchema as Bt, userDetailSchema as C, VALID_ROLE_LEVELS as Cn, collectionSchema as Ct, usersListQuery as D, deleteResponseSchema as Dn, fieldListResponseSchema as Dt, userUpdateBody as E, cursorPaginationQuery as En, createFieldBody as Et, siteSettingsSchema as F, updateCollectionBody as Ft, taxonomyListResponseSchema as G, mediaProviderListQuery as Gt, createTermBody as H, mediaItemSchema as Ht, createSectionBody as I, updateFieldBody as It, termResponseSchema as J, mediaUploadUrlBody as Jt, termGetResponseSchema as K, mediaResponseSchema as Kt, sectionListResponseSchema as L, DEFAULT_MAX_UPLOAD_SIZE as Lt, searchResultSchema as M, roleLevel as Mn, orphanedTableListResponseSchema as Mt, searchSuggestQuery as N, slugPattern as Nn, orphanedTableSchema as Nt, searchEnableBody as O, httpUrl as On, fieldReorderBody as Ot, settingsUpdateBody as P, successEnvelope as Pn, schemaExportQuery as Pt, updateTermBody as Q, contentCompareResponseSchema as Qt, sectionSchema as R, formatFileSize as Rt, allowedDomainUpdateBody as S, contentBylineInputSchema as Sn, collectionResponseSchema as St, userSchema as T, countResponseSchema as Tn, createCollectionBody as Tt, taxonomyDefSchema as U, mediaListQuery as Ut, createTaxonomyDefBody as V, mediaExistingResponseSchema as Vt, taxonomyDefTranslationsSchema as W, mediaListResponseSchema as Wt, termTranslationsSchema as X, contentAuthorSchema as Xt, termSchema as Y, mediaUploadUrlResponseSchema as Yt, termWithCountSchema as Z, contentAuthorsResponseSchema as Zt, widgetAreaSchema as _, bylineCreditSchema as _n, createCommentBody as _t, notFoundPruneBody as a, contentResponseSchema as an, menuTranslationsSchema as at, widgetSchema as b, bylineUpdateBody as bn, collectionGetQuery as bt, notFoundSummarySchema as c, contentSeoSchema as cn, updateMenuBody as ct, redirectsListQuery as d, contentTranslationsResponseSchema as dn, commentBulkBody as dt, contentItemSchema as en, createMenuItemBody as et, updateRedirectBody as f, contentTrashQuery as fn, commentBulkResponseSchema as ft, updateWidgetBody as g, bylineCreateBody as gn, commentStatusBody as gt, reorderWidgetsBody as h, trashedContentListResponseSchema as hn, commentSchema as ht, notFoundListResponseSchema as i, contentPublishBody as in, menuSchema as it, searchResponseSchema as j, offsetPaginationQuery as jn, orphanRegisterBody as jt, searchQuery as k, localeCode as kn, fieldResponseSchema as kt, redirectListResponseSchema as l, contentTermsBody as ln, updateMenuItemBody as lt, createWidgetBody as m, trashedContentItemSchema as mn, commentListQuery as mt, notFoundEntrySchema as n, contentListResponseSchema as nn, menuItemTypeEnum as nt, notFoundSummaryQuery as o, contentScheduleBody as on, menuWithItemsSchema as ot, createWidgetAreaBody as p, contentUpdateBody as pn, commentCountsResponseSchema as pt, termListResponseSchema as q, mediaUpdateBody as qt, notFoundListQuery as r, contentPreviewUrlBody as rn, menuListItemSchema as rt, notFoundSummaryResponseSchema as s, contentSeoInput as sn, reorderMenuItemsBody as st, createRedirectBody as t, contentListQuery as tn, menuItemSchema as tt, redirectSchema as u, contentTranslationSchema as un, adminCommentListResponseSchema as ut, widgetAreaWithWidgetsAndCountSchema as v, bylineListResponseSchema as vn, publicCommentListResponseSchema as vt, userListResponseSchema as w, apiErrorSchema as wn, collectionWithFieldsResponseSchema as wt, allowedDomainCreateBody as x, bylinesListQuery as xn, collectionListResponseSchema as xt, widgetAreaWithWidgetsSchema as y, bylineSummarySchema as yn, publicCommentSchema as yt, sectionsListQuery as z, mediaConfirmBody as zt };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-B-tbV751.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
|
-
import { i as currentTimestamp, l as listTablesLike, u as tableExists } from "./dialect-helpers-fk43GbDb.mjs";
|
|
3
|
+
import { i as currentTimestamp, l as listTablesLike, n as columnExists, u as tableExists } from "./dialect-helpers-fk43GbDb.mjs";
|
|
4
4
|
import { n as contentLocaleUpdatedIndexName, t as contentLocaleCreatedIndexName } from "./content-index-names-Bbu1FY1r.mjs";
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as FTSManager } from "./fts-manager-
|
|
5
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-C5zp2xir.mjs";
|
|
6
|
+
import { t as withTransaction } from "./transaction-CShMWIej.mjs";
|
|
7
|
+
import { a as RESERVED_COLLECTION_SLUGS, o as RESERVED_FIELD_SLUGS, r as FIELD_TYPE_TO_COLUMN } from "./types-BO8TGjS8.mjs";
|
|
8
|
+
import { t as FTSManager } from "./fts-manager-CIZlScg5.mjs";
|
|
9
9
|
import { sql } from "kysely";
|
|
10
10
|
import { ulid } from "ulidx";
|
|
11
11
|
|
|
@@ -290,6 +290,38 @@ var SchemaRegistry = class {
|
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
|
+
* Ensure the content table for an existing collection exists.
|
|
294
|
+
*
|
|
295
|
+
* This repairs interrupted schema creation where the metadata row exists but
|
|
296
|
+
* the physical `ec_*` table was not created.
|
|
297
|
+
*/
|
|
298
|
+
async ensureCollectionContentTable(collectionSlug) {
|
|
299
|
+
if (!await this.getCollection(collectionSlug)) throw new SchemaError(`Collection "${collectionSlug}" not found`, "COLLECTION_NOT_FOUND");
|
|
300
|
+
const tableName = this.getTableName(collectionSlug);
|
|
301
|
+
if (await tableExists(this.db, tableName)) return false;
|
|
302
|
+
await this.createContentTable(collectionSlug);
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Ensure the physical column for an existing field exists on its content table.
|
|
307
|
+
*
|
|
308
|
+
* This repairs interrupted field creation where `_dineway_fields` was written
|
|
309
|
+
* but `ALTER TABLE ec_* ADD COLUMN` did not complete.
|
|
310
|
+
*/
|
|
311
|
+
async ensureFieldColumn(collectionSlug, fieldSlug) {
|
|
312
|
+
const field = await this.getField(collectionSlug, fieldSlug);
|
|
313
|
+
if (!field) throw new SchemaError(`Field "${fieldSlug}" not found in collection "${collectionSlug}"`, "FIELD_NOT_FOUND");
|
|
314
|
+
await this.ensureCollectionContentTable(collectionSlug);
|
|
315
|
+
const tableName = this.getTableName(collectionSlug);
|
|
316
|
+
const columnName = this.getColumnName(fieldSlug);
|
|
317
|
+
if (await columnExists(this.db, tableName, columnName)) return false;
|
|
318
|
+
await this.addColumn(collectionSlug, fieldSlug, field.type, {
|
|
319
|
+
required: field.required,
|
|
320
|
+
defaultValue: field.defaultValue
|
|
321
|
+
});
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
293
325
|
* Update a field
|
|
294
326
|
*/
|
|
295
327
|
async updateField(collectionSlug, fieldSlug, input) {
|