ghost 6.57.0 → 6.57.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/components/tryghost-adapter-base-scheduling-0.2.1.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.4.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.4.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.1.5.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.3.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.3.3.tgz +0 -0
- package/components/tryghost-kg-lexical-html-renderer-1.4.3.tgz +0 -0
- package/core/built/admin/assets/{about-C7O-AgRZ.js → about-BNojRaxf.js} +1 -1
- package/core/built/admin/assets/{account-migration-Cv_ol1ko.js → account-migration-DMS8JsM-.js} +1 -1
- package/core/built/admin/assets/{add-integration-modal-m9Dv6f77.js → add-integration-modal-DU9ghGLS.js} +1 -1
- package/core/built/admin/assets/{add-newsletter-modal-CPSVZL2H.js → add-newsletter-modal-DFxuQrYu.js} +1 -1
- package/core/built/admin/assets/{add-recommendation-modal-Ci9Z5yat.js → add-recommendation-modal-D-3LOrdd.js} +1 -1
- package/core/built/admin/assets/{analytics-DqSCVV8U.js → analytics-DTIMRhWw.js} +1 -1
- package/core/built/admin/assets/{announcement-bar-modal-DU3avV7d.js → announcement-bar-modal-DGCcezB6.js} +1 -1
- package/core/built/admin/assets/{api-keys-BK0LylyK.js → api-keys-Dx4NeNpK.js} +1 -1
- package/core/built/admin/assets/{audience-DTJtXXWY.js → audience-DkknNqhZ.js} +1 -1
- package/core/built/admin/assets/{automations-dtQ_MRZ7.js → automations-DvSU7QhW.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-B8Es3AuV.js → bluesky-sharing-yZ9A_jL8.js} +1 -1
- package/core/built/admin/assets/{breadcrumb-tg5zL--z.js → breadcrumb-CjOH7LCU.js} +1 -1
- package/core/built/admin/assets/{chart-helpers-CZElTGYL.js → chart-helpers-DGxvWnBT.js} +1 -1
- package/core/built/admin/assets/{checkbox-Cyo-x7mC.js → checkbox-BSUcnNq_.js} +1 -1
- package/core/built/admin/assets/{chunk.873.b8fc05a8ab877fb819ed.js → chunk.424.4a27628efdade15c2dab.js} +3 -3
- package/core/built/admin/assets/chunk.524.dce1c51e0bc30fb2718e.js +25 -0
- package/core/built/admin/assets/{chunk.211.6f7328d63c41536451b3.js → chunk.571.40f093ed6d883993714e.js} +5 -5
- package/core/built/admin/assets/chunk.582.3a430d5c6a744fd475b6.js +27 -0
- package/core/built/admin/assets/{code-editor-view-Dq1rQ4tS.js → code-editor-view-BcyKABrG.js} +1 -1
- package/core/built/admin/assets/{color-picker-field-BonBgxhU.js → color-picker-field-8NoSnhNI.js} +1 -1
- package/core/built/admin/assets/{color-utils-BsrwXuDz.js → color-utils-Dzeeuj1F.js} +1 -1
- package/core/built/admin/assets/{combobox-uX5r_paI.js → combobox-5rdgDrDV.js} +1 -1
- package/core/built/admin/assets/{command-DxwBO2pF.js → command-BOYMbZa_.js} +1 -1
- package/core/built/admin/assets/{comments-Dn-RO-nU.js → comments-BhNM5CYl.js} +1 -1
- package/core/built/admin/assets/{confirmation-modal-B6D6mk6R.js → confirmation-modal-CYD7x3UQ.js} +1 -1
- package/core/built/admin/assets/{content-api-modal-BxQ-7T6u.js → content-api-modal-BtW4Z1-1.js} +1 -1
- package/core/built/admin/assets/{copy-field-BAxL4Zqn.js → copy-field-CEp_XieW.js} +1 -1
- package/core/built/admin/assets/{custom-integration-modal---d_l7lc.js → custom-integration-modal-bk3lNEuQ.js} +1 -1
- package/core/built/admin/assets/{date-range-select-PB2n1HZf.js → date-range-select-B3Ij1Rqg.js} +1 -1
- package/core/built/admin/assets/{debounce-Dg2fW5Rg.js → debounce-Cx5B_9OI.js} +1 -1
- package/core/built/admin/assets/{design-and-theme-modal-DYRT207a.js → design-and-theme-modal-B2xYKS1I.js} +3 -3
- package/core/built/admin/assets/{dirty-confirm-dialog-BnDJ39ao.js → dirty-confirm-dialog-YE9L21gY.js} +1 -1
- package/core/built/admin/assets/{disabled-sources-indicator-iMHrkyV3.js → disabled-sources-indicator-uIzbWL7K.js} +1 -1
- package/core/built/admin/assets/{dist-D5vhMdXf.js → dist-ARN6XTcR.js} +1 -1
- package/core/built/admin/assets/{dist-cFzKLG7y.js → dist-Bg8bSvLA.js} +1 -1
- package/core/built/admin/assets/{dist-WeOIvSYM.js → dist-CsvXCJSe.js} +1 -1
- package/core/built/admin/assets/{domain-BR8FIdjD.js → domain-DzrOAPY8.js} +1 -1
- package/core/built/admin/assets/{dropzone-hNxmUvwD.js → dropzone-CzhP33wa.js} +1 -1
- package/core/built/admin/assets/{edit-profile-CENrkY0l.js → edit-profile-oufs4R4n.js} +1 -1
- package/core/built/admin/assets/{editor-B18D0lm8.js → editor-BBKrunMK.js} +3 -3
- package/core/built/admin/assets/{embed-signup-form-modal-BsCYUMvQ.js → embed-signup-form-modal-Ch3s6lqA.js} +1 -1
- package/core/built/admin/assets/{explore-BmrnljWw.js → explore-CA-R01Br.js} +1 -1
- package/core/built/admin/assets/{feed-Dy4li6i8.js → feed-ClC8_Gld.js} +1 -1
- package/core/built/admin/assets/{field-Dh_lwk13.js → field-B3OPenbP.js} +1 -1
- package/core/built/admin/assets/{filter-sources-D2zDuJH5.js → filter-sources-CiPLnG9A.js} +1 -1
- package/core/built/admin/assets/{filters-3JBQcNtJ.js → filters-Bz0HsRie.js} +1 -1
- package/core/built/admin/assets/{filters-CFt_BDe4.js → filters-yFvybRMe.js} +1 -1
- package/core/built/admin/assets/{first-promoter-modal-D6Rjxugw.js → first-promoter-modal-BC0UpYCD.js} +1 -1
- package/core/built/admin/assets/{gift-link-modal-zMtlJhLQ.js → gift-link-modal-BKRuqo-k.js} +1 -1
- package/core/built/admin/assets/{global-data-provider-B949LDXJ.js → global-data-provider-RzW6Bnlf.js} +1 -1
- package/core/built/admin/assets/{growth-CFws67_i.js → growth-ClNAldfL.js} +1 -1
- package/core/built/admin/assets/{growth-C38Xtp8D.js → growth-Dz8OSG06.js} +1 -1
- package/core/built/admin/assets/{history-modal-ILAOkbxH.js → history-modal-DIVuQ5Ct.js} +1 -1
- package/core/built/admin/assets/{html-field-9a9Id_2q.js → html-field-CVZ2sMxw.js} +1 -1
- package/core/built/admin/assets/{images-CrQKVc9Q.js → images-Ok8FFJ3A.js} +1 -1
- package/core/built/admin/assets/{inbox-BrSRzyvz.js → inbox-CMUVI6qb.js} +1 -1
- package/core/built/admin/assets/{index-BHy2DZX-.js → index-DUXM0NlS.js} +2 -2
- package/core/built/admin/assets/{input-group-6vEPvX9S.js → input-group-2XU-iuh_.js} +1 -1
- package/core/built/admin/assets/{invite-user-modal-5xDCEw90.js → invite-user-modal-DrZ7xxrZ.js} +1 -1
- package/core/built/admin/assets/{koenig-editor-base-BWLEB9Vf.js → koenig-editor-base-BPj4S760.js} +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +9254 -9251
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +124 -124
- package/core/built/admin/assets/{koenig-lexical-Cj62r_y9.js → koenig-lexical-Cdjv-m3_.js} +98 -98
- package/core/built/admin/assets/{kpi-card-IHDo8Q56.js → kpi-card-J8Mj1sDX.js} +1 -1
- package/core/built/admin/assets/{kpi-card-DOUnkZcN.js → kpi-card-awos0BMH.js} +1 -1
- package/core/built/admin/assets/{kpi-helpers-CjUdECAK.js → kpi-helpers-SEhvH-8E.js} +1 -1
- package/core/built/admin/assets/{kpi-tabs-X3DkOYbI.js → kpi-tabs-R6BjsKhd.js} +1 -1
- package/core/built/admin/assets/{label-Dq6QaOuS.js → label-BMC3dzLI.js} +1 -1
- package/core/built/admin/assets/{label-picker-8YlhS2U3.js → label-picker-Bnlru5tO.js} +1 -1
- package/core/built/admin/assets/layout-yR9rlvEw.js +1 -0
- package/core/built/admin/assets/{limit-modal-BRPsit_B.js → limit-modal-COmLevuY.js} +1 -1
- package/core/built/admin/assets/{member-custom-fields-CmvsuuV_.js → member-custom-fields-BvFKEpxJ.js} +1 -1
- package/core/built/admin/assets/{member-detail-DCvRrkmJ.js → member-detail-CWdPAe3p.js} +1 -1
- package/core/built/admin/assets/{members-DxbSKngD.js → members-Bnt0ih2R.js} +1 -1
- package/core/built/admin/assets/{moderation-Da5lhhWh.js → moderation-mPjYHgZW.js} +1 -1
- package/core/built/admin/assets/{multi-select-combobox-CYdkH7KQ.js → multi-select-combobox-CsoyHAiX.js} +1 -1
- package/core/built/admin/assets/{navigation-modal-BIoTwtMy.js → navigation-modal-D_c0badj.js} +1 -1
- package/core/built/admin/assets/{newsletter-BptlVoJm.js → newsletter-DR49NyGS.js} +1 -1
- package/core/built/admin/assets/{newsletter-detail-modal-BIvxqE0N.js → newsletter-detail-modal-B45pL1pb.js} +1 -1
- package/core/built/admin/assets/{newsletter-emails-Bf8IZLsP.js → newsletter-emails-B-OLfrvr.js} +1 -1
- package/core/built/admin/assets/{newsletters-BgrIZk0V.js → newsletters-DGs5BaKH.js} +1 -1
- package/core/built/admin/assets/{note-DYcLOmDb.js → note-CSVsUKBm.js} +1 -1
- package/core/built/admin/assets/{notifications-B2SPFIV9.js → notifications-DV9FRtDw.js} +1 -1
- package/core/built/admin/assets/{offers-container-modal-BZnZITMw.js → offers-container-modal-B0hFS8nk.js} +1 -1
- package/core/built/admin/assets/{onboarding-route-DgdfxkQh.js → onboarding-route--jL5KLPD.js} +1 -1
- package/core/built/admin/assets/{overview-Dt2_mR6U.js → overview-B-ZPNqMo.js} +1 -1
- package/core/built/admin/assets/{overview-BYQJXSog.js → overview-D96iwoJi.js} +1 -1
- package/core/built/admin/assets/{page-header-CpmxJj5B.js → page-header-DAvDYKO9.js} +1 -1
- package/core/built/admin/assets/{pintura-modal-B4MuBuuO.js → pintura-modal-jiUCxX0Q.js} +1 -1
- package/core/built/admin/assets/{portal-frame-BF0NBIji.js → portal-frame-D4D4nEO6.js} +1 -1
- package/core/built/admin/assets/{portal-modal-DMVbm0oy.js → portal-modal-BLFdYeDH.js} +1 -1
- package/core/built/admin/assets/{post-analytics-CXWBOGyP.js → post-analytics-BhAtiFJp.js} +1 -1
- package/core/built/admin/assets/{post-analytics-header-ChzjXVPt.js → post-analytics-header-DK27VjJm.js} +1 -1
- package/core/built/admin/assets/{post-analytics-provider-Cgw4U_fw.js → post-analytics-provider-DGg0FUqs.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-B9Vmk_XM.js → post-share-modal-DtFAC132.js} +1 -1
- package/core/built/admin/assets/{preferences-BfzJmnsd.js → preferences-CuWLISHa.js} +1 -1
- package/core/built/admin/assets/{preview-modal-Dw_HtD6S.js → preview-modal-DctYx20m.js} +1 -1
- package/core/built/admin/assets/{profile-BT5vtv9b.js → profile-BsKYYtuL.js} +1 -1
- package/core/built/admin/assets/{radio-group-I7ou7PoJ.js → radio-group-CI5_Kf_d.js} +1 -1
- package/core/built/admin/assets/{select-D9oU1IoM.js → select-CkXqNJDJ.js} +1 -1
- package/core/built/admin/assets/settings-B4vM-rgV.js +4 -0
- package/core/built/admin/assets/{settings-CpvHWix7.js → settings-ZCj-W56o.js} +1 -1
- package/core/built/admin/assets/{settings-breadcrumbs-K0USP2nw.js → settings-breadcrumbs-DIq31FwA.js} +1 -1
- package/core/built/admin/assets/{share-modal-ClIyPzc5.js → share-modal-BNj14g79.js} +1 -1
- package/core/built/admin/assets/{slack-modal-1XXqOfiw.js → slack-modal-C6SpMQ-q.js} +1 -1
- package/core/built/admin/assets/{sort-button-CdBsm40v.js → sort-button-B-k54ow2.js} +1 -1
- package/core/built/admin/assets/{source-icon-CEYmVLXR.js → source-icon-Cej3sZM6.js} +1 -1
- package/core/built/admin/assets/{stats-D8nZCTy5.js → stats-B2KW8E2y.js} +1 -1
- package/core/built/admin/assets/{stats-view-CugFVf0g.js → stats-view-CVzU2-p5.js} +1 -1
- package/core/built/admin/assets/{step-1-DOYjrORn.js → step-1-Dbn1iIMU.js} +1 -1
- package/core/built/admin/assets/{step-2-vA6RsarH.js → step-2-BahnSuN6.js} +1 -1
- package/core/built/admin/assets/{step-3-BtIBxMId.js → step-3-CW04e2ZJ.js} +1 -1
- package/core/built/admin/assets/{stripe-button-UFP4QRXd.js → stripe-button-BkBZqaGG.js} +1 -1
- package/core/built/admin/assets/{stripe-connect-modal-C_L3uM6n.js → stripe-connect-modal-CYDDrSJm.js} +1 -1
- package/core/built/admin/assets/{table-TMCgCQK7.js → table-BtLcEi1M.js} +1 -1
- package/core/built/admin/assets/{tabs-Dd6oOKbv.js → tabs-BaWRfg8j.js} +1 -1
- package/core/built/admin/assets/{tag-detail-D3l-UJPR.js → tag-detail-CmqiC32L.js} +1 -1
- package/core/built/admin/assets/{tags-WdKQGWR8.js → tags-BbygUvNB.js} +1 -1
- package/core/built/admin/assets/{testimonials-modal-CqWp-xXJ.js → testimonials-modal--bdzppyh.js} +1 -1
- package/core/built/admin/assets/{tier-detail-modal-BkcR2u0A.js → tier-detail-modal-BZmAsIy4.js} +1 -1
- package/core/built/admin/assets/{toggle-group-Guorw93z.js → toggle-group-CVl-Xigr.js} +1 -1
- package/core/built/admin/assets/{topic-filter-CbgoWIHn.js → topic-filter-BoRHRbL1.js} +1 -1
- package/core/built/admin/assets/{transistor-modal-DuNnnpal.js → transistor-modal-CBPDqEGy.js} +1 -1
- package/core/built/admin/assets/{unsplash-modal-y2bVwTHH.js → unsplash-modal-CixoRAO2.js} +1 -1
- package/core/built/admin/assets/{use-analytics-data-B-b4wNSC.js → use-analytics-data-BiWvcf1u.js} +1 -1
- package/core/built/admin/assets/{use-check-theme-limit-error-m09J38Mq.js → use-check-theme-limit-error-B14lZukR.js} +1 -1
- package/core/built/admin/assets/use-feature-flag-BmJoc5WN.js +1 -0
- package/core/built/admin/assets/{use-filter-params-BnbBDc7T.js → use-filter-params-ChoV72Hw.js} +1 -1
- package/core/built/admin/assets/{use-growth-stats-DPU5rt3W.js → use-growth-stats-Dom8xVzo.js} +1 -1
- package/core/built/admin/assets/{use-limiter-BkN3E4gw.js → use-limiter-Dwg8ivgQ.js} +1 -1
- package/core/built/admin/assets/{use-pintura-config-C_z8HTG2.js → use-pintura-config-Bj4QmiVk.js} +1 -1
- package/core/built/admin/assets/{use-pintura-editor-DNgbkhGp.js → use-pintura-editor-DvrslmPE.js} +1 -1
- package/core/built/admin/assets/{use-post-referrers-C2mXyrp-.js → use-post-referrers-pxIHTXFs.js} +1 -1
- package/core/built/admin/assets/{use-reply-chain-data-DaK8q2qQ.js → use-reply-chain-data-CmFe0N6F.js} +1 -1
- package/core/built/admin/assets/{use-setting-group-YlYcoNyP.js → use-setting-group-Cmp_sy-d.js} +1 -1
- package/core/built/admin/assets/{use-settings-navigation-Bf1g1rEh.js → use-settings-navigation-BmROPrls.js} +1 -1
- package/core/built/admin/assets/{use-simple-pagination-D9ckKo5-.js → use-simple-pagination-D5rL3YwO.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-query-GSa32hVw.js → use-tinybird-query-DP2dMaq7.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-token-CKLOZFsw.js → use-tinybird-token-DrK_skPQ.js} +1 -1
- package/core/built/admin/assets/{use-url-input-z-p0Kewm.js → use-url-input-ChrUZBFf.js} +1 -1
- package/core/built/admin/assets/{user-detail-modal-BMxOA4Sv.js → user-detail-modal-XODpOqNC.js} +1 -1
- package/core/built/admin/assets/{virtual-list-RHeEL05L.js → virtual-list-Dnoafqbk.js} +1 -1
- package/core/built/admin/assets/{web-xJtcwMy4.js → web-D71mjB2r.js} +1 -1
- package/core/built/admin/assets/{web-Bw2QMO5u.js → web-z71lA1Y3.js} +1 -1
- package/core/built/admin/assets/{zapier-modal-BP2f4-vY.js → zapier-modal-Bp507Um7.js} +1 -1
- package/core/built/admin/index.html +5 -5
- package/core/frontend/web/middleware/admin-toolbar.js +1 -1
- package/core/frontend/web/middleware/serve-indexnow-key.js +1 -7
- package/core/server/api/endpoints/index.js +2 -2
- package/core/server/api/endpoints/themes.js +6 -1
- package/core/server/models/base/plugins/overrides.js +7 -5
- package/core/server/services/adapter-manager/adapter-paths.js +16 -12
- package/core/server/services/adapter-manager/adapter-paths.ts +17 -12
- package/core/server/services/audience-feedback/audience-feedback-controller.js +10 -1
- package/core/server/services/audience-feedback/feedback-repository.js +4 -1
- package/core/server/services/auth/session/session-service.js +18 -3
- package/core/server/services/automations/database-automations-repository.js +5 -5
- package/core/server/services/automations/database-automations-repository.ts +12 -12
- package/core/server/services/automations/database-date.js +52 -3
- package/core/server/services/automations/database-date.ts +23 -2
- package/core/server/services/email-analytics/email-analytics-service-wrapper.js +1 -1
- package/core/server/services/email-analytics/email-analytics-service.js +3 -2
- package/core/server/services/email-analytics/index.js +2 -3
- package/core/server/services/email-analytics/index.ts +1 -2
- package/core/server/services/email-analytics/lib/queries.js +91 -124
- package/core/server/services/email-analytics/lib/queries.ts +341 -0
- package/core/server/services/indexnow-ping/index.js +0 -2
- package/core/server/services/indexnow-ping/index.ts +0 -2
- package/core/server/services/indexnow-ping/indexnow-ping-service.js +5 -7
- package/core/server/services/indexnow-ping/indexnow-ping-service.ts +7 -13
- package/core/server/services/members/members-api/repositories/member-repository.js +51 -0
- package/core/server/services/slack-notifications/slack-notifications.js +2 -2
- package/core/server/services/slack-ping/index.js +1 -1
- package/core/server/services/slack-ping/index.ts +1 -1
- package/core/server/services/slack-ping/slack-ping-service.js +1 -0
- package/core/server/services/slack-ping/slack-ping-service.ts +1 -0
- package/core/server/services/stats/members-stats-service.js +0 -7
- package/core/server/services/themes/storage.js +19 -2
- package/core/server/services/webhooks/serialize.js +10 -1
- package/core/server/web/api/endpoints/admin/routes.js +2 -2
- package/core/shared/custom-theme-settings-cache/custom-theme-settings-bread-service.js +4 -0
- package/core/shared/custom-theme-settings-cache/custom-theme-settings-service.js +39 -0
- package/core/shared/labs.js +1 -1
- package/package.json +11 -11
- package/pnpm-lock.yaml +41 -41
- package/pnpm-workspace.yaml +18 -18
- package/components/tryghost-adapter-base-scheduling-0.2.0.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.3.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.3.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.1.4.tgz +0 -0
- package/core/built/admin/assets/chunk.524.cd5498dd4e195f679266.js +0 -25
- package/core/built/admin/assets/chunk.582.6f92ec1f03734bf2ea3f.js +0 -27
- package/core/built/admin/assets/layout-TMj4P-vv.js +0 -1
- package/core/built/admin/assets/settings-CfZFbyu_.js +0 -4
- package/core/built/admin/assets/use-feature-flag-ud0Qz8vt.js +0 -1
- package/core/server/services/email-analytics/jobs/update-member-email-analytics/index.js +0 -14
- /package/core/built/admin/assets/{chunk.211.6f7328d63c41536451b3.js.LICENSE.txt → chunk.571.40f093ed6d883993714e.js.LICENSE.txt} +0 -0
- /package/core/server/api/endpoints/{gift-reminders.js → gifts.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-Bb3IsNbi.js";import{t as r}from"./jsx-runtime-DX3WBWVO.js";import{m as i,p as a}from"./hooks-D6EE7BIt.js";import{n as o,o as s,s as c,t as l}from"./use-settings-navigation-Bf1g1rEh.js";import{i as u,n as d,r as f,t as ee}from"./action-list-lGzZLHc8.js";import{Pr as p,ws as m}from"./index-BHy2DZX-.js";import{n as te}from"./confirmation-modal-B6D6mk6R.js";import{n as ne,t as h}from"./global-data-provider-B949LDXJ.js";import{n as re}from"./integrations-BT6_iJvu.js";import{t as ie}from"./api-keys-BK0LylyK.js";import{t as g}from"./integration-header-B4DyXV06.js";import{t as _}from"./api-keys-_iCT4dxr.js";import{t as v}from"./brand-icon-09YqFZjV.js";var y=``+new URL(`zapier-logo-D8a11oW_.svg`,import.meta.url).href,b=e(n(),1),x=r(),S=(e,t)=>`${e}-${t}`,C=()=>{let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(!1),i=(0,b.useRef)(new Map),[a,o]=(0,b.useState)(new Set),s=t=>t.length?t.some(t=>t.toLowerCase().includes(e.toLowerCase())):!0,c=(0,b.useCallback)((t,n)=>{i.current.set(t,n),(!e||n.some(t=>t.toLowerCase().includes(e.toLowerCase())))&&o(e=>new Set(e).add(t))},[e]),l=(0,b.useCallback)(e=>{i.current.delete(e),o(t=>{let n=new Set(t);return n.delete(e),n})},[]);(0,b.useEffect)(()=>{let t=new Set;i.current.forEach((n,r)=>{(!e||n.some(t=>t.toLowerCase().includes(e.toLowerCase())))&&t.add(r)}),o(t)},[e]);let u=(0,b.useCallback)(e=>a.size===1&&a.has(e),[a]),d=(0,b.useCallback)(()=>a,[a]),f=t=>{if(!e)return t;if(typeof t==`string`){let n=e.split(/\s+/).map(e=>e.toLowerCase()),r=n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),i=t.split(RegExp(`(${r})`,`gi`)),a=new Map;return i.map(e=>{if(!n.includes(e.toLowerCase()))return e;let t=(a.get(e)??0)+1;return a.set(e,t),(0,x.jsx)(`span`,{className:`bg-yellow-500/40`,children:e},`${e}-${t}`)})}else if(Array.isArray(t))return t.map(e=>f(e));else if(t&&typeof t==`object`&&t)return b.Children.map(t,e=>e&&typeof e==`object`&&`props`in e?f(e.props.children):e);else return t};return{filter:e,setFilter:t,checkVisible:s,highlightKeywords:f,noResult:n,setNoResult:r,registerComponent:c,unregisterComponent:l,getVisibleComponents:d,isOnlyVisibleComponent:u}},w=``+new URL(`Alto-DoS3yH_j.png`,import.meta.url).href,T=``+new URL(`Bulletin-BUpcurG5.png`,import.meta.url).href,E=``+new URL(`Casper-ASA9Ix4v.png`,import.meta.url).href,D=``+new URL(`Dawn-aeEVEPie.png`,import.meta.url).href,O=``+new URL(`Digest-DJl0U_FG.png`,import.meta.url).href,k=``+new URL(`Dope-D_CgP0p0.png`,import.meta.url).href,A=``+new URL(`Ease-B4NuA7sj.png`,import.meta.url).href,j=``+new URL(`Edge-BPZxvKka.png`,import.meta.url).href,M=``+new URL(`Edition-cIDLjlhj.png`,import.meta.url).href,N=``+new URL(`Episode-D7bgV2bY.png`,import.meta.url).href,P=``+new URL(`Headline-BFXOunIb.png`,import.meta.url).href,F=``+new URL(`Journal-D3UW9T2b.png`,import.meta.url).href,I=``+new URL(`London-CSCVHwS0.png`,import.meta.url).href,L=``+new URL(`Ruby-DVEXVMTx.png`,import.meta.url).href,R=``+new URL(`Solo-c-yPo0gw.png`,import.meta.url).href,z=``+new URL(`Source-V-WXZXnS.png`,import.meta.url).href,B=``+new URL(`Source-Magazine-Czq1p0a_.png`,import.meta.url).href,V=``+new URL(`Source-Newsletter-CwTcfhJ-.png`,import.meta.url).href,H=``+new URL(`Taste-U2cRR2yO.png`,import.meta.url).href,U=``+new URL(`Wave-DE2aI-FM.png`,import.meta.url).href,W=[{name:`Source`,category:`News`,previewUrl:`https://source.ghost.io/`,ref:`default`,image:z,variants:[{category:`Magazine`,previewUrl:`https://source-magazine.ghost.io/`,image:B},{category:`Newsletter`,previewUrl:`https://source-newsletter.ghost.io/`,image:V}]},{name:`Casper`,category:`Blog`,previewUrl:`https://demo.ghost.io/`,ref:`TryGhost/Casper`,image:E},{name:`Edition`,category:`Newsletter`,url:`https://github.com/TryGhost/Edition`,previewUrl:`https://edition.ghost.io/`,ref:`TryGhost/Edition`,image:M},{name:`Solo`,category:`Blog`,url:`https://github.com/TryGhost/Solo`,previewUrl:`https://solo.ghost.io`,ref:`TryGhost/Solo`,image:R},{name:`Taste`,category:`Blog`,url:`https://github.com/TryGhost/Taste`,previewUrl:`https://taste.ghost.io`,ref:`TryGhost/Taste`,image:H},{name:`Episode`,category:`Podcast`,url:`https://github.com/TryGhost/Episode`,previewUrl:`https://episode.ghost.io`,ref:`TryGhost/Episode`,image:N},{name:`Digest`,category:`Newsletter`,url:`https://github.com/TryGhost/Digest`,previewUrl:`https://digest.ghost.io/`,ref:`TryGhost/Digest`,image:O},{name:`Bulletin`,category:`Newsletter`,url:`https://github.com/TryGhost/Bulletin`,previewUrl:`https://bulletin.ghost.io/`,ref:`TryGhost/Bulletin`,image:T},{name:`Alto`,category:`Blog`,url:`https://github.com/TryGhost/Alto`,previewUrl:`https://alto.ghost.io`,ref:`TryGhost/Alto`,image:w},{name:`Dope`,category:`Magazine`,url:`https://github.com/TryGhost/Dope`,previewUrl:`https://dope.ghost.io`,ref:`TryGhost/Dope`,image:k},{name:`Wave`,category:`Podcast`,url:`https://github.com/TryGhost/Wave`,previewUrl:`https://wave.ghost.io`,ref:`TryGhost/Wave`,image:U},{name:`Edge`,category:`Photography`,url:`https://github.com/TryGhost/Edge`,previewUrl:`https://edge.ghost.io`,ref:`TryGhost/Edge`,image:j},{name:`Dawn`,category:`Newsletter`,url:`https://github.com/TryGhost/Dawn`,previewUrl:`https://dawn.ghost.io/`,ref:`TryGhost/Dawn`,image:D},{name:`Ease`,category:`Documentation`,url:`https://github.com/TryGhost/Ease`,previewUrl:`https://ease.ghost.io`,ref:`TryGhost/Ease`,image:A},{name:`Headline`,category:`News`,url:`https://github.com/TryGhost/Headline`,previewUrl:`https://headline.ghost.io`,ref:`TryGhost/Headline`,image:P},{name:`Ruby`,category:`Magazine`,url:`https://github.com/TryGhost/Ruby`,previewUrl:`https://ruby.ghost.io`,ref:`TryGhost/Ruby`,image:L},{name:`London`,category:`Photography`,url:`https://github.com/TryGhost/London`,previewUrl:`https://london.ghost.io`,ref:`TryGhost/London`,image:I},{name:`Journal`,category:`Newsletter`,url:`https://github.com/TryGhost/Journal`,previewUrl:`https://journal.ghost.io/`,ref:`TryGhost/Journal`,image:F}],G=``+new URL(`orb-black-1-bYPPSSAp.png`,import.meta.url).href,ae=``+new URL(`orb-black-2-C-rcujeh.png`,import.meta.url).href,K=``+new URL(`orb-black-3-DTkwRv_1.png`,import.meta.url).href,q=``+new URL(`orb-black-4-BXF3fMuE.png`,import.meta.url).href,J=``+new URL(`orb-black-5-94Eda1ek.png`,import.meta.url).href,oe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201818.2%202500'%20style='enable-background:new%200%200%201818.2%202500'%20xml:space='preserve'%3e%3ctitle%3egoogle-docs%3c/title%3e%3cpath%20d='M1136.4%200h-966C79.6%200%200%2079.5%200%20170.5v2159.1c0%2090.9%2079.5%20170.5%20170.5%20170.5h1477.3c90.9%200%20170.5-79.5%20170.5-170.5V681.8l-397.7-284.1L1136.4%200z'%20style='fill:%234285f4'/%3e%3cpath%20d='M454.5%201818.2h909.1v-113.6h-909l-.1%20113.6zm0%20227.3h681.8v-113.6H454.5v113.6zm0-795.5v113.6h909.1V1250H454.5zm0%20340.9h909.1v-113.6h-909l-.1%20113.6z'%20style='fill:%23f1f1f1'/%3e%3cpath%20d='M1136.4%200v511.4c0%2090.9%2079.5%20170.4%20170.4%20170.4h511.4L1136.4%200z'%20style='fill:%23a1c2fa'/%3e%3c/svg%3e`,se=``+new URL(`mailchimp-DwTEN-tS.svg`,import.meta.url).href,ce=`data:image/svg+xml,%3csvg%20height='546'%20viewBox='0%200%20569%20546'%20width='569'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3epatreon%3c/title%3e%3cg%20fill='%23FF424D'%3e%3ccircle%20cx='362.59'%20cy='204.59'%20data-fill='1'%20r='204.59'/%3e%3cpath%20data-fill='1'%20d='M0%200h100v545.8H0z'/%3e%3c/g%3e%3c/svg%3e`,Y=`data:image/svg+xml,%3csvg%20width='152'%20height='179'%20viewBox='0%200%20152%20179'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3epaypal%3c/title%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M136.492%2045.453c2.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27l-2.365%2015a4.168%204.168%200%200%200%204.118%204.818H69.76a6.948%206.948%200%200%200%206.863-5.865l.283-1.468%205.442-34.507.351-1.907a6.947%206.947%200%200%201%206.862-5.865h4.322c27.984%200%2049.896-11.37%2056.299-44.25%202.675-13.74%201.292-25.208-5.783-33.27-2.14-2.439-4.802-4.455-7.907-6.1'%20fill='%23238EC2'/%3e%3cpath%20d='M136.492%2045.453c2.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27l8.609-54.588-.267%201.711c.609-3.86%203.909-6.704%207.817-6.704h16.288c31.989%200%2057.037-12.996%2064.356-50.582.217-1.113.402-2.191.568-3.251'%20fill='%2320274F'/%3e%3cpath%20d='M56.978%2045.638a6.945%206.945%200%200%201%206.863-5.866h43.514c5.155%200%209.961.337%2014.356%201.045%201.256.202%202.478.435%203.665.698a53.92%2053.92%200%200%201%203.455.885c.558.162%201.106.333%201.646.512%202.157.717%204.166%201.562%206.015%202.541%202.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27L56.978%2045.638'%20fill='%23253667'/%3e%3c/g%3e%3c/svg%3e`,le=``+new URL(`slackicon-37ETtpm7.png`,import.meta.url).href,ue=`data:image/svg+xml,%3csvg%20width='86'%20height='89'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3etypeform%3c/title%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M40.28%2087.561c12.464.154%2021.16-3.994%2030.135-12.175%208.975-8.18%2014.306-16.867%2014.741-28.73.436-11.862-3.412-21.43-12.564-30.581C63.441%206.923%2051.64.9%2039.4.899%2027.158.898%2018.967%206.252%2011.385%2016.07c-7.581%209.818-9.237%2022.212-9.894%2033.921-.657%2011.71-1.15%2017.111%206.608%2024.625%207.758%207.514%2019.718%2012.791%2032.182%2012.945z'%20stroke='%23262627'/%3e%3cpath%20d='M29.136%2037.976v-4.885h25.918v4.885H44.679v27.998H39.51V37.976z'%20fill='%23262627'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e`,de=``+new URL(`zero-bounce-lzY95s9E.png`,import.meta.url).href,X=[{ghostImage:ae,appImage:le,title:`Share scheduled posts with your team in Slack`,url:`https://zapier.com/webintent/create-zap?template=359499`},{ghostImage:K,appImage:ce,title:`Connect Patreon to your Ghost membership site`,url:`https://zapier.com/webintent/create-zap?template=75801`},{ghostImage:q,appImage:de,title:`Protect email delivery with email verification`,url:`https://zapier.com/webintent/create-zap?template=359415`},{ghostImage:J,appImage:Y,title:`Add members for successful sales in PayPal`,url:`https://zapier.com/webintent/create-zap?template=184423`},{ghostImage:K,appImage:Y,title:`Unsubscribe members who cancel a subscription in PayPal`,url:`https://zapier.com/webintent/create-zap?template=359348`},{ghostImage:G,appImage:oe,title:`Send new post drafts from Google Docs to Ghost`,url:`https://zapier.com/webintent/create-zap?template=50924`},{ghostImage:q,appImage:ue,title:`Survey new members using Typeform`,url:`https://zapier.com/webintent/create-zap?template=359407`},{ghostImage:G,appImage:se,title:`Sync email subscribers in Ghost + Mailchimp`,url:`https://zapier.com/webintent/create-zap?template=359342`}],Z=(0,b.createContext)({officialThemes:W,zapierTemplates:X,search:{filter:``,setFilter:()=>{},checkVisible:()=>!0,highlightKeywords:()=>``,noResult:!1,setNoResult:()=>{},registerComponent:()=>{},unregisterComponent:()=>{},getVisibleComponents:()=>new Set,isOnlyVisibleComponent:()=>!1},sortingState:[],offersShowArchived:!1,setOffersShowArchived:()=>{}}),fe=({children:e,...t})=>{let n=C(),[r,i]=(0,b.useState)([{type:`offers`,option:`date-added`,direction:`desc`}]),[a,s]=(0,b.useState)(!1);return(0,x.jsx)(Z.Provider,{value:{officialThemes:W,zapierTemplates:X,...t,search:n,sortingState:r,setSortingState:i,offersShowArchived:a,setOffersShowArchived:s},children:(0,x.jsx)(h,{children:(0,x.jsx)(o,{children:e})})})},Q=()=>(0,b.useContext)(Z),pe=()=>Q().officialThemes,me=()=>Q().search,he=()=>Q().upgradeStatus,ge=()=>{let{sortingState:e,setSortingState:t}=Q();return{sortingState:e,setSortingState:t}},$=()=>{let{offersShowArchived:e,setOffersShowArchived:t}=Q();return{offersShowArchived:e,setOffersShowArchived:t}},_e=t({default:()=>ve});function ve(){let{updateRoute:e}=l(),{zapierTemplates:t}=Q(),{data:{integrations:n}={integrations:[]}}=re(),{config:r}=ne(),{mutateAsync:o}=_(),h=i(),[S,C]=(0,b.useState)(!1),w=r.hostSettings?.limits?.customIntegrations?.disabled,T=n.find(({slug:e})=>e===`zapier`),E=T?.api_keys?.find(e=>e.type===`admin`);return(0,b.useEffect)(()=>{w&&e(`integrations`)},[w,e]),(0,x.jsxs)(s,{cancelLabel:``,footer:(0,x.jsxs)(`div`,{className:`mx-8 flex w-full items-center justify-between`,children:[(0,x.jsxs)(`a`,{className:`mt-1 self-baseline font-bold`,href:`https://zapier.com/apps/ghost/integrations?utm_medium=partner_api&utm_source=widget&utm_campaign=Widget`,rel:`noopener noreferrer`,target:`_blank`,children:[`View more Ghost integrations powered by `,(0,x.jsx)(`span`,{children:(0,x.jsx)(`img`,{alt:`Zapier`,className:`relative top-[-2px] inline-block`,src:y})})]}),(0,x.jsx)(p,{type:`button`,onClick:()=>{e(`integrations`)},children:`Close`})]}),okLabel:`Close`,okVariant:`default`,testId:`zapier-modal`,title:``,stickyFooter:!0,onClose:()=>{e(`integrations`)},onOk:()=>{e(`integrations`)},children:[(0,x.jsx)(g,{detail:`Automation for your favorite apps`,extra:(0,x.jsx)(`div`,{className:`mt-1 -mb-4`,children:(0,x.jsx)(ie,{keys:[{id:`admin-api-key`,label:`Admin API key`,text:E?.secret,hint:S?(0,x.jsx)(`div`,{className:`text-green`,children:`Admin API Key was successfully regenerated`}):void 0,onRegenerate:()=>{!T||!E||(C(!1),c.show(te,{title:`Regenerate Admin API Key`,prompt:`You will need to locate the Ghost App within your Zapier account and click on "Reconnect" to enter the new Admin API Key.`,okLabel:`Regenerate Admin API Key`,onOk:async e=>{try{await o({integrationId:T.id,apiKeyId:E.id}),C(!0),e?.remove()}catch(e){h(e)}}}))}},{id:`api-url`,label:`API URL`,text:window.location.origin+a().subdir}]})}),icon:(0,x.jsx)(v,{name:`zapier`,size:56}),title:`Zapier`}),(0,x.jsx)(ee,{children:t.map(e=>(0,x.jsxs)(d,{hover:!1,children:[(0,x.jsx)(u,{className:`flex items-center gap-3 py-2 pl-3`,children:(0,x.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-center`,children:[(0,x.jsxs)(`div`,{className:`flex shrink-0 flex-nowrap items-center gap-2`,children:[(0,x.jsx)(`img`,{className:`size-8 object-contain dark:invert`,role:`presentation`,src:e.ghostImage}),(0,x.jsx)(m,{className:`size-3`}),(0,x.jsx)(`img`,{className:`size-8 object-contain`,role:`presentation`,src:e.appImage})]}),(0,x.jsx)(`span`,{children:e.title})]})}),(0,x.jsx)(f,{visibility:`hover`,children:(0,x.jsx)(p,{className:`h-auto p-0 font-semibold whitespace-nowrap text-[#FF4A00] hover:text-[#FF4A00]`,variant:`link`,asChild:!0,children:(0,x.jsx)(`a`,{href:e.url,rel:`noopener noreferrer`,target:`_blank`,children:`Use this Zap`})})})]},e.url))})]})}export{me as a,S as c,pe as i,fe as n,ge as o,$ as r,he as s,_e as t};
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-Bb3IsNbi.js";import{t as r}from"./jsx-runtime-DX3WBWVO.js";import{m as i,p as a}from"./hooks-D6EE7BIt.js";import{n as o,o as s,s as c,t as l}from"./use-settings-navigation-BmROPrls.js";import{i as u,n as d,r as f,t as ee}from"./action-list-lGzZLHc8.js";import{Pr as p,ws as m}from"./index-DUXM0NlS.js";import{n as te}from"./confirmation-modal-CYD7x3UQ.js";import{n as ne,t as h}from"./global-data-provider-RzW6Bnlf.js";import{n as re}from"./integrations-BT6_iJvu.js";import{t as ie}from"./api-keys-Dx4NeNpK.js";import{t as g}from"./integration-header-B4DyXV06.js";import{t as _}from"./api-keys-_iCT4dxr.js";import{t as v}from"./brand-icon-09YqFZjV.js";var y=``+new URL(`zapier-logo-D8a11oW_.svg`,import.meta.url).href,b=e(n(),1),x=r(),S=(e,t)=>`${e}-${t}`,C=()=>{let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(!1),i=(0,b.useRef)(new Map),[a,o]=(0,b.useState)(new Set),s=t=>t.length?t.some(t=>t.toLowerCase().includes(e.toLowerCase())):!0,c=(0,b.useCallback)((t,n)=>{i.current.set(t,n),(!e||n.some(t=>t.toLowerCase().includes(e.toLowerCase())))&&o(e=>new Set(e).add(t))},[e]),l=(0,b.useCallback)(e=>{i.current.delete(e),o(t=>{let n=new Set(t);return n.delete(e),n})},[]);(0,b.useEffect)(()=>{let t=new Set;i.current.forEach((n,r)=>{(!e||n.some(t=>t.toLowerCase().includes(e.toLowerCase())))&&t.add(r)}),o(t)},[e]);let u=(0,b.useCallback)(e=>a.size===1&&a.has(e),[a]),d=(0,b.useCallback)(()=>a,[a]),f=t=>{if(!e)return t;if(typeof t==`string`){let n=e.split(/\s+/).map(e=>e.toLowerCase()),r=n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),i=t.split(RegExp(`(${r})`,`gi`)),a=new Map;return i.map(e=>{if(!n.includes(e.toLowerCase()))return e;let t=(a.get(e)??0)+1;return a.set(e,t),(0,x.jsx)(`span`,{className:`bg-yellow-500/40`,children:e},`${e}-${t}`)})}else if(Array.isArray(t))return t.map(e=>f(e));else if(t&&typeof t==`object`&&t)return b.Children.map(t,e=>e&&typeof e==`object`&&`props`in e?f(e.props.children):e);else return t};return{filter:e,setFilter:t,checkVisible:s,highlightKeywords:f,noResult:n,setNoResult:r,registerComponent:c,unregisterComponent:l,getVisibleComponents:d,isOnlyVisibleComponent:u}},w=``+new URL(`Alto-DoS3yH_j.png`,import.meta.url).href,T=``+new URL(`Bulletin-BUpcurG5.png`,import.meta.url).href,E=``+new URL(`Casper-ASA9Ix4v.png`,import.meta.url).href,D=``+new URL(`Dawn-aeEVEPie.png`,import.meta.url).href,O=``+new URL(`Digest-DJl0U_FG.png`,import.meta.url).href,k=``+new URL(`Dope-D_CgP0p0.png`,import.meta.url).href,A=``+new URL(`Ease-B4NuA7sj.png`,import.meta.url).href,j=``+new URL(`Edge-BPZxvKka.png`,import.meta.url).href,M=``+new URL(`Edition-cIDLjlhj.png`,import.meta.url).href,N=``+new URL(`Episode-D7bgV2bY.png`,import.meta.url).href,P=``+new URL(`Headline-BFXOunIb.png`,import.meta.url).href,F=``+new URL(`Journal-D3UW9T2b.png`,import.meta.url).href,I=``+new URL(`London-CSCVHwS0.png`,import.meta.url).href,L=``+new URL(`Ruby-DVEXVMTx.png`,import.meta.url).href,R=``+new URL(`Solo-c-yPo0gw.png`,import.meta.url).href,z=``+new URL(`Source-V-WXZXnS.png`,import.meta.url).href,B=``+new URL(`Source-Magazine-Czq1p0a_.png`,import.meta.url).href,V=``+new URL(`Source-Newsletter-CwTcfhJ-.png`,import.meta.url).href,H=``+new URL(`Taste-U2cRR2yO.png`,import.meta.url).href,U=``+new URL(`Wave-DE2aI-FM.png`,import.meta.url).href,W=[{name:`Source`,category:`News`,previewUrl:`https://source.ghost.io/`,ref:`default`,image:z,variants:[{category:`Magazine`,previewUrl:`https://source-magazine.ghost.io/`,image:B},{category:`Newsletter`,previewUrl:`https://source-newsletter.ghost.io/`,image:V}]},{name:`Casper`,category:`Blog`,previewUrl:`https://demo.ghost.io/`,ref:`TryGhost/Casper`,image:E},{name:`Edition`,category:`Newsletter`,url:`https://github.com/TryGhost/Edition`,previewUrl:`https://edition.ghost.io/`,ref:`TryGhost/Edition`,image:M},{name:`Solo`,category:`Blog`,url:`https://github.com/TryGhost/Solo`,previewUrl:`https://solo.ghost.io`,ref:`TryGhost/Solo`,image:R},{name:`Taste`,category:`Blog`,url:`https://github.com/TryGhost/Taste`,previewUrl:`https://taste.ghost.io`,ref:`TryGhost/Taste`,image:H},{name:`Episode`,category:`Podcast`,url:`https://github.com/TryGhost/Episode`,previewUrl:`https://episode.ghost.io`,ref:`TryGhost/Episode`,image:N},{name:`Digest`,category:`Newsletter`,url:`https://github.com/TryGhost/Digest`,previewUrl:`https://digest.ghost.io/`,ref:`TryGhost/Digest`,image:O},{name:`Bulletin`,category:`Newsletter`,url:`https://github.com/TryGhost/Bulletin`,previewUrl:`https://bulletin.ghost.io/`,ref:`TryGhost/Bulletin`,image:T},{name:`Alto`,category:`Blog`,url:`https://github.com/TryGhost/Alto`,previewUrl:`https://alto.ghost.io`,ref:`TryGhost/Alto`,image:w},{name:`Dope`,category:`Magazine`,url:`https://github.com/TryGhost/Dope`,previewUrl:`https://dope.ghost.io`,ref:`TryGhost/Dope`,image:k},{name:`Wave`,category:`Podcast`,url:`https://github.com/TryGhost/Wave`,previewUrl:`https://wave.ghost.io`,ref:`TryGhost/Wave`,image:U},{name:`Edge`,category:`Photography`,url:`https://github.com/TryGhost/Edge`,previewUrl:`https://edge.ghost.io`,ref:`TryGhost/Edge`,image:j},{name:`Dawn`,category:`Newsletter`,url:`https://github.com/TryGhost/Dawn`,previewUrl:`https://dawn.ghost.io/`,ref:`TryGhost/Dawn`,image:D},{name:`Ease`,category:`Documentation`,url:`https://github.com/TryGhost/Ease`,previewUrl:`https://ease.ghost.io`,ref:`TryGhost/Ease`,image:A},{name:`Headline`,category:`News`,url:`https://github.com/TryGhost/Headline`,previewUrl:`https://headline.ghost.io`,ref:`TryGhost/Headline`,image:P},{name:`Ruby`,category:`Magazine`,url:`https://github.com/TryGhost/Ruby`,previewUrl:`https://ruby.ghost.io`,ref:`TryGhost/Ruby`,image:L},{name:`London`,category:`Photography`,url:`https://github.com/TryGhost/London`,previewUrl:`https://london.ghost.io`,ref:`TryGhost/London`,image:I},{name:`Journal`,category:`Newsletter`,url:`https://github.com/TryGhost/Journal`,previewUrl:`https://journal.ghost.io/`,ref:`TryGhost/Journal`,image:F}],G=``+new URL(`orb-black-1-bYPPSSAp.png`,import.meta.url).href,ae=``+new URL(`orb-black-2-C-rcujeh.png`,import.meta.url).href,K=``+new URL(`orb-black-3-DTkwRv_1.png`,import.meta.url).href,q=``+new URL(`orb-black-4-BXF3fMuE.png`,import.meta.url).href,J=``+new URL(`orb-black-5-94Eda1ek.png`,import.meta.url).href,oe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201818.2%202500'%20style='enable-background:new%200%200%201818.2%202500'%20xml:space='preserve'%3e%3ctitle%3egoogle-docs%3c/title%3e%3cpath%20d='M1136.4%200h-966C79.6%200%200%2079.5%200%20170.5v2159.1c0%2090.9%2079.5%20170.5%20170.5%20170.5h1477.3c90.9%200%20170.5-79.5%20170.5-170.5V681.8l-397.7-284.1L1136.4%200z'%20style='fill:%234285f4'/%3e%3cpath%20d='M454.5%201818.2h909.1v-113.6h-909l-.1%20113.6zm0%20227.3h681.8v-113.6H454.5v113.6zm0-795.5v113.6h909.1V1250H454.5zm0%20340.9h909.1v-113.6h-909l-.1%20113.6z'%20style='fill:%23f1f1f1'/%3e%3cpath%20d='M1136.4%200v511.4c0%2090.9%2079.5%20170.4%20170.4%20170.4h511.4L1136.4%200z'%20style='fill:%23a1c2fa'/%3e%3c/svg%3e`,se=``+new URL(`mailchimp-DwTEN-tS.svg`,import.meta.url).href,ce=`data:image/svg+xml,%3csvg%20height='546'%20viewBox='0%200%20569%20546'%20width='569'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3epatreon%3c/title%3e%3cg%20fill='%23FF424D'%3e%3ccircle%20cx='362.59'%20cy='204.59'%20data-fill='1'%20r='204.59'/%3e%3cpath%20data-fill='1'%20d='M0%200h100v545.8H0z'/%3e%3c/g%3e%3c/svg%3e`,Y=`data:image/svg+xml,%3csvg%20width='152'%20height='179'%20viewBox='0%200%20152%20179'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3epaypal%3c/title%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M136.492%2045.453c2.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27l-2.365%2015a4.168%204.168%200%200%200%204.118%204.818H69.76a6.948%206.948%200%200%200%206.863-5.865l.283-1.468%205.442-34.507.351-1.907a6.947%206.947%200%200%201%206.862-5.865h4.322c27.984%200%2049.896-11.37%2056.299-44.25%202.675-13.74%201.292-25.208-5.783-33.27-2.14-2.439-4.802-4.455-7.907-6.1'%20fill='%23238EC2'/%3e%3cpath%20d='M136.492%2045.453c2.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27l8.609-54.588-.267%201.711c.609-3.86%203.909-6.704%207.817-6.704h16.288c31.989%200%2057.037-12.996%2064.356-50.582.217-1.113.402-2.191.568-3.251'%20fill='%2320274F'/%3e%3cpath%20d='M56.978%2045.638a6.945%206.945%200%200%201%206.863-5.866h43.514c5.155%200%209.961.337%2014.356%201.045%201.256.202%202.478.435%203.665.698a53.92%2053.92%200%200%201%203.455.885c.558.162%201.106.333%201.646.512%202.157.717%204.166%201.562%206.015%202.541%202.179-13.894-.015-23.348-7.53-31.911C120.688%204.114%20105.741.075%2086.617.075H31.105a7.943%207.943%200%200%200-7.846%206.705L.144%20153.36a4.765%204.765%200%200%200%204.707%205.507h34.27L56.978%2045.638'%20fill='%23253667'/%3e%3c/g%3e%3c/svg%3e`,le=``+new URL(`slackicon-37ETtpm7.png`,import.meta.url).href,ue=`data:image/svg+xml,%3csvg%20width='86'%20height='89'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3etypeform%3c/title%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M40.28%2087.561c12.464.154%2021.16-3.994%2030.135-12.175%208.975-8.18%2014.306-16.867%2014.741-28.73.436-11.862-3.412-21.43-12.564-30.581C63.441%206.923%2051.64.9%2039.4.899%2027.158.898%2018.967%206.252%2011.385%2016.07c-7.581%209.818-9.237%2022.212-9.894%2033.921-.657%2011.71-1.15%2017.111%206.608%2024.625%207.758%207.514%2019.718%2012.791%2032.182%2012.945z'%20stroke='%23262627'/%3e%3cpath%20d='M29.136%2037.976v-4.885h25.918v4.885H44.679v27.998H39.51V37.976z'%20fill='%23262627'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e`,de=``+new URL(`zero-bounce-lzY95s9E.png`,import.meta.url).href,X=[{ghostImage:ae,appImage:le,title:`Share scheduled posts with your team in Slack`,url:`https://zapier.com/webintent/create-zap?template=359499`},{ghostImage:K,appImage:ce,title:`Connect Patreon to your Ghost membership site`,url:`https://zapier.com/webintent/create-zap?template=75801`},{ghostImage:q,appImage:de,title:`Protect email delivery with email verification`,url:`https://zapier.com/webintent/create-zap?template=359415`},{ghostImage:J,appImage:Y,title:`Add members for successful sales in PayPal`,url:`https://zapier.com/webintent/create-zap?template=184423`},{ghostImage:K,appImage:Y,title:`Unsubscribe members who cancel a subscription in PayPal`,url:`https://zapier.com/webintent/create-zap?template=359348`},{ghostImage:G,appImage:oe,title:`Send new post drafts from Google Docs to Ghost`,url:`https://zapier.com/webintent/create-zap?template=50924`},{ghostImage:q,appImage:ue,title:`Survey new members using Typeform`,url:`https://zapier.com/webintent/create-zap?template=359407`},{ghostImage:G,appImage:se,title:`Sync email subscribers in Ghost + Mailchimp`,url:`https://zapier.com/webintent/create-zap?template=359342`}],Z=(0,b.createContext)({officialThemes:W,zapierTemplates:X,search:{filter:``,setFilter:()=>{},checkVisible:()=>!0,highlightKeywords:()=>``,noResult:!1,setNoResult:()=>{},registerComponent:()=>{},unregisterComponent:()=>{},getVisibleComponents:()=>new Set,isOnlyVisibleComponent:()=>!1},sortingState:[],offersShowArchived:!1,setOffersShowArchived:()=>{}}),fe=({children:e,...t})=>{let n=C(),[r,i]=(0,b.useState)([{type:`offers`,option:`date-added`,direction:`desc`}]),[a,s]=(0,b.useState)(!1);return(0,x.jsx)(Z.Provider,{value:{officialThemes:W,zapierTemplates:X,...t,search:n,sortingState:r,setSortingState:i,offersShowArchived:a,setOffersShowArchived:s},children:(0,x.jsx)(h,{children:(0,x.jsx)(o,{children:e})})})},Q=()=>(0,b.useContext)(Z),pe=()=>Q().officialThemes,me=()=>Q().search,he=()=>Q().upgradeStatus,ge=()=>{let{sortingState:e,setSortingState:t}=Q();return{sortingState:e,setSortingState:t}},$=()=>{let{offersShowArchived:e,setOffersShowArchived:t}=Q();return{offersShowArchived:e,setOffersShowArchived:t}},_e=t({default:()=>ve});function ve(){let{updateRoute:e}=l(),{zapierTemplates:t}=Q(),{data:{integrations:n}={integrations:[]}}=re(),{config:r}=ne(),{mutateAsync:o}=_(),h=i(),[S,C]=(0,b.useState)(!1),w=r.hostSettings?.limits?.customIntegrations?.disabled,T=n.find(({slug:e})=>e===`zapier`),E=T?.api_keys?.find(e=>e.type===`admin`);return(0,b.useEffect)(()=>{w&&e(`integrations`)},[w,e]),(0,x.jsxs)(s,{cancelLabel:``,footer:(0,x.jsxs)(`div`,{className:`mx-8 flex w-full items-center justify-between`,children:[(0,x.jsxs)(`a`,{className:`mt-1 self-baseline font-bold`,href:`https://zapier.com/apps/ghost/integrations?utm_medium=partner_api&utm_source=widget&utm_campaign=Widget`,rel:`noopener noreferrer`,target:`_blank`,children:[`View more Ghost integrations powered by `,(0,x.jsx)(`span`,{children:(0,x.jsx)(`img`,{alt:`Zapier`,className:`relative top-[-2px] inline-block`,src:y})})]}),(0,x.jsx)(p,{type:`button`,onClick:()=>{e(`integrations`)},children:`Close`})]}),okLabel:`Close`,okVariant:`default`,testId:`zapier-modal`,title:``,stickyFooter:!0,onClose:()=>{e(`integrations`)},onOk:()=>{e(`integrations`)},children:[(0,x.jsx)(g,{detail:`Automation for your favorite apps`,extra:(0,x.jsx)(`div`,{className:`mt-1 -mb-4`,children:(0,x.jsx)(ie,{keys:[{id:`admin-api-key`,label:`Admin API key`,text:E?.secret,hint:S?(0,x.jsx)(`div`,{className:`text-green`,children:`Admin API Key was successfully regenerated`}):void 0,onRegenerate:()=>{!T||!E||(C(!1),c.show(te,{title:`Regenerate Admin API Key`,prompt:`You will need to locate the Ghost App within your Zapier account and click on "Reconnect" to enter the new Admin API Key.`,okLabel:`Regenerate Admin API Key`,onOk:async e=>{try{await o({integrationId:T.id,apiKeyId:E.id}),C(!0),e?.remove()}catch(e){h(e)}}}))}},{id:`api-url`,label:`API URL`,text:window.location.origin+a().subdir}]})}),icon:(0,x.jsx)(v,{name:`zapier`,size:56}),title:`Zapier`}),(0,x.jsx)(ee,{children:t.map(e=>(0,x.jsxs)(d,{hover:!1,children:[(0,x.jsx)(u,{className:`flex items-center gap-3 py-2 pl-3`,children:(0,x.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-center`,children:[(0,x.jsxs)(`div`,{className:`flex shrink-0 flex-nowrap items-center gap-2`,children:[(0,x.jsx)(`img`,{className:`size-8 object-contain dark:invert`,role:`presentation`,src:e.ghostImage}),(0,x.jsx)(m,{className:`size-3`}),(0,x.jsx)(`img`,{className:`size-8 object-contain`,role:`presentation`,src:e.appImage})]}),(0,x.jsx)(`span`,{children:e.title})]})}),(0,x.jsx)(f,{visibility:`hover`,children:(0,x.jsx)(p,{className:`h-auto p-0 font-semibold whitespace-nowrap text-[#FF4A00] hover:text-[#FF4A00]`,variant:`link`,asChild:!0,children:(0,x.jsx)(`a`,{href:e.url,rel:`noopener noreferrer`,target:`_blank`,children:`Use this Zap`})})})]},e.url))})]})}export{me as a,S as c,pe as i,fe as n,ge as o,$ as r,he as s,_e as t};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<link rel="stylesheet" href="./assets/vendor-3bf602dfa6463c3400ffd81697767274.css">
|
|
5
5
|
<link rel="stylesheet" href="./assets/ghost-d38c30b866e59f2e06a357b5eb844fe5.css">
|
|
6
|
-
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%226.57%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%
|
|
6
|
+
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%226.57%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%224b6e329268%22%2C%22activitypubFilename%22%3A%22activitypub.js%22%2C%22activitypubHash%22%3A%223ebde9a6a0%22%2C%22activitypubRemoteConfigUrl%22%3A%22%2F.ghost%2Factivitypub%2Fstable%2Fclient-config%22%7D">
|
|
7
7
|
|
|
8
8
|
<meta charset="UTF-8" />
|
|
9
9
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<link rel="shortcut icon" href="./assets/favicon-C_q1KHzv.ico" />
|
|
22
22
|
<link rel="apple-touch-icon" href="./assets/apple-touch-icon-DhO18_4B.png" />
|
|
23
|
-
<script type="module" crossorigin src="./assets/index-
|
|
23
|
+
<script type="module" crossorigin src="./assets/index-DUXM0NlS.js"></script>
|
|
24
24
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-DAXXjFlN.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="./assets/react-Bb3IsNbi.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-DX3WBWVO.js">
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
<div id="ember-liquid-wormhole"></div>
|
|
64
64
|
<div id="ember-notifications-wormhole"></div>
|
|
65
65
|
<script src="./assets/vendor-25f0bb2b2de85265afdf33da79f14a44.js"></script>
|
|
66
|
-
<script src="./assets/chunk.
|
|
67
|
-
<script src="./assets/chunk.
|
|
68
|
-
<script src="./assets/chunk.524.
|
|
66
|
+
<script src="./assets/chunk.571.40f093ed6d883993714e.js"></script>
|
|
67
|
+
<script src="./assets/chunk.424.4a27628efdade15c2dab.js"></script>
|
|
68
|
+
<script src="./assets/chunk.524.dce1c51e0bc30fb2718e.js"></script>
|
|
69
69
|
<script src="./assets/ghost-d683fbeb945b13155ea669caa5d8db41.js"></script>
|
|
70
70
|
</body>
|
|
71
71
|
</html>
|
|
@@ -135,7 +135,7 @@ function getCleanRedirectUrl(req) {
|
|
|
135
135
|
currentUrl.searchParams.delete(QUERY_PARAM);
|
|
136
136
|
currentUrl.searchParams.delete(HIDE_QUERY_PARAM);
|
|
137
137
|
|
|
138
|
-
return `${currentUrl.pathname}${currentUrl.search}${currentUrl.hash}`;
|
|
138
|
+
return `${urlUtils.createUrl(currentUrl.pathname)}${currentUrl.search}${currentUrl.hash}`;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
function getQueryValue(value) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Security considerations:
|
|
11
11
|
* - Only serves keys that exactly match the configured key
|
|
12
12
|
* - Only responds to 32-character hex patterns (valid IndexNow key format)
|
|
13
|
-
* - Returns 404 (via next()) if
|
|
13
|
+
* - Returns 404 (via next()) if no key is configured
|
|
14
14
|
*
|
|
15
15
|
* Route collision note:
|
|
16
16
|
* The pattern /[a-f0-9]{32}.txt is unlikely to collide with user content
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
const settingsCache = require('../../../shared/settings-cache');
|
|
26
|
-
const labs = require('../../../shared/labs');
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* Middleware to serve the IndexNow API key verification file
|
|
@@ -34,11 +33,6 @@ function serveIndexNowKey(req, res, next) {
|
|
|
34
33
|
return next();
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
// Check if IndexNow is enabled
|
|
38
|
-
if (!labs.isSet('indexnow')) {
|
|
39
|
-
return next();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
36
|
const apiKey = settingsCache.get('indexnow_api_key');
|
|
43
37
|
|
|
44
38
|
// No key configured
|
|
@@ -316,8 +316,8 @@ module.exports = {
|
|
|
316
316
|
return apiFramework.pipeline(require('./gift-links'), localUtils);
|
|
317
317
|
},
|
|
318
318
|
|
|
319
|
-
get
|
|
320
|
-
return apiFramework.pipeline(require('./
|
|
319
|
+
get gifts() {
|
|
320
|
+
return apiFramework.pipeline(require('./gifts'), localUtils);
|
|
321
321
|
},
|
|
322
322
|
|
|
323
323
|
get recommendationsPublic() {
|
|
@@ -106,6 +106,9 @@ const controller = {
|
|
|
106
106
|
headers: {
|
|
107
107
|
cacheInvalidate: false
|
|
108
108
|
},
|
|
109
|
+
options: [
|
|
110
|
+
'copy_settings_from'
|
|
111
|
+
],
|
|
109
112
|
permissions: {
|
|
110
113
|
method: 'add'
|
|
111
114
|
},
|
|
@@ -123,7 +126,9 @@ const controller = {
|
|
|
123
126
|
name: frame.file.originalname
|
|
124
127
|
};
|
|
125
128
|
|
|
126
|
-
const {theme, themeOverridden} = await themeService.api.setFromZip(zip
|
|
129
|
+
const {theme, themeOverridden} = await themeService.api.setFromZip(zip, {
|
|
130
|
+
copySettingsFrom: frame.options.copy_settings_from
|
|
131
|
+
});
|
|
127
132
|
if (themeOverridden) {
|
|
128
133
|
frame.setHeader('X-Cache-Invalidate', '/*');
|
|
129
134
|
}
|
|
@@ -96,11 +96,13 @@ module.exports = function (Bookshelf) {
|
|
|
96
96
|
(value, key) => key.startsWith(PIVOT_PREFIX)
|
|
97
97
|
);
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
// Iterate `_previousRelations` rather than `relationships` — a relation
|
|
100
|
+
// can carry previous state without being managed by bookshelf-relations
|
|
101
|
+
// (e.g. a member's stripeSubscriptions). Behaviour is unchanged for
|
|
102
|
+
// relations that are in both.
|
|
103
|
+
if (this._previousRelations) {
|
|
104
|
+
Object.keys(this._previousRelations).forEach((relation) => {
|
|
105
|
+
clonedModel.related(relation).models = this._previousRelations[relation].models;
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
108
|
|
|
@@ -4,21 +4,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.adapterPaths = void 0;
|
|
7
|
+
exports.buildAdapterPaths = buildAdapterPaths;
|
|
7
8
|
const config_1 = __importDefault(require("../../../shared/config"));
|
|
8
9
|
/**
|
|
9
10
|
* Where adapters are looked up, in order. Also read by bin/validate-adapters.ts,
|
|
10
11
|
* which checks adapter implementations at build time - keep this the only place
|
|
11
12
|
* the lookup order is declared, so a name resolves there exactly as it does here.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
function buildAdapterPaths(configInstance) {
|
|
15
|
+
return Array.from(new Set([
|
|
16
|
+
'', // A blank path will cause us to check node_modules for the adapter
|
|
17
|
+
configInstance.get('paths').internalAdaptersPath,
|
|
18
|
+
// custom docker builds may install adapters in a separate path from content,
|
|
19
|
+
// since the content dir is often bind-mounted into the container. Offering
|
|
20
|
+
// an escape hatch here to allow for this
|
|
21
|
+
configInstance.get('paths').installedAdaptersPath ?? '',
|
|
22
|
+
// load adapters from content last, so that they don't override any other
|
|
23
|
+
// internal or platform-installed adapters
|
|
24
|
+
// TODO: potentially deprecate/remove as part of Ghost 7.0
|
|
25
|
+
configInstance.getContentPath('adapters')
|
|
26
|
+
]));
|
|
27
|
+
}
|
|
28
|
+
exports.adapterPaths = buildAdapterPaths(config_1.default);
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import config from '../../../shared/config';
|
|
2
|
+
import type {ConfigInstance} from '../../../shared/config/loader';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Where adapters are looked up, in order. Also read by bin/validate-adapters.ts,
|
|
5
6
|
* which checks adapter implementations at build time - keep this the only place
|
|
6
7
|
* the lookup order is declared, so a name resolves there exactly as it does here.
|
|
7
8
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export function buildAdapterPaths(configInstance: ConfigInstance): string[] {
|
|
10
|
+
return Array.from(new Set<string>([
|
|
11
|
+
'', // A blank path will cause us to check node_modules for the adapter
|
|
12
|
+
configInstance.get('paths').internalAdaptersPath,
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// custom docker builds may install adapters in a separate path from content,
|
|
15
|
+
// since the content dir is often bind-mounted into the container. Offering
|
|
16
|
+
// an escape hatch here to allow for this
|
|
17
|
+
configInstance.get('paths').installedAdaptersPath ?? '',
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]));
|
|
19
|
+
// load adapters from content last, so that they don't override any other
|
|
20
|
+
// internal or platform-installed adapters
|
|
21
|
+
// TODO: potentially deprecate/remove as part of Ghost 7.0
|
|
22
|
+
configInstance.getContentPath('adapters')
|
|
23
|
+
]));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const adapterPaths: string[] = buildAdapterPaths(config);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const Feedback = require('./feedback');
|
|
2
2
|
const errors = require('@tryghost/errors');
|
|
3
|
+
const permissions = require('../../services/permissions');
|
|
3
4
|
const tpl = require('@tryghost/tpl');
|
|
4
5
|
|
|
5
6
|
const messages = {
|
|
@@ -118,7 +119,8 @@ class AudienceFeedbackController {
|
|
|
118
119
|
const postId = frame.data.id;
|
|
119
120
|
const options = {
|
|
120
121
|
limit: frame.options.limit || 10,
|
|
121
|
-
page: frame.options.page || 1
|
|
122
|
+
page: frame.options.page || 1,
|
|
123
|
+
withMember: false
|
|
122
124
|
};
|
|
123
125
|
|
|
124
126
|
// Add score filter if specified
|
|
@@ -126,6 +128,13 @@ class AudienceFeedbackController {
|
|
|
126
128
|
options.score = parseInt(frame.options.score);
|
|
127
129
|
}
|
|
128
130
|
|
|
131
|
+
try {
|
|
132
|
+
await permissions.canThis(frame.options.context).browse.member();
|
|
133
|
+
options.withMember = true;
|
|
134
|
+
} catch {
|
|
135
|
+
// permissions throws; we want to return data but without member info
|
|
136
|
+
}
|
|
137
|
+
|
|
129
138
|
const result = await this.#repository.getForPost(postId, options);
|
|
130
139
|
return result;
|
|
131
140
|
}
|
|
@@ -76,10 +76,13 @@ module.exports = class FeedbackRepository {
|
|
|
76
76
|
limit: options.limit || 10,
|
|
77
77
|
page: options.page || 1,
|
|
78
78
|
order: 'created_at DESC',
|
|
79
|
-
withRelated: ['member'],
|
|
80
79
|
filter: filter
|
|
81
80
|
};
|
|
82
81
|
|
|
82
|
+
if (options.withMember) {
|
|
83
|
+
findOptions.withRelated = ['member'];
|
|
84
|
+
}
|
|
85
|
+
|
|
83
86
|
// Use findPage with filter
|
|
84
87
|
const results = await this.#MemberFeedback.findPage(findOptions);
|
|
85
88
|
|
|
@@ -26,6 +26,7 @@ const AUTH_CODE_CHALLENGE_BYTES = 16;
|
|
|
26
26
|
* @prop {string} user_agent
|
|
27
27
|
* @prop {string} ip
|
|
28
28
|
* @prop {boolean} verified
|
|
29
|
+
* @prop {string} [verified_user_id]
|
|
29
30
|
* @prop {string} [auth_code_challenge]
|
|
30
31
|
* @prop {number} [auth_code_generated_at]
|
|
31
32
|
*/
|
|
@@ -190,12 +191,14 @@ module.exports = function createSessionService({
|
|
|
190
191
|
|
|
191
192
|
if (isAuthCodeVerified) {
|
|
192
193
|
session.verified = true;
|
|
194
|
+
session.verified_user_id = user.id;
|
|
193
195
|
invalidateAuthCodeChallenge(session);
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
if (isStaffDeviceVerificationDisabled()) {
|
|
198
200
|
session.verified = true;
|
|
201
|
+
session.verified_user_id = user.id;
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
|
|
@@ -214,6 +217,7 @@ module.exports = function createSessionService({
|
|
|
214
217
|
const {
|
|
215
218
|
user_id: previousUserId,
|
|
216
219
|
verified: previousVerified,
|
|
220
|
+
verified_user_id: previousVerifiedUserId,
|
|
217
221
|
auth_code_challenge: previousAuthCodeChallenge,
|
|
218
222
|
auth_code_generated_at: previousAuthCodeGeneratedAt
|
|
219
223
|
} = previousSession;
|
|
@@ -231,8 +235,11 @@ module.exports = function createSessionService({
|
|
|
231
235
|
|
|
232
236
|
const session = req.session;
|
|
233
237
|
session.user_id = previousUserId;
|
|
234
|
-
//
|
|
235
|
-
|
|
238
|
+
// Verification is bound to the user who completed it — any other user
|
|
239
|
+
// (including sessions with no verified_user_id) must verify again
|
|
240
|
+
const carryVerification = previousVerified === true && previousVerifiedUserId === user.id;
|
|
241
|
+
session.verified = carryVerification ? true : undefined;
|
|
242
|
+
session.verified_user_id = carryVerification ? previousVerifiedUserId : undefined;
|
|
236
243
|
session.auth_code_challenge = previousAuthCodeChallenge;
|
|
237
244
|
session.auth_code_generated_at = previousAuthCodeGeneratedAt;
|
|
238
245
|
|
|
@@ -282,6 +289,7 @@ module.exports = function createSessionService({
|
|
|
282
289
|
});
|
|
283
290
|
|
|
284
291
|
session.verified = true;
|
|
292
|
+
session.verified_user_id = user.id;
|
|
285
293
|
invalidateAuthCodeChallenge(session);
|
|
286
294
|
}
|
|
287
295
|
|
|
@@ -480,6 +488,7 @@ module.exports = function createSessionService({
|
|
|
480
488
|
async function verifySession(req, res) {
|
|
481
489
|
const session = await getSession(req, res);
|
|
482
490
|
session.verified = true;
|
|
491
|
+
session.verified_user_id = session.user_id;
|
|
483
492
|
invalidateAuthCodeChallenge(session);
|
|
484
493
|
}
|
|
485
494
|
|
|
@@ -491,7 +500,12 @@ module.exports = function createSessionService({
|
|
|
491
500
|
*/
|
|
492
501
|
async function isVerifiedSession(req, res) {
|
|
493
502
|
const session = await getSession(req, res);
|
|
494
|
-
|
|
503
|
+
// Verification is bound to a user; a session with no verified_user_id
|
|
504
|
+
// (e.g. logged out, or predating this field) fails closed rather than
|
|
505
|
+
// matching an absent user_id via undefined === undefined
|
|
506
|
+
return session.verified === true &&
|
|
507
|
+
!!session.verified_user_id &&
|
|
508
|
+
session.verified_user_id === session.user_id;
|
|
495
509
|
}
|
|
496
510
|
|
|
497
511
|
/**
|
|
@@ -506,6 +520,7 @@ module.exports = function createSessionService({
|
|
|
506
520
|
|
|
507
521
|
if (isVerificationRequired()) {
|
|
508
522
|
session.verified = undefined;
|
|
523
|
+
session.verified_user_id = undefined;
|
|
509
524
|
}
|
|
510
525
|
|
|
511
526
|
invalidateAuthCodeChallenge(session);
|
|
@@ -465,13 +465,13 @@ async function findNextPendingReadyAt(trx, staleLockCutoff) {
|
|
|
465
465
|
})
|
|
466
466
|
.orderBy('ready_at')
|
|
467
467
|
.first();
|
|
468
|
-
return row?.next_ready_at ?
|
|
468
|
+
return row?.next_ready_at ? (0, database_date_1.fromDatabaseDate)(row.next_ready_at) : null;
|
|
469
469
|
}
|
|
470
470
|
function buildStepToRun(row) {
|
|
471
471
|
const base = {
|
|
472
472
|
id: row.id,
|
|
473
473
|
step_attempts: row.step_attempts,
|
|
474
|
-
ready_at:
|
|
474
|
+
ready_at: (0, database_date_1.fromDatabaseDate)(row.ready_at),
|
|
475
475
|
locked_by: row.locked_by,
|
|
476
476
|
automation_run_id: row.automation_run_id,
|
|
477
477
|
automation_id: row.automation_id,
|
|
@@ -897,8 +897,8 @@ function getNextRevisionCreatedAt(latestCreatedAt, requestedCreatedAt) {
|
|
|
897
897
|
if (!latestCreatedAt) {
|
|
898
898
|
return (0, database_date_1.toDatabaseDate)(requestedCreatedAt);
|
|
899
899
|
}
|
|
900
|
-
const requestedTime =
|
|
901
|
-
const latestTime =
|
|
900
|
+
const requestedTime = (0, database_date_1.fromDatabaseDate)(requestedCreatedAt).getTime();
|
|
901
|
+
const latestTime = (0, database_date_1.fromDatabaseDate)(latestCreatedAt).getTime();
|
|
902
902
|
if (requestedTime > latestTime) {
|
|
903
903
|
return (0, database_date_1.toDatabaseDate)(requestedCreatedAt);
|
|
904
904
|
}
|
|
@@ -979,7 +979,7 @@ function buildAutomationSummary(automation) {
|
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
981
|
function serializeDate(date) {
|
|
982
|
-
const normalizedDate =
|
|
982
|
+
const normalizedDate = (0, database_date_1.fromDatabaseDate)(date);
|
|
983
983
|
normalizedDate.setMilliseconds(0);
|
|
984
984
|
return normalizedDate.toISOString();
|
|
985
985
|
}
|
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
EditAutomationData,
|
|
22
22
|
Page
|
|
23
23
|
} from './automations-repository';
|
|
24
|
-
import {toDatabaseDate} from './database-date';
|
|
24
|
+
import {fromDatabaseDate, toDatabaseDate, type DatabaseDate} from './database-date';
|
|
25
25
|
import {getStaleLockCutoff} from './stale-lock-cutoff';
|
|
26
26
|
import type {ExclusifyUnion, ReadonlyDeep} from 'type-fest';
|
|
27
27
|
|
|
@@ -48,8 +48,8 @@ interface AutomationRow {
|
|
|
48
48
|
slug: string;
|
|
49
49
|
name: string;
|
|
50
50
|
status: string;
|
|
51
|
-
created_at:
|
|
52
|
-
updated_at:
|
|
51
|
+
created_at: DatabaseDate;
|
|
52
|
+
updated_at: DatabaseDate;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
|
|
@@ -76,7 +76,7 @@ type ActionLinkRow = {
|
|
|
76
76
|
|
|
77
77
|
type ActionRevisionRow = {
|
|
78
78
|
action_id: string;
|
|
79
|
-
created_at:
|
|
79
|
+
created_at: DatabaseDate;
|
|
80
80
|
wait_hours: number | null;
|
|
81
81
|
email_subject: string | null;
|
|
82
82
|
email_lexical: string | null;
|
|
@@ -108,7 +108,7 @@ type StepToRunRow = {
|
|
|
108
108
|
action_id: string;
|
|
109
109
|
automation_action_revision_id: string;
|
|
110
110
|
type: string;
|
|
111
|
-
ready_at:
|
|
111
|
+
ready_at: DatabaseDate;
|
|
112
112
|
step_attempts: number;
|
|
113
113
|
wait_hours: number | null;
|
|
114
114
|
email_subject: string | null;
|
|
@@ -709,14 +709,14 @@ async function findNextPendingReadyAt(trx: Knex.Transaction, staleLockCutoff: Re
|
|
|
709
709
|
})
|
|
710
710
|
.orderBy('ready_at')
|
|
711
711
|
.first();
|
|
712
|
-
return row?.next_ready_at ?
|
|
712
|
+
return row?.next_ready_at ? fromDatabaseDate(row.next_ready_at) : null;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
function buildStepToRun(row: ReadonlyDeep<StepToRunRow>): AutomationStepToRun {
|
|
716
716
|
const base = {
|
|
717
717
|
id: row.id,
|
|
718
718
|
step_attempts: row.step_attempts,
|
|
719
|
-
ready_at:
|
|
719
|
+
ready_at: fromDatabaseDate(row.ready_at),
|
|
720
720
|
locked_by: row.locked_by,
|
|
721
721
|
automation_run_id: row.automation_run_id,
|
|
722
722
|
automation_id: row.automation_id,
|
|
@@ -1259,13 +1259,13 @@ async function insertActionRevisions(
|
|
|
1259
1259
|
);
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
function getNextRevisionCreatedAt(latestCreatedAt:
|
|
1262
|
+
function getNextRevisionCreatedAt(latestCreatedAt: DatabaseDate | null, requestedCreatedAt: string) {
|
|
1263
1263
|
if (!latestCreatedAt) {
|
|
1264
1264
|
return toDatabaseDate(requestedCreatedAt);
|
|
1265
1265
|
}
|
|
1266
1266
|
|
|
1267
|
-
const requestedTime =
|
|
1268
|
-
const latestTime =
|
|
1267
|
+
const requestedTime = fromDatabaseDate(requestedCreatedAt).getTime();
|
|
1268
|
+
const latestTime = fromDatabaseDate(latestCreatedAt).getTime();
|
|
1269
1269
|
|
|
1270
1270
|
if (requestedTime > latestTime) {
|
|
1271
1271
|
return toDatabaseDate(requestedCreatedAt);
|
|
@@ -1355,8 +1355,8 @@ function buildAutomationSummary(automation: AutomationRow): AutomationSummary {
|
|
|
1355
1355
|
};
|
|
1356
1356
|
}
|
|
1357
1357
|
|
|
1358
|
-
function serializeDate(date:
|
|
1359
|
-
const normalizedDate =
|
|
1358
|
+
function serializeDate(date: DatabaseDate) {
|
|
1359
|
+
const normalizedDate = fromDatabaseDate(date);
|
|
1360
1360
|
normalizedDate.setMilliseconds(0);
|
|
1361
1361
|
return normalizedDate.toISOString();
|
|
1362
1362
|
}
|
|
@@ -1,10 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toDatabaseDate = void 0;
|
|
39
|
+
exports.fromDatabaseDate = exports.toDatabaseDate = exports.DATABASE_DATE_FORMAT = void 0;
|
|
7
40
|
const moment_1 = __importDefault(require("moment"));
|
|
8
|
-
const
|
|
9
|
-
|
|
41
|
+
const errors = __importStar(require("@tryghost/errors"));
|
|
42
|
+
exports.DATABASE_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
43
|
+
const toDatabaseDate = (date) => moment_1.default.utc(date).format(exports.DATABASE_DATE_FORMAT);
|
|
10
44
|
exports.toDatabaseDate = toDatabaseDate;
|
|
45
|
+
const fromDatabaseDate = (date) => {
|
|
46
|
+
if (date instanceof Date) {
|
|
47
|
+
return new Date(date);
|
|
48
|
+
}
|
|
49
|
+
if (typeof date === 'string') {
|
|
50
|
+
return moment_1.default.utc(date, exports.DATABASE_DATE_FORMAT).toDate();
|
|
51
|
+
}
|
|
52
|
+
// Defense-in-depth for legacy SQLite rows stored as epoch milliseconds.
|
|
53
|
+
if (typeof date === 'number') {
|
|
54
|
+
return moment_1.default.utc(date).toDate();
|
|
55
|
+
}
|
|
56
|
+
const exhaustive = date;
|
|
57
|
+
throw new errors.InternalServerError({ message: `Unexpected type for database date: ${exhaustive}` });
|
|
58
|
+
};
|
|
59
|
+
exports.fromDatabaseDate = fromDatabaseDate;
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
+
import * as errors from '@tryghost/errors';
|
|
2
3
|
|
|
3
|
-
const DATABASE_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
4
|
+
export const DATABASE_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
4
5
|
|
|
5
|
-
export
|
|
6
|
+
export type DatabaseDate = Date | string | number;
|
|
7
|
+
|
|
8
|
+
export const toDatabaseDate = (date: Date | string): string => moment.utc(date).format(DATABASE_DATE_FORMAT);
|
|
9
|
+
|
|
10
|
+
export const fromDatabaseDate = (date: DatabaseDate): Date => {
|
|
11
|
+
if (date instanceof Date) {
|
|
12
|
+
return new Date(date);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (typeof date === 'string') {
|
|
16
|
+
return moment.utc(date, DATABASE_DATE_FORMAT).toDate();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Defense-in-depth for legacy SQLite rows stored as epoch milliseconds.
|
|
20
|
+
if (typeof date === 'number') {
|
|
21
|
+
return moment.utc(date).toDate();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const exhaustive: never = date;
|
|
25
|
+
throw new errors.InternalServerError({message: `Unexpected type for database date: ${exhaustive}`});
|
|
26
|
+
};
|
|
@@ -49,7 +49,7 @@ class EmailAnalyticsServiceWrapper {
|
|
|
49
49
|
const EmailAnalyticsService = require('./email-analytics-service');
|
|
50
50
|
const MailgunProvider = require('./email-analytics-provider-mailgun');
|
|
51
51
|
const settings = require('../../../shared/settings-cache');
|
|
52
|
-
const queries = require('./lib/queries');
|
|
52
|
+
const {queries} = require('./lib/queries');
|
|
53
53
|
|
|
54
54
|
this.service = new EmailAnalyticsService({
|
|
55
55
|
provider: new MailgunProvider({config, settings, tags: mailgunTags}),
|