ghost 6.44.0 → 6.44.1
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/core/boot.js +9 -13
- package/core/bridge.js +6 -10
- package/core/built/admin/assets/{PolarAngleAxis-eFuSrR7S.js → PolarAngleAxis-DWP6qq-Z.js} +2 -2
- package/core/built/admin/assets/{_baseAssignValue-XVHfKew7.js → _baseAssignValue-N9f4o_XK.js} +1 -1
- package/core/built/admin/assets/{a-large-small-DOzPDzKp.js → a-large-small-BOAtcFiE.js} +1 -1
- package/core/built/admin/assets/{account-migration-Cx45M5qm.js → account-migration-CtZx_5ib.js} +1 -1
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{code-editor-view-Bi8Orhyj.mjs → code-editor-view-BMovCjer.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-1_V9g9Pt.mjs → index-BT1n-g2b.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-e9saYQJa.mjs → index-BnowNBGd.mjs} +5 -5
- package/core/built/admin/assets/admin-x-settings/{index-CnvQi01U.mjs → index-CRpK6gF8.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-BmU6BOfy.mjs → index-CfXS3AZ8.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-EuMiBt6I.mjs → index-Cs8zML6u.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-B43MPc5u.mjs → index-DmpwO1w3.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-DOgG0XZa.mjs → index-DwFIdhcR.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-CWdxMIcZ.mjs → index-sNyPiIJA.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-Ojg_pBvq.mjs → index-xTILut54.mjs} +1259 -1259
- package/core/built/admin/assets/admin-x-settings/{modals-Ckbx9UQF.mjs → modals-Cm5t13os.mjs} +9 -9
- package/core/built/admin/assets/{arrow-right-DckEQtp9.js → arrow-right-BxdHN_En.js} +1 -1
- package/core/built/admin/assets/{at-sign-BChf68aS.js → at-sign-Cajf-dOf.js} +1 -1
- package/core/built/admin/assets/{audience-BYU5Bd7D.js → audience-CHNb9mCT.js} +1 -1
- package/core/built/admin/assets/{automated-email-design-Z26Qit0_.js → automated-email-design-B9C9mKUS.js} +2 -2
- package/core/built/admin/assets/{automated-emails-aBicreLv.js → automated-emails-DhLhkq8L.js} +1 -1
- package/core/built/admin/assets/{automations-vpH-d72N.js → automations-6-cgZovk.js} +1 -1
- package/core/built/admin/assets/{automations-Ddo22yPk.js → automations-CxJ-N_YK.js} +1 -1
- package/core/built/admin/assets/{avatar-flipboard-CoI3LQ-o.js → avatar-flipboard-f5nSMmek.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-iVDkCMKN.js → bluesky-sharing-Dm2k8qZH.js} +1 -1
- package/core/built/admin/assets/{chart-CjM1VQqH.js → chart-BbJnjWey.js} +23 -23
- package/core/built/admin/assets/{checkbox-CC5kd_Kf.js → checkbox-CT7DNFAI.js} +1 -1
- package/core/built/admin/assets/{chevron-up-D__wzyXT.js → chevron-up-BxijmTT9.js} +1 -1
- package/core/built/admin/assets/{chunk.696.79505fa556d329d6e824.js → chunk.167.37bb0d7f6ac67fefa679.js} +3184 -3523
- package/core/built/admin/assets/{chunk.696.79505fa556d329d6e824.js.LICENSE.txt → chunk.167.37bb0d7f6ac67fefa679.js.LICENSE.txt} +1 -1
- package/core/built/admin/assets/{chunk.524.1ff649a6cc62dc38f538.js → chunk.524.ed812b62217210a913d4.js} +5 -5
- package/core/built/admin/assets/{chunk.582.408a40e0095e479e3d11.js → chunk.582.7db5c9f17bca5a484049.js} +6 -6
- package/core/built/admin/assets/{chunk.945.835812fcb16029abd7f9.js → chunk.834.f9db7c62b9457db93e8c.js} +3 -3
- package/core/built/admin/assets/{code-editor-view-C735d5EA.js → code-editor-view-D8slE0IA.js} +1 -1
- package/core/built/admin/assets/{comments-DgFPax3Y.js → comments-BvfR-fA8.js} +1 -1
- package/core/built/admin/assets/{content-helpers-DjugSfvm.js → content-helpers-DUWGLvgL.js} +1 -1
- package/core/built/admin/assets/{copy-D9JONGcK.js → copy-ht18t5gu.js} +1 -1
- package/core/built/admin/assets/{data-list-QWLEHG4y.js → data-list-Daha2dIs.js} +1 -1
- package/core/built/admin/assets/{deleted-feed-item-CwSCflTW.js → deleted-feed-item-ChP5bwgi.js} +1 -1
- package/core/built/admin/assets/{dropzone-lK_4vpWS.js → dropzone-h_qyk514.js} +1 -1
- package/core/built/admin/assets/{edit-profile-BmioJZHv.js → edit-profile-BT8RQpAG.js} +1 -1
- package/core/built/admin/assets/editor-s1mqd9_o.js +8 -0
- package/core/built/admin/assets/{empty-indicator-Dg64lT_g.js → empty-indicator-BIUvv6JE.js} +1 -1
- package/core/built/admin/assets/{en-DCwBNJ98.js → en-BEcDl42w.js} +1 -1
- package/core/built/admin/assets/{eye-psLxWnjO.js → eye-TPnIdamu.js} +1 -1
- package/core/built/admin/assets/{feed-TUcCSZHL.js → feed-BK3qvLWi.js} +1 -1
- package/core/built/admin/assets/{field-Uk8NOvtc.js → field-CSFsrvVy.js} +1 -1
- package/core/built/admin/assets/{filter-query-core-CbH_VKcG.js → filter-query-core-R8cQCO2w.js} +1 -1
- package/core/built/admin/assets/{filters-DmawZ5Uu.js → filters-Cp1voB1e.js} +1 -1
- package/core/built/admin/assets/gh-chart-BFsyOJD_.js +1 -0
- package/core/built/admin/assets/{ghost-2baa7ddc3630015f41c0efd13bd586b8.js → ghost-1881362e8a92dae1e3333a0484c173a3.js} +7 -6
- package/core/built/admin/assets/{growth-BAl-TyMy.js → growth-DIigOxF1.js} +1 -1
- package/core/built/admin/assets/{hash-Q1ou0OMZ.js → hash-B3iFVeCl.js} +1 -1
- package/core/built/admin/assets/{inbox-BAOtR6tN.js → inbox-2bPMLikt.js} +1 -1
- package/core/built/admin/assets/{index-BnJp51QE.js → index-52qUC8yv.js} +5 -5
- package/core/built/admin/assets/{index-BDIwushG.js → index-9j01Aj_X.js} +1 -1
- package/core/built/admin/assets/index-B9UVpmey.js +1 -0
- package/core/built/admin/assets/{index-DTeOW3Se.js → index-BXc5OF6x.js} +1 -1
- package/core/built/admin/assets/{index-Duc21aJ7.js → index-BaGL3IFe.js} +1 -1
- package/core/built/admin/assets/{index-DKC8uXHk.js → index-BdozZbt2.js} +2 -2
- package/core/built/admin/assets/{index-z951kI4K.js → index-Bgpz7M7i.js} +1 -1
- package/core/built/admin/assets/{index-BfSvX9is.js → index-Bp4O7TVf.js} +1 -1
- package/core/built/admin/assets/{index-C5S08C6P.js → index-BuqUmpe9.js} +1 -1
- package/core/built/admin/assets/{index-D7OtVnbo.js → index-CEF_Ofn0.js} +1 -1
- package/core/built/admin/assets/{index-Bs6rUYFS.js → index-CgSVv5Up.js} +58 -58
- package/core/built/admin/assets/{index-Ro9qXetv.js → index-Cr6x2czK.js} +1 -1
- package/core/built/admin/assets/{index-DJbgQjV6.js → index-CrbZj3Ju.js} +1 -1
- package/core/built/admin/assets/{index-BTBcWw_z.js → index-CrlAPDdD.js} +2 -2
- package/core/built/admin/assets/{index-B6SD2Qs-.js → index-CtrmMGWT.js} +1 -1
- package/core/built/admin/assets/{index-Bw0oyOFd.js → index-D-V_DAdt.js} +1 -1
- package/core/built/admin/assets/{index-DAJduTBl.js → index-D0poOSjw.js} +4 -4
- package/core/built/admin/assets/{index-CGT3W8fi.js → index-DWVGCPEC.js} +3 -3
- package/core/built/admin/assets/index-Dozbr_4s.css +1 -0
- package/core/built/admin/assets/{index-FyplpnYQ.js → index-S3Ai3lDy.js} +1 -1
- package/core/built/admin/assets/{index-DLr8D_Ks.js → index-VDhA5kgU.js} +1 -1
- package/core/built/admin/assets/{index-DRA1fORQ.js → index-fnIFqFMt.js} +1 -1
- package/core/built/admin/assets/{index-BhWQZObu.js → index-kA3UcdW7.js} +1 -1
- package/core/built/admin/assets/{input-group-DH32syTz.js → input-group-Fdl0S6pw.js} +1 -1
- package/core/built/admin/assets/{koenig-lexical-CxVcbgsH.js → koenig-lexical-REiYtzGD.js} +1 -1
- package/core/built/admin/assets/{kpi-card-DBWHDi3l.js → kpi-card-BS8vEj4c.js} +1 -1
- package/core/built/admin/assets/{kpi-card-BYhzWV5F.js → kpi-card-D3HEfOCP.js} +1 -1
- package/core/built/admin/assets/{kpi-tabs-Kxc-utyg.js → kpi-tabs-8vaI7yWq.js} +1 -1
- package/core/built/admin/assets/kpis-CkD0Xteg.js +1 -0
- package/core/built/admin/assets/label-DT38Gd2T.js +1 -0
- package/core/built/admin/assets/{links-Cg8O8ZGP.js → links-BK-azjCL.js} +1 -1
- package/core/built/admin/assets/{list-page-D2KCBsiy.js → list-page-DVpac3lc.js} +1 -1
- package/core/built/admin/assets/{loader-circle-nmLqhMZL.js → loader-circle-CIq5Cv-9.js} +1 -1
- package/core/built/admin/assets/{mail-D7cxYMd5.js → mail-gdeIU06V.js} +1 -1
- package/core/built/admin/assets/{main-layout-BXdUkeCo.js → main-layout-B2t-RiNE.js} +1 -1
- package/core/built/admin/assets/members-7z-tESWd.js +10 -0
- package/core/built/admin/assets/minus-BbGfVkll.js +1 -0
- package/core/built/admin/assets/{modals-VRvX8mK0.js → modals-DVIfijEz.js} +3 -3
- package/core/built/admin/assets/{moderation-DkT8qVJs.js → moderation-DwzDOhih.js} +1 -1
- package/core/built/admin/assets/{newsletter-sUT4ciRJ.js → newsletter-D1N8bUfp.js} +1 -1
- package/core/built/admin/assets/{newsletters-BNvAF2Oi.js → newsletters-7GSeQdQe.js} +1 -1
- package/core/built/admin/assets/{note-B0JhJv7s.js → note-Bn1-ZWDE.js} +1 -1
- package/core/built/admin/assets/offers-BsuLKYy9.js +1 -0
- package/core/built/admin/assets/{onboarding-route-IrO_SCb3.js → onboarding-route-C73r9kyO.js} +1 -1
- package/core/built/admin/assets/{overview-C2nk_B6i.js → overview-6U5p38zx.js} +1 -1
- package/core/built/admin/assets/{pagemenu-BGhty1iq.js → pagemenu-DrueoEX9.js} +1 -1
- package/core/built/admin/assets/{pencil-DiA3J4m5.js → pencil-Csnv8udS.js} +1 -1
- package/core/built/admin/assets/{pin-off-HWos3YHh.js → pin-off-BDeHGsSQ.js} +1 -1
- package/core/built/admin/assets/{post-analytics-context-BJwP-XAB.js → post-analytics-context-jKeUh2Ka.js} +1 -1
- package/core/built/admin/assets/{post-analytics-header-CZF5QmAD.js → post-analytics-header-C5QLn6Lm.js} +1 -1
- package/core/built/admin/assets/{post-analytics-DBUHbt1b.js → post-analytics-ngMqqbt9.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-Bb8R05dH.js → post-share-modal-04B7JT4R.js} +1 -1
- package/core/built/admin/assets/posts/{alert-dialog-mmQvJUHQ.mjs → alert-dialog-CYvHtOQ5.mjs} +4 -4
- package/core/built/admin/assets/posts/{app-utils-CD0bhOLs.mjs → app-utils-Cs-8qje1.mjs} +3 -3
- package/core/built/admin/assets/posts/{automations-BL0WaXHA.mjs → automations-DE2rwx-Z.mjs} +25 -25
- package/core/built/admin/assets/posts/{automations-BmGKngyG.mjs → automations-Dq0_cprS.mjs} +4 -4
- package/core/built/admin/assets/posts/{avatar-CeJ0Zq_A.mjs → avatar-Dt_bGEgl.mjs} +7 -7
- package/core/built/admin/assets/posts/{button-CQCNdxY6.mjs → button-DO7JrPsL.mjs} +2 -2
- package/core/built/admin/assets/posts/{chevron-up-DaikhWC2.mjs → chevron-up-B8WyJjCr.mjs} +3 -3
- package/core/built/admin/assets/posts/{comments-DUSJ25vf.mjs → comments-B3-RpqJU.mjs} +1933 -1905
- package/core/built/admin/assets/posts/{data-list-BiiYXQes.mjs → data-list-BiZFP6Co.mjs} +5 -5
- package/core/built/admin/assets/posts/{dialog-DRN6olky.mjs → dialog-Bvl2PD8s.mjs} +3 -3
- package/core/built/admin/assets/posts/{editor-DN_Zz0m2.mjs → editor-BCtdAD74.mjs} +3230 -3130
- package/core/built/admin/assets/posts/{ellipsis-BIs4PL5-.mjs → ellipsis-B5H7Hudx.mjs} +2 -2
- package/core/built/admin/assets/posts/{empty-indicator-Wiukrx4T.mjs → empty-indicator-BRoAf6Jv.mjs} +2 -2
- package/core/built/admin/assets/posts/{filters-CJl5ebXd.mjs → filters-CffYQY_8.mjs} +12 -12
- package/core/built/admin/assets/posts/{get-site-timezone-JepxGwVr.mjs → get-site-timezone-CSrPVUfX.mjs} +2 -2
- package/core/built/admin/assets/posts/{growth-cNlqbz-x.mjs → growth--LVGRPtS.mjs} +13 -13
- package/core/built/admin/assets/posts/{heading-C_V6Ckxx.mjs → heading-BRQEP7IA.mjs} +2 -2
- package/core/built/admin/assets/posts/{heart-BMBWsLs2.mjs → heart-CC2f1qWb.mjs} +2 -2
- package/core/built/admin/assets/posts/{hooks-D4pJ_p_P.mjs → hooks-J2WpDj1d.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-DzWTmJMy.mjs → index-D-vhKzUJ.mjs} +3 -3
- package/core/built/admin/assets/posts/{index-CDwlVw9E.mjs → index-LnPyGojr.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-BuIZkUhD.mjs → index-nxfIbREV.mjs} +11 -11
- package/core/built/admin/assets/posts/{input-DUvSHOFz.mjs → input-DTtfruk_.mjs} +3 -3
- package/core/built/admin/assets/posts/{input-surface-CO8-j6V2.mjs → input-surface-DXTGCuo2.mjs} +2 -2
- package/core/built/admin/assets/posts/{koenig-lexical-cRm7bY-6.mjs → koenig-lexical-CNcifuT7.mjs} +2 -2
- package/core/built/admin/assets/posts/{kpis-BXukzbg6.mjs → kpis-n8L4BlMi.mjs} +5843 -5854
- package/core/built/admin/assets/posts/{label-TTt0QyDb.mjs → label-yl8B8ADj.mjs} +6 -6
- package/core/built/admin/assets/posts/{links-BAXELE82.mjs → links-DDApMJfk.mjs} +4 -4
- package/core/built/admin/assets/posts/{list-page-DQIiFvFP.mjs → list-page-BJJ9amzJ.mjs} +4 -4
- package/core/built/admin/assets/posts/{loading-indicator-BsY7eGY6.mjs → loading-indicator-CQBDNvdo.mjs} +3 -3
- package/core/built/admin/assets/posts/{mail-Bi1gt3MU.mjs → mail-BHg0SvNu.mjs} +2 -2
- package/core/built/admin/assets/posts/{main-layout-DejRuxP8.mjs → main-layout-DXveCJ5W.mjs} +2 -2
- package/core/built/admin/assets/posts/{newsletter-PCUtHW6Z.mjs → newsletter-DUpVmnKN.mjs} +19 -19
- package/core/built/admin/assets/posts/{overview-f4eDWazr.mjs → overview-sv6i-2h9.mjs} +18 -18
- package/core/built/admin/assets/posts/{pencil-DDnfXQqn.mjs → pencil-DsGDLJp6.mjs} +2 -2
- package/core/built/admin/assets/posts/{plus-DW3bG6ui.mjs → plus-DjZ_REvJ.mjs} +2 -2
- package/core/built/admin/assets/posts/{popover-Du2NcggM.mjs → popover-2PA9zdiD.mjs} +4 -4
- package/core/built/admin/assets/posts/{post-analytics-BmnHyWJq.mjs → post-analytics-CKHoiJFY.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-context-0fieM91Y.mjs → post-analytics-context-D17CB7nm.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-header-Bxi56AWV.mjs → post-analytics-header-aQLnrdWi.mjs} +12 -12
- package/core/built/admin/assets/posts/{post-share-modal-DiuT4GFO.mjs → post-share-modal-C8-8CZw8.mjs} +6 -6
- package/core/built/admin/assets/posts/{posts-CYjfxmgX.mjs → posts-BA2vu_T2.mjs} +2 -2
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/posts/{search-Dz7F6ifc.mjs → search-Bx6BvCRk.mjs} +2 -2
- package/core/built/admin/assets/posts/{select-FX6QYAFU.mjs → select-QOJ2OvL0.mjs} +7 -7
- package/core/built/admin/assets/posts/{separator-C7QPCSjM.mjs → separator-CHtBa4OX.mjs} +3 -3
- package/core/built/admin/assets/posts/{settings-DJqx19W1.mjs → settings-CxhTCxXg.mjs} +2 -2
- package/core/built/admin/assets/posts/{sheet-wg_8-w45.mjs → sheet-DO5nhiru.mjs} +4 -4
- package/core/built/admin/assets/posts/{site-Bxv-L5Dn.mjs → site-6g4pKVnR.mjs} +2 -2
- package/core/built/admin/assets/posts/{skeleton-DrFcKwP3.mjs → skeleton-DgWx-52p.mjs} +3 -3
- package/core/built/admin/assets/posts/{source-icon-DD_bmIqg.mjs → source-icon-_zLbYeab.mjs} +4 -4
- package/core/built/admin/assets/posts/{stats-DkOg80Vt.mjs → stats-BGJFxx5f.mjs} +4 -4
- package/core/built/admin/assets/posts/{switch-DZFGAF_Y.mjs → switch-Djipx7gc.mjs} +5 -5
- package/core/built/admin/assets/posts/{table-CZCVviNy.mjs → table-DpDCE80J.mjs} +2 -2
- package/core/built/admin/assets/posts/{tabs-1fkhM4p8.mjs → tabs-CLWGiyQ4.mjs} +4 -4
- package/core/built/admin/assets/posts/{tags-CkyGqwqi.mjs → tags-B4KIn7er.mjs} +2 -2
- package/core/built/admin/assets/posts/{tags-BAmugIR1.mjs → tags-Dn1L_Z_4.mjs} +16 -16
- package/core/built/admin/assets/posts/{toggle-group-B_ubMZvo.mjs → toggle-group-DMMjXGB3.mjs} +4 -4
- package/core/built/admin/assets/posts/{tooltip-D1X0uVas.mjs → tooltip-DlCjZwmt.mjs} +5 -5
- package/core/built/admin/assets/posts/{underline-CV8OJ7qc.mjs → underline-WN3ZSFyI.mjs} +2 -2
- package/core/built/admin/assets/posts/{value-DhEK7_uT.mjs → value-BWiEmo45.mjs} +2 -2
- package/core/built/admin/assets/posts/{virtual-list-window-DqbQUkIo.mjs → virtual-list-window-F3Tvi9H5.mjs} +3 -3
- package/core/built/admin/assets/posts/{web-5jcYGeBz.mjs → web-C8PxkHvH.mjs} +18 -18
- package/core/built/admin/assets/posts/{x-Cl72IwQm.mjs → x-BdlZ3sG3.mjs} +2 -2
- package/core/built/admin/assets/posts/{zap-BPDyHF1u.mjs → zap-BuAk2C7n.mjs} +33 -21
- package/core/built/admin/assets/{posts-D6K0FKB9.js → posts-bRma2Aji.js} +1 -1
- package/core/built/admin/assets/power-B4VCYMPn.js +1 -0
- package/core/built/admin/assets/{referrers-C9UK_aF_.js → referrers-BgXy4ZDF.js} +1 -1
- package/core/built/admin/assets/{repeat-BwgUDBQn.js → repeat-BElPLZnh.js} +1 -1
- package/core/built/admin/assets/{reply-DbknkQhJ.js → reply-qlUFZ_G8.js} +1 -1
- package/core/built/admin/assets/{rocket-1EqU2MzS.js → rocket-CXYckFbm.js} +1 -1
- package/core/built/admin/assets/{select-BGJXWb8i.js → select-MGAxyhXP.js} +1 -1
- package/core/built/admin/assets/{send-_CqvCQBY.js → send-DcU5LcPI.js} +1 -1
- package/core/built/admin/assets/{settings-Bnep890F.js → settings-DGSAz4oa.js} +4 -4
- package/core/built/admin/assets/{settings-Ct244PHl.js → settings-DI95fXs5.js} +1 -1
- package/core/built/admin/assets/{share-modal-B8pN_3tk.js → share-modal-CsNAIPeN.js} +1 -1
- package/core/built/admin/assets/{sort-button-EXsVVSdw.js → sort-button-wV9PBd2P.js} +1 -1
- package/core/built/admin/assets/{source-icon-XMs0toB0.js → source-icon-CYt4X1-M.js} +1 -1
- package/core/built/admin/assets/{sprout-uA_pVmDr.js → sprout-5QqpAoO8.js} +1 -1
- package/core/built/admin/assets/{square-atKnWQyw.js → square-YHeYyKG9.js} +1 -1
- package/core/built/admin/assets/{stats-CPNnZGD9.js → stats-PD64opSw.js} +1 -1
- package/core/built/admin/assets/{stats-view-BP8LU5rf.js → stats-view-C4fnD3uG.js} +1 -1
- package/core/built/admin/assets/{step-1-FHeGC4GW.js → step-1-BqeM_LxC.js} +1 -1
- package/core/built/admin/assets/{step-2-BFhgD2N8.js → step-2-C7AcokE9.js} +1 -1
- package/core/built/admin/assets/{step-3-BZMKjY5n.js → step-3-9Z0qkfpM.js} +2 -2
- package/core/built/admin/assets/{table-kGA62bBZ.js → table-C8Mxw8fs.js} +1 -1
- package/core/built/admin/assets/{tabs-Dl3BXr4Z.js → tabs-2KXMNRG-.js} +1 -1
- package/core/built/admin/assets/{tags-CLhASxwZ.js → tags-Cx-Jx8Yb.js} +1 -1
- package/core/built/admin/assets/{tags-D-W0kJMe.js → tags-cn7wgGit.js} +1 -1
- package/core/built/admin/assets/{textarea-DMub6CsU.js → textarea-dKwIcAK5.js} +1 -1
- package/core/built/admin/assets/{thumbs-up-DZu4SX5N.js → thumbs-up-gzGza05L.js} +1 -1
- package/core/built/admin/assets/{tiers-2bg8BCFj.js → tiers-D--LgD9v.js} +1 -1
- package/core/built/admin/assets/{toggle-group-ByS0KZ3G.js → toggle-group-C8KbiBQS.js} +1 -1
- package/core/built/admin/assets/{topic-filter-oRqwlePZ.js → topic-filter--VQn4A7D.js} +1 -1
- package/core/built/admin/assets/{trash-BHoSD8mS.js → trash-CnBwlhjN.js} +1 -1
- package/core/built/admin/assets/{underline-1YSgOpPm.js → underline-B2FjHOE0.js} +1 -1
- package/core/built/admin/assets/{undo-2-BwYMlB8G.js → undo-2-fUPuO2Zt.js} +1 -1
- package/core/built/admin/assets/{upload-BDz0_o9b.js → upload-BPOrFdtp.js} +1 -1
- package/core/built/admin/assets/{use-growth-stats-PRVcCUT7.js → use-growth-stats-By0ZDqFi.js} +1 -1
- package/core/built/admin/assets/{use-pintura-config-CROsgSEd.js → use-pintura-config-0ykvCF7U.js} +1 -1
- package/core/built/admin/assets/{use-simple-pagination-CBjKBNNI.js → use-simple-pagination-TruuCHV6.js} +1 -1
- package/core/built/admin/assets/{user-round-check-DKooQiV7.js → user-round-check-C1Vahz0b.js} +1 -1
- package/core/built/admin/assets/{user-round-x-B94nAYJb.js → user-round-x-CzKFo5GY.js} +1 -1
- package/core/built/admin/assets/{virtual-list-window-Cf_vCQFb.js → virtual-list-window-BWEknk_A.js} +1 -1
- package/core/built/admin/assets/{wallet-cards-BorRQari.js → wallet-cards-CRHrrjiy.js} +1 -1
- package/core/built/admin/assets/{web-BVHy-80k.js → web-C2H0oAut.js} +1 -1
- package/core/built/admin/index.html +7 -7
- package/core/frontend/services/llms/service.js +37 -10
- package/core/frontend/services/routing/config.js +5 -3
- package/core/frontend/services/routing/config.ts +59 -0
- package/core/frontend/services/sitemap/handler.js +2 -14
- package/core/frontend/services/sitemap/site-map-manager.js +9 -214
- package/core/server/api/endpoints/comment-replies.js +1 -2
- package/core/server/api/endpoints/members.js +4 -1
- package/core/server/api/endpoints/search-index-public.js +12 -1
- package/core/server/api/endpoints/search-index.js +13 -2
- package/core/server/lib/bootstrap-socket.js +31 -36
- package/core/server/lib/bootstrap-socket.ts +114 -0
- package/core/server/lib/common/to-plain.js +9 -21
- package/core/server/lib/common/to-plain.ts +25 -0
- package/core/server/models/role-utils.js +5 -7
- package/core/server/models/role-utils.ts +56 -0
- package/core/server/services/adapter-manager/adapter-manager.js +5 -1
- package/core/server/services/audience-feedback/audience-feedback-service.js +1 -1
- package/core/server/services/automations/automations-api.js +37 -2
- package/core/server/services/automations/automations-api.ts +43 -2
- package/core/server/services/comments/comments-controller.js +87 -55
- package/core/server/services/comments/comments-service-emails.js +1 -1
- package/core/server/services/comments/comments-service.js +249 -79
- package/core/server/services/mail/templates/notification.html +157 -0
- package/core/server/services/member-attribution/url-translator.js +1 -1
- package/core/server/services/members/members-api/services/token-service.js +21 -2
- package/core/server/services/notifications/notification-email.js +38 -0
- package/core/server/services/notifications/notification-email.ts +66 -0
- package/core/server/services/notifications/sanitize-email-html.js +37 -0
- package/core/server/services/notifications/sanitize-email-html.ts +35 -0
- package/core/server/services/route-settings/route-settings.js +2 -18
- package/core/server/services/route-settings/validate.js +2 -1
- package/core/server/services/update-check/index.js +10 -3
- package/core/server/services/update-check/update-check-service.js +18 -25
- package/core/server/services/url/index.js +1 -16
- package/core/shared/config/defaults.json +0 -1
- package/package.json +2 -1
- package/pnpm-lock.yaml +11 -1
- package/pnpm-workspace.yaml +2 -0
- package/core/built/admin/assets/editor-G3BxjP48.js +0 -8
- package/core/built/admin/assets/gh-chart-vpcpdiS9.js +0 -1
- package/core/built/admin/assets/index-BP5ial3p.js +0 -1
- package/core/built/admin/assets/index-Bd9VZ28k.css +0 -1
- package/core/built/admin/assets/kpis-B8pv3wne.js +0 -1
- package/core/built/admin/assets/label-BjHICZC1.js +0 -1
- package/core/built/admin/assets/members-DcuuSs_v.js +0 -10
- package/core/built/admin/assets/minus-Dv51QEND.js +0 -1
- package/core/built/admin/assets/offers-DKZ0qsmb.js +0 -1
- package/core/built/admin/assets/power-D5QO6MjY.js +0 -1
- package/core/server/services/url/lazy-find-resource.js +0 -49
- package/core/server/services/url/lazy-find-resource.ts +0 -62
- package/core/server/services/url/lazy-url-service.js +0 -262
- package/core/server/services/url/lazy-url-service.ts +0 -308
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkUserPermissionsForRole = checkUserPermissionsForRole;
|
|
4
|
+
exports.setIsRoles = setIsRoles;
|
|
1
5
|
// check if the user has an assigned role
|
|
2
6
|
// so that we can stop writing this everywhere:
|
|
3
7
|
//_.some(loadedPermissions.user.roles, {name: 'Administrator'})
|
|
4
|
-
|
|
5
8
|
function checkUserPermissionsForRole(loadedPermissions, roleName) {
|
|
6
9
|
if (!loadedPermissions?.user?.roles) {
|
|
7
10
|
return false;
|
|
8
11
|
}
|
|
9
|
-
|
|
10
12
|
return loadedPermissions.user.roles.some(role => role.name === roleName);
|
|
11
13
|
}
|
|
12
|
-
|
|
13
14
|
function setIsRoles(loadedPermissions) {
|
|
14
15
|
// utility function to parse the permissions object and set up all the "is" variables.
|
|
15
|
-
|
|
16
|
+
const resultsObject = {
|
|
16
17
|
isOwner: false,
|
|
17
18
|
isAdmin: false,
|
|
18
19
|
isEditor: false,
|
|
@@ -33,6 +34,3 @@ function setIsRoles(loadedPermissions) {
|
|
|
33
34
|
resultsObject.isEitherEditor = resultsObject.isEditor || resultsObject.isSuperEditor;
|
|
34
35
|
return resultsObject;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
exports.setIsRoles = setIsRoles;
|
|
38
|
-
exports.checkUserPermissionsForRole = checkUserPermissionsForRole;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type {ReadonlyDeep} from 'type-fest';
|
|
2
|
+
|
|
3
|
+
type LoadedPermissionsWithRoles = ReadonlyDeep<{
|
|
4
|
+
user?: {
|
|
5
|
+
roles?: Array<{name: string}>;
|
|
6
|
+
} | null;
|
|
7
|
+
}>;
|
|
8
|
+
|
|
9
|
+
type RoleFlags = {
|
|
10
|
+
isOwner: boolean;
|
|
11
|
+
isAdmin: boolean;
|
|
12
|
+
isEditor: boolean;
|
|
13
|
+
isAuthor: boolean;
|
|
14
|
+
isContributor: boolean;
|
|
15
|
+
isSuperEditor: boolean;
|
|
16
|
+
isEitherEditor: boolean;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// check if the user has an assigned role
|
|
20
|
+
// so that we can stop writing this everywhere:
|
|
21
|
+
//_.some(loadedPermissions.user.roles, {name: 'Administrator'})
|
|
22
|
+
|
|
23
|
+
export function checkUserPermissionsForRole(
|
|
24
|
+
loadedPermissions: LoadedPermissionsWithRoles | null | undefined,
|
|
25
|
+
roleName: string
|
|
26
|
+
): boolean {
|
|
27
|
+
if (!loadedPermissions?.user?.roles) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return loadedPermissions.user.roles.some(role => role.name === roleName);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function setIsRoles(loadedPermissions: LoadedPermissionsWithRoles | null | undefined): RoleFlags {
|
|
35
|
+
// utility function to parse the permissions object and set up all the "is" variables.
|
|
36
|
+
const resultsObject: RoleFlags = {
|
|
37
|
+
isOwner: false,
|
|
38
|
+
isAdmin: false,
|
|
39
|
+
isEditor: false,
|
|
40
|
+
isAuthor: false,
|
|
41
|
+
isContributor: false,
|
|
42
|
+
isSuperEditor: false,
|
|
43
|
+
isEitherEditor: false
|
|
44
|
+
};
|
|
45
|
+
if (!loadedPermissions?.user?.roles) {
|
|
46
|
+
return resultsObject;
|
|
47
|
+
}
|
|
48
|
+
resultsObject.isOwner = checkUserPermissionsForRole(loadedPermissions, 'Owner');
|
|
49
|
+
resultsObject.isAdmin = checkUserPermissionsForRole(loadedPermissions, 'Administrator');
|
|
50
|
+
resultsObject.isEditor = checkUserPermissionsForRole(loadedPermissions, 'Editor');
|
|
51
|
+
resultsObject.isAuthor = checkUserPermissionsForRole(loadedPermissions, 'Author');
|
|
52
|
+
resultsObject.isContributor = checkUserPermissionsForRole(loadedPermissions, 'Contributor');
|
|
53
|
+
resultsObject.isSuperEditor = checkUserPermissionsForRole(loadedPermissions, 'Super Editor');
|
|
54
|
+
resultsObject.isEitherEditor = resultsObject.isEditor || resultsObject.isSuperEditor;
|
|
55
|
+
return resultsObject;
|
|
56
|
+
}
|
|
@@ -140,8 +140,12 @@ module.exports = class AdapterManager {
|
|
|
140
140
|
// that includes the adapter's own path, which would false-positive.
|
|
141
141
|
const firstLine = err.message.split('\n')[0];
|
|
142
142
|
if (!firstLine.includes(pathToAdapter)) {
|
|
143
|
+
// Name the unresolved module so the error is actionable, e.g.
|
|
144
|
+
// "Cannot find module 'superagent'" -> 'superagent'.
|
|
145
|
+
const missingMatch = /Cannot find module '([^']+)'/.exec(firstLine);
|
|
146
|
+
const missingModule = missingMatch ? ` '${missingMatch[1]}'` : '';
|
|
143
147
|
throw new errors.IncorrectUsageError({
|
|
144
|
-
message: `You are missing
|
|
148
|
+
message: `You are missing a dependency${missingModule} in your adapter ${pathToAdapter}`,
|
|
145
149
|
err
|
|
146
150
|
});
|
|
147
151
|
}
|
|
@@ -28,7 +28,9 @@ const messages = {
|
|
|
28
28
|
invalidAutomationEdgeEndpoint: 'Automation edges must reference actions in the submitted graph.',
|
|
29
29
|
duplicateAutomationEdge: 'Automation edges must be unique.',
|
|
30
30
|
invalidAutomationEdge: 'Automation edges cannot connect an action to itself.',
|
|
31
|
-
invalidAutomationGraphShape: 'Automation graph must be a single linear path without branches or cycles.'
|
|
31
|
+
invalidAutomationGraphShape: 'Automation graph must be a single linear path without branches or cycles.',
|
|
32
|
+
emptyEmailSubjectWhenActive: 'Active automations require a subject line for every email.',
|
|
33
|
+
emptyEmailBodyWhenActive: 'Active automations require a body for every email.'
|
|
32
34
|
};
|
|
33
35
|
const objectIdSchema = zod_1.z.string().refine(value => bson_objectid_1.default.isValid(value));
|
|
34
36
|
const waitActionSchema = zod_1.z.object({
|
|
@@ -42,7 +44,7 @@ const sendEmailActionSchema = zod_1.z.object({
|
|
|
42
44
|
id: objectIdSchema,
|
|
43
45
|
type: zod_1.z.literal('send_email'),
|
|
44
46
|
data: zod_1.z.object({
|
|
45
|
-
email_subject: zod_1.z.string()
|
|
47
|
+
email_subject: zod_1.z.string(),
|
|
46
48
|
email_lexical: zod_1.z.string().refine((value) => {
|
|
47
49
|
try {
|
|
48
50
|
JSON.parse(value);
|
|
@@ -111,8 +113,41 @@ function validateEditData(data) {
|
|
|
111
113
|
throwValidationError(buildInvalidAutomationPayloadMessage(result.error.issues));
|
|
112
114
|
}
|
|
113
115
|
validateGraph(result.data.actions, result.data.edges);
|
|
116
|
+
validateActiveEmailSteps(result.data.status, result.data.actions);
|
|
114
117
|
return result.data;
|
|
115
118
|
}
|
|
119
|
+
// Drafts may persist empty email steps, but an active automation must have a
|
|
120
|
+
// complete subject and body for every email it sends — mirroring the editor's
|
|
121
|
+
// publish-time validation.
|
|
122
|
+
function validateActiveEmailSteps(status, actions) {
|
|
123
|
+
if (status !== 'active') {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
for (const action of actions) {
|
|
127
|
+
if (action.type !== 'send_email') {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (!action.data.email_subject.trim()) {
|
|
131
|
+
throwValidationError(messages.emptyEmailSubjectWhenActive, 'actions');
|
|
132
|
+
}
|
|
133
|
+
if (isEmptyLexical(action.data.email_lexical)) {
|
|
134
|
+
throwValidationError(messages.emptyEmailBodyWhenActive, 'actions');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function isEmptyLexical(lexical) {
|
|
139
|
+
try {
|
|
140
|
+
const parsed = JSON.parse(lexical);
|
|
141
|
+
const children = parsed?.root?.children;
|
|
142
|
+
if (!children || children.length === 0) {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
return children.length === 1 && children[0].type === 'paragraph' && (!children[0].children || children[0].children.length === 0);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
116
151
|
function buildInvalidAutomationPayloadMessage(issues) {
|
|
117
152
|
if (!issues.length) {
|
|
118
153
|
return messages.invalidAutomationPayload;
|
|
@@ -25,7 +25,9 @@ const messages = {
|
|
|
25
25
|
invalidAutomationEdgeEndpoint: 'Automation edges must reference actions in the submitted graph.',
|
|
26
26
|
duplicateAutomationEdge: 'Automation edges must be unique.',
|
|
27
27
|
invalidAutomationEdge: 'Automation edges cannot connect an action to itself.',
|
|
28
|
-
invalidAutomationGraphShape: 'Automation graph must be a single linear path without branches or cycles.'
|
|
28
|
+
invalidAutomationGraphShape: 'Automation graph must be a single linear path without branches or cycles.',
|
|
29
|
+
emptyEmailSubjectWhenActive: 'Active automations require a subject line for every email.',
|
|
30
|
+
emptyEmailBodyWhenActive: 'Active automations require a body for every email.'
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
const objectIdSchema = z.string().refine(value => ObjectId.isValid(value));
|
|
@@ -42,7 +44,7 @@ const sendEmailActionSchema = z.object({
|
|
|
42
44
|
id: objectIdSchema,
|
|
43
45
|
type: z.literal('send_email'),
|
|
44
46
|
data: z.object({
|
|
45
|
-
email_subject: z.string()
|
|
47
|
+
email_subject: z.string(),
|
|
46
48
|
email_lexical: z.string().refine((value) => {
|
|
47
49
|
try {
|
|
48
50
|
JSON.parse(value);
|
|
@@ -126,9 +128,48 @@ function validateEditData(data: unknown): EditAutomationData {
|
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
validateGraph(result.data.actions, result.data.edges);
|
|
131
|
+
validateActiveEmailSteps(result.data.status, result.data.actions);
|
|
129
132
|
return result.data;
|
|
130
133
|
}
|
|
131
134
|
|
|
135
|
+
// Drafts may persist empty email steps, but an active automation must have a
|
|
136
|
+
// complete subject and body for every email it sends — mirroring the editor's
|
|
137
|
+
// publish-time validation.
|
|
138
|
+
function validateActiveEmailSteps(status: EditAutomationData['status'], actions: EditAutomationData['actions']) {
|
|
139
|
+
if (status !== 'active') {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
for (const action of actions) {
|
|
144
|
+
if (action.type !== 'send_email') {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (!action.data.email_subject.trim()) {
|
|
149
|
+
throwValidationError(messages.emptyEmailSubjectWhenActive, 'actions');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (isEmptyLexical(action.data.email_lexical)) {
|
|
153
|
+
throwValidationError(messages.emptyEmailBodyWhenActive, 'actions');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function isEmptyLexical(lexical: string): boolean {
|
|
159
|
+
try {
|
|
160
|
+
const parsed = JSON.parse(lexical);
|
|
161
|
+
const children = parsed?.root?.children;
|
|
162
|
+
|
|
163
|
+
if (!children || children.length === 0) {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return children.length === 1 && children[0].type === 'paragraph' && (!children[0].children || children[0].children.length === 0);
|
|
168
|
+
} catch {
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
132
173
|
function buildInvalidAutomationPayloadMessage(issues: z.core.$ZodIssue[]) {
|
|
133
174
|
if (!issues.length) {
|
|
134
175
|
return messages.invalidAutomationPayload;
|
|
@@ -12,7 +12,8 @@ const tpl = require('@tryghost/tpl');
|
|
|
12
12
|
|
|
13
13
|
const messages = {
|
|
14
14
|
cannotDestroyComments: 'You cannot destroy comments.',
|
|
15
|
-
memberNotFound: 'Unable to find member'
|
|
15
|
+
memberNotFound: 'Unable to find member',
|
|
16
|
+
unsupportedReportCountFilter: 'Unsupported count.reports filter'
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
module.exports = class CommentsController {
|
|
@@ -25,12 +26,51 @@ module.exports = class CommentsController {
|
|
|
25
26
|
this.stats = stats;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
#withPostFilter(options) {
|
|
30
|
+
const nextOptions = {...options};
|
|
31
|
+
|
|
32
|
+
if (!options.post_id) {
|
|
33
|
+
return nextOptions;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (options.filter) {
|
|
37
|
+
const postId = options.post_id;
|
|
38
|
+
const existingTransformer = options.mongoTransformer;
|
|
39
|
+
nextOptions.mongoTransformer = function (query) {
|
|
40
|
+
const transformedQuery = existingTransformer ? existingTransformer(query) : query;
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
$and: [
|
|
44
|
+
{
|
|
45
|
+
post_id: postId
|
|
46
|
+
},
|
|
47
|
+
transformedQuery
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
} else {
|
|
52
|
+
nextOptions.filter = `post_id:${options.post_id}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return nextOptions;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async #withImpersonationContext(options) {
|
|
59
|
+
const nextOptions = {...options};
|
|
60
|
+
|
|
61
|
+
if (!options.impersonate_member_uuid) {
|
|
62
|
+
return nextOptions;
|
|
33
63
|
}
|
|
64
|
+
|
|
65
|
+
nextOptions.context = {
|
|
66
|
+
...options.context,
|
|
67
|
+
member: {
|
|
68
|
+
...options.context?.member,
|
|
69
|
+
id: await this.service.getMemberIdByUUID(options.impersonate_member_uuid)
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return nextOptions;
|
|
34
74
|
}
|
|
35
75
|
|
|
36
76
|
#checkMember(frame) {
|
|
@@ -73,6 +113,12 @@ module.exports = class CommentsController {
|
|
|
73
113
|
} else if (val.$ne !== undefined) {
|
|
74
114
|
reportCount = {op: '!=', value: val.$ne};
|
|
75
115
|
}
|
|
116
|
+
|
|
117
|
+
if (!reportCount) {
|
|
118
|
+
throw new errors.BadRequestError({
|
|
119
|
+
message: tpl(messages.unsupportedReportCountFilter)
|
|
120
|
+
});
|
|
121
|
+
}
|
|
76
122
|
}
|
|
77
123
|
|
|
78
124
|
// If there's remaining filter, use transformer to replace parsed result
|
|
@@ -92,53 +138,23 @@ module.exports = class CommentsController {
|
|
|
92
138
|
* @param {Frame} frame
|
|
93
139
|
*/
|
|
94
140
|
async browse(frame) {
|
|
95
|
-
|
|
96
|
-
if (frame.options.filter) {
|
|
97
|
-
frame.options.mongoTransformer = function (query) {
|
|
98
|
-
return {
|
|
99
|
-
$and: [
|
|
100
|
-
{
|
|
101
|
-
post_id: frame.options.post_id
|
|
102
|
-
},
|
|
103
|
-
query
|
|
104
|
-
]
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
} else {
|
|
108
|
-
frame.options.filter = `post_id:${frame.options.post_id}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return await this.service.getComments(frame.options);
|
|
141
|
+
return await this.service.getComments(this.#withPostFilter(frame.options));
|
|
113
142
|
}
|
|
114
143
|
|
|
115
144
|
async adminBrowse(frame) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
post_id: frame.options.post_id
|
|
123
|
-
},
|
|
124
|
-
query
|
|
125
|
-
]
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
} else {
|
|
129
|
-
frame.options.filter = `post_id:${frame.options.post_id}`;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
frame.options.isAdmin = true;
|
|
145
|
+
let options = this.#withPostFilter(frame.options);
|
|
146
|
+
options = {
|
|
147
|
+
...options,
|
|
148
|
+
isAdmin: true
|
|
149
|
+
};
|
|
134
150
|
// Admin routes in Comments-UI lack member context due to cross-domain constraints (CORS), which prevents
|
|
135
151
|
// credentials from being passed. This causes issues like the inability to determine if a
|
|
136
152
|
// logged-in admin (acting on behalf of a member) has already liked a comment.
|
|
137
153
|
// To resolve this, we retrieve the `impersonate_member_uuid` from the request params and
|
|
138
154
|
// explicitly set it in the context options as the acting member's ID.
|
|
139
155
|
// Note: This approach is applied to several admin routes where member context is required.
|
|
140
|
-
await this.#
|
|
141
|
-
return await this.service.getAdminComments(
|
|
156
|
+
options = await this.#withImpersonationContext(options);
|
|
157
|
+
return await this.service.getAdminComments(options);
|
|
142
158
|
}
|
|
143
159
|
|
|
144
160
|
/**
|
|
@@ -221,19 +237,34 @@ module.exports = class CommentsController {
|
|
|
221
237
|
* @param {Frame} frame
|
|
222
238
|
*/
|
|
223
239
|
async adminReplies(frame) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
let options = {
|
|
241
|
+
...frame.options,
|
|
242
|
+
order: 'created_at asc' // we always want to load replies from oldest to newest
|
|
243
|
+
};
|
|
244
|
+
options = await this.#withImpersonationContext(options);
|
|
227
245
|
|
|
228
|
-
return this.service.
|
|
246
|
+
return this.service.getAdminReplies(frame.options.id, _.omit(options, 'id'));
|
|
229
247
|
}
|
|
230
248
|
|
|
231
249
|
/**
|
|
232
250
|
* @param {Frame} frame
|
|
233
251
|
*/
|
|
234
252
|
async read(frame) {
|
|
235
|
-
await this.#
|
|
236
|
-
return await this.service.getCommentByID(frame.data.id,
|
|
253
|
+
const options = await this.#withImpersonationContext(frame.options);
|
|
254
|
+
return await this.service.getCommentByID(frame.data.id, options);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @param {Frame} frame
|
|
259
|
+
*/
|
|
260
|
+
async adminRead(frame) {
|
|
261
|
+
let options = {
|
|
262
|
+
...frame.options,
|
|
263
|
+
isAdmin: true
|
|
264
|
+
};
|
|
265
|
+
options = await this.#withImpersonationContext(options);
|
|
266
|
+
|
|
267
|
+
return await this.service.getCommentByID(frame.data.id, options);
|
|
237
268
|
}
|
|
238
269
|
|
|
239
270
|
/**
|
|
@@ -337,7 +368,7 @@ module.exports = class CommentsController {
|
|
|
337
368
|
frame.options
|
|
338
369
|
);
|
|
339
370
|
|
|
340
|
-
const comment = await this.service.getCommentByID(frame.options.id);
|
|
371
|
+
const comment = await this.service.getCommentByID(frame.options.id, frame.options);
|
|
341
372
|
|
|
342
373
|
if (comment) {
|
|
343
374
|
const postId = comment.get('post_id');
|
|
@@ -364,7 +395,7 @@ module.exports = class CommentsController {
|
|
|
364
395
|
frame.options
|
|
365
396
|
);
|
|
366
397
|
|
|
367
|
-
const comment = await this.service.getCommentByID(frame.options.id);
|
|
398
|
+
const comment = await this.service.getCommentByID(frame.options.id, frame.options);
|
|
368
399
|
|
|
369
400
|
if (comment) {
|
|
370
401
|
const postId = comment.get('post_id');
|
|
@@ -387,7 +418,8 @@ module.exports = class CommentsController {
|
|
|
387
418
|
|
|
388
419
|
return await this.service.reportComment(
|
|
389
420
|
frame.options.id,
|
|
390
|
-
frame.options?.context?.member
|
|
421
|
+
frame.options?.context?.member,
|
|
422
|
+
frame.options
|
|
391
423
|
);
|
|
392
424
|
}
|
|
393
425
|
|
|
@@ -427,7 +459,7 @@ module.exports = class CommentsController {
|
|
|
427
459
|
frame.options
|
|
428
460
|
);
|
|
429
461
|
|
|
430
|
-
const comment = await this.service.getCommentByID(frame.options.id);
|
|
462
|
+
const comment = await this.service.getCommentByID(frame.options.id, frame.options);
|
|
431
463
|
|
|
432
464
|
if (comment) {
|
|
433
465
|
const postId = comment.get('post_id');
|
|
@@ -454,7 +486,7 @@ module.exports = class CommentsController {
|
|
|
454
486
|
frame.options
|
|
455
487
|
);
|
|
456
488
|
|
|
457
|
-
const comment = await this.service.getCommentByID(frame.options.id);
|
|
489
|
+
const comment = await this.service.getCommentByID(frame.options.id, frame.options);
|
|
458
490
|
|
|
459
491
|
if (comment) {
|
|
460
492
|
const postId = comment.get('post_id');
|
|
@@ -2,7 +2,7 @@ const moment = require('moment');
|
|
|
2
2
|
const htmlToPlaintext = require('@tryghost/html-to-plaintext');
|
|
3
3
|
const emailService = require('../email-service');
|
|
4
4
|
const CommentsServiceEmailRenderer = require('./comments-service-email-renderer');
|
|
5
|
-
const toPlain = require('../../lib/common/to-plain');
|
|
5
|
+
const {toPlain} = require('../../lib/common/to-plain');
|
|
6
6
|
const {t} = require('../i18n');
|
|
7
7
|
|
|
8
8
|
class CommentsServiceEmails {
|