strapi-cache 1.5.9 → 1.6.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/_chunks/de-B3bklY17.js +20 -0
- package/dist/_chunks/de-B3bklY17.js.map +1 -0
- package/dist/_chunks/de-BABI25Ju.js +18 -0
- package/dist/_chunks/de-BABI25Ju.js.map +1 -0
- package/dist/_chunks/{de-OlWEMza0.mjs → de-BqbJpOC1.mjs} +5 -1
- package/dist/_chunks/de-BqbJpOC1.mjs.map +1 -0
- package/dist/_chunks/de-Bsdys7gT.js +21 -0
- package/dist/_chunks/de-Bsdys7gT.js.map +1 -0
- package/dist/_chunks/de-CFwEGVkz.js +18 -0
- package/dist/_chunks/de-CFwEGVkz.js.map +1 -0
- package/dist/_chunks/de-CVfl6O3x.mjs +20 -0
- package/dist/_chunks/de-CVfl6O3x.mjs.map +1 -0
- package/dist/_chunks/de-CWKnuP52.js +21 -0
- package/dist/_chunks/de-CWKnuP52.js.map +1 -0
- package/dist/_chunks/de-DTmDEg-O.mjs +21 -0
- package/dist/_chunks/de-DTmDEg-O.mjs.map +1 -0
- package/dist/_chunks/de-Ddj7dv1L.mjs +21 -0
- package/dist/_chunks/de-Ddj7dv1L.mjs.map +1 -0
- package/dist/_chunks/de-Dihl3Ias.mjs +18 -0
- package/dist/_chunks/de-Dihl3Ias.mjs.map +1 -0
- package/dist/_chunks/de-Q1w36mLz.mjs +18 -0
- package/dist/_chunks/de-Q1w36mLz.mjs.map +1 -0
- package/dist/_chunks/{de-Bw-yMVQV.js → de-gJ7kdSEt.js} +5 -1
- package/dist/_chunks/de-gJ7kdSEt.js.map +1 -0
- package/dist/_chunks/en-BewDXOx6.mjs +18 -0
- package/dist/_chunks/en-BewDXOx6.mjs.map +1 -0
- package/dist/_chunks/en-CLhkAQFN.mjs +18 -0
- package/dist/_chunks/en-CLhkAQFN.mjs.map +1 -0
- package/dist/_chunks/en-CsZOiXCF.js +21 -0
- package/dist/_chunks/en-CsZOiXCF.js.map +1 -0
- package/dist/_chunks/{en-CFA1lEXn.mjs → en-D95_nZbi.mjs} +5 -1
- package/dist/_chunks/en-D95_nZbi.mjs.map +1 -0
- package/dist/_chunks/en-D9kJQSFJ.mjs +18 -0
- package/dist/_chunks/en-D9kJQSFJ.mjs.map +1 -0
- package/dist/_chunks/en-DAz6J9zn.mjs +21 -0
- package/dist/_chunks/en-DAz6J9zn.mjs.map +1 -0
- package/dist/_chunks/en-DLaUZYDS.js +18 -0
- package/dist/_chunks/en-DLaUZYDS.js.map +1 -0
- package/dist/_chunks/en-DYulQU0k.js +18 -0
- package/dist/_chunks/en-DYulQU0k.js.map +1 -0
- package/dist/_chunks/en-DnJVBcLD.js +21 -0
- package/dist/_chunks/en-DnJVBcLD.js.map +1 -0
- package/dist/_chunks/en-DoY8oT6J.mjs +20 -0
- package/dist/_chunks/en-DoY8oT6J.mjs.map +1 -0
- package/dist/_chunks/en-KBsfE-wl.js +20 -0
- package/dist/_chunks/en-KBsfE-wl.js.map +1 -0
- package/dist/_chunks/{en-3qeM6Pow.js → en-M82I7rpF.js} +5 -1
- package/dist/_chunks/en-M82I7rpF.js.map +1 -0
- package/dist/_chunks/en-ZUxemNYv.mjs +21 -0
- package/dist/_chunks/en-ZUxemNYv.mjs.map +1 -0
- package/dist/_chunks/en-qS79Ntgi.js +18 -0
- package/dist/_chunks/en-qS79Ntgi.js.map +1 -0
- package/dist/_chunks/index-0LFPz2bc.mjs +333 -0
- package/dist/_chunks/index-0LFPz2bc.mjs.map +1 -0
- package/dist/_chunks/index-14SFT3N1.mjs +51 -0
- package/dist/_chunks/index-14SFT3N1.mjs.map +1 -0
- package/dist/_chunks/index-17Ih4fSH.mjs +333 -0
- package/dist/_chunks/index-17Ih4fSH.mjs.map +1 -0
- package/dist/_chunks/index-1NUzkFkq.js +332 -0
- package/dist/_chunks/index-1NUzkFkq.js.map +1 -0
- package/dist/_chunks/index-1vN_PjV8.mjs +39 -0
- package/dist/_chunks/index-1vN_PjV8.mjs.map +1 -0
- package/dist/_chunks/index-2BotFI9v.js +332 -0
- package/dist/_chunks/index-2BotFI9v.js.map +1 -0
- package/dist/_chunks/index-2JlYEqAK.mjs +333 -0
- package/dist/_chunks/index-2JlYEqAK.mjs.map +1 -0
- package/dist/_chunks/index-3jL7fDPW.mjs +333 -0
- package/dist/_chunks/index-3jL7fDPW.mjs.map +1 -0
- package/dist/_chunks/index-5Z5QT3Uv.js +39 -0
- package/dist/_chunks/index-5Z5QT3Uv.js.map +1 -0
- package/dist/_chunks/index-6889RcyN.js +24 -0
- package/dist/_chunks/index-6889RcyN.js.map +1 -0
- package/dist/_chunks/index-6CeM3yw2.js +332 -0
- package/dist/_chunks/index-6CeM3yw2.js.map +1 -0
- package/dist/_chunks/index-6uFTRYQl.js +51 -0
- package/dist/_chunks/index-6uFTRYQl.js.map +1 -0
- package/dist/_chunks/index-749EU70b.mjs +333 -0
- package/dist/_chunks/index-749EU70b.mjs.map +1 -0
- package/dist/_chunks/index-7E4NvZ3r.js +51 -0
- package/dist/_chunks/index-7E4NvZ3r.js.map +1 -0
- package/dist/_chunks/index-8bVU_F9C.mjs +26 -0
- package/dist/_chunks/index-8bVU_F9C.mjs.map +1 -0
- package/dist/_chunks/index-9_MUcFIt.js +332 -0
- package/dist/_chunks/index-9_MUcFIt.js.map +1 -0
- package/dist/_chunks/index-B1LAs0lJ.js +332 -0
- package/dist/_chunks/index-B1LAs0lJ.js.map +1 -0
- package/dist/_chunks/index-B1S2_byk.mjs +333 -0
- package/dist/_chunks/index-B1S2_byk.mjs.map +1 -0
- package/dist/_chunks/index-B2fnq69K.mjs +333 -0
- package/dist/_chunks/index-B2fnq69K.mjs.map +1 -0
- package/dist/_chunks/index-B2uGe7jC.mjs +20 -0
- package/dist/_chunks/index-B2uGe7jC.mjs.map +1 -0
- package/dist/_chunks/index-B59MLQLw.mjs +11 -0
- package/dist/_chunks/index-B59MLQLw.mjs.map +1 -0
- package/dist/_chunks/index-B5QTbDwr.js +332 -0
- package/dist/_chunks/index-B5QTbDwr.js.map +1 -0
- package/dist/_chunks/index-B7yVxbct.mjs +27 -0
- package/dist/_chunks/index-B7yVxbct.mjs.map +1 -0
- package/dist/_chunks/index-B82A0Jo4.js +11 -0
- package/dist/_chunks/index-B82A0Jo4.js.map +1 -0
- package/dist/_chunks/index-B8nD8zgu.js +26 -0
- package/dist/_chunks/index-B8nD8zgu.js.map +1 -0
- package/dist/_chunks/index-B8xwdPE_.js +332 -0
- package/dist/_chunks/index-B8xwdPE_.js.map +1 -0
- package/dist/_chunks/index-B97dUO78.js +35 -0
- package/dist/_chunks/index-B97dUO78.js.map +1 -0
- package/dist/_chunks/index-BBLvUbHy.mjs +333 -0
- package/dist/_chunks/index-BBLvUbHy.mjs.map +1 -0
- package/dist/_chunks/index-BCPzWajZ.js +332 -0
- package/dist/_chunks/index-BCPzWajZ.js.map +1 -0
- package/dist/_chunks/index-BD4WptqA.mjs +26 -0
- package/dist/_chunks/index-BD4WptqA.mjs.map +1 -0
- package/dist/_chunks/index-BD5B6tdh.mjs +10 -0
- package/dist/_chunks/index-BD5B6tdh.mjs.map +1 -0
- package/dist/_chunks/index-BDocLncW.js +332 -0
- package/dist/_chunks/index-BDocLncW.js.map +1 -0
- package/dist/_chunks/index-BEEJXDXj.mjs +333 -0
- package/dist/_chunks/index-BEEJXDXj.mjs.map +1 -0
- package/dist/_chunks/index-BEeOtSCP.mjs +51 -0
- package/dist/_chunks/index-BEeOtSCP.mjs.map +1 -0
- package/dist/_chunks/index-BFPdll2T.mjs +333 -0
- package/dist/_chunks/index-BFPdll2T.mjs.map +1 -0
- package/dist/_chunks/index-BH9IEtJD.js +332 -0
- package/dist/_chunks/index-BH9IEtJD.js.map +1 -0
- package/dist/_chunks/index-BIr4VTT7.js +332 -0
- package/dist/_chunks/index-BIr4VTT7.js.map +1 -0
- package/dist/_chunks/index-BJSfLH7v.mjs +333 -0
- package/dist/_chunks/index-BJSfLH7v.mjs.map +1 -0
- package/dist/_chunks/index-BJTd_fc6.js +35 -0
- package/dist/_chunks/index-BJTd_fc6.js.map +1 -0
- package/dist/_chunks/index-BJuyogmx.js +26 -0
- package/dist/_chunks/index-BJuyogmx.js.map +1 -0
- package/dist/_chunks/index-BLUsbzym.mjs +333 -0
- package/dist/_chunks/index-BLUsbzym.mjs.map +1 -0
- package/dist/_chunks/index-BMs0sQ4T.js +26 -0
- package/dist/_chunks/index-BMs0sQ4T.js.map +1 -0
- package/dist/_chunks/index-BO6q3bys.mjs +333 -0
- package/dist/_chunks/index-BO6q3bys.mjs.map +1 -0
- package/dist/_chunks/index-BOD0OSIQ.js +332 -0
- package/dist/_chunks/index-BOD0OSIQ.js.map +1 -0
- package/dist/_chunks/index-BOcDcwej.js +33 -0
- package/dist/_chunks/index-BOcDcwej.js.map +1 -0
- package/dist/_chunks/index-BPBBFdba.js +51 -0
- package/dist/_chunks/index-BPBBFdba.js.map +1 -0
- package/dist/_chunks/index-BQx82NbD.mjs +39 -0
- package/dist/_chunks/index-BQx82NbD.mjs.map +1 -0
- package/dist/_chunks/index-BWdkdIMm.js +332 -0
- package/dist/_chunks/index-BWdkdIMm.js.map +1 -0
- package/dist/_chunks/index-BYo9SMUu.js +332 -0
- package/dist/_chunks/index-BYo9SMUu.js.map +1 -0
- package/dist/_chunks/index-BYvdmbO7.mjs +39 -0
- package/dist/_chunks/index-BYvdmbO7.mjs.map +1 -0
- package/dist/_chunks/index-Bb5AQTnw.mjs +51 -0
- package/dist/_chunks/index-Bb5AQTnw.mjs.map +1 -0
- package/dist/_chunks/index-BcZZJWP2.js +27 -0
- package/dist/_chunks/index-BcZZJWP2.js.map +1 -0
- package/dist/_chunks/index-BcpKQZ2P.js +26 -0
- package/dist/_chunks/index-BcpKQZ2P.js.map +1 -0
- package/dist/_chunks/index-Bd9nikDV.js +51 -0
- package/dist/_chunks/index-Bd9nikDV.js.map +1 -0
- package/dist/_chunks/index-BgVhQQ5m.mjs +333 -0
- package/dist/_chunks/index-BgVhQQ5m.mjs.map +1 -0
- package/dist/_chunks/index-BhqXxudN.js +332 -0
- package/dist/_chunks/index-BhqXxudN.js.map +1 -0
- package/dist/_chunks/index-BjfpApKO.mjs +333 -0
- package/dist/_chunks/index-BjfpApKO.mjs.map +1 -0
- package/dist/_chunks/index-Bk6rmP3r.js +35 -0
- package/dist/_chunks/index-Bk6rmP3r.js.map +1 -0
- package/dist/_chunks/index-BmytYpXA.js +332 -0
- package/dist/_chunks/index-BmytYpXA.js.map +1 -0
- package/dist/_chunks/index-Bn46vVqs.js +51 -0
- package/dist/_chunks/index-Bn46vVqs.js.map +1 -0
- package/dist/_chunks/index-BnTcvqky.js +332 -0
- package/dist/_chunks/index-BnTcvqky.js.map +1 -0
- package/dist/_chunks/index-Btk6M_fA.js +332 -0
- package/dist/_chunks/index-Btk6M_fA.js.map +1 -0
- package/dist/_chunks/index-BwUy2_un.js +332 -0
- package/dist/_chunks/index-BwUy2_un.js.map +1 -0
- package/dist/_chunks/index-C-PR86RD.mjs +26 -0
- package/dist/_chunks/index-C-PR86RD.mjs.map +1 -0
- package/dist/_chunks/index-C-PpqwIN.js +39 -0
- package/dist/_chunks/index-C-PpqwIN.js.map +1 -0
- package/dist/_chunks/index-C1EFByIA.js +332 -0
- package/dist/_chunks/index-C1EFByIA.js.map +1 -0
- package/dist/_chunks/index-C2O9LMRa.js +26 -0
- package/dist/_chunks/index-C2O9LMRa.js.map +1 -0
- package/dist/_chunks/index-C7uHEWs5.js +332 -0
- package/dist/_chunks/index-C7uHEWs5.js.map +1 -0
- package/dist/_chunks/index-CB46gX1v.js +42 -0
- package/dist/_chunks/index-CB46gX1v.js.map +1 -0
- package/dist/_chunks/index-CChFb3D5.mjs +11 -0
- package/dist/_chunks/index-CChFb3D5.mjs.map +1 -0
- package/dist/_chunks/index-CEeS79tY.js +332 -0
- package/dist/_chunks/index-CEeS79tY.js.map +1 -0
- package/dist/_chunks/index-CGXPwy0_.js +26 -0
- package/dist/_chunks/index-CGXPwy0_.js.map +1 -0
- package/dist/_chunks/index-CIkUFmSg.mjs +51 -0
- package/dist/_chunks/index-CIkUFmSg.mjs.map +1 -0
- package/dist/_chunks/index-CLFH_Mix.js +26 -0
- package/dist/_chunks/index-CLFH_Mix.js.map +1 -0
- package/dist/_chunks/index-CNdnmVNv.mjs +333 -0
- package/dist/_chunks/index-CNdnmVNv.mjs.map +1 -0
- package/dist/_chunks/index-CRQzOgeM.js +51 -0
- package/dist/_chunks/index-CRQzOgeM.js.map +1 -0
- package/dist/_chunks/index-CSgZQsU_.js +332 -0
- package/dist/_chunks/index-CSgZQsU_.js.map +1 -0
- package/dist/_chunks/index-CTCao2V6.js +52 -0
- package/dist/_chunks/index-CTCao2V6.js.map +1 -0
- package/dist/_chunks/index-CUQM3_IH.js +11 -0
- package/dist/_chunks/index-CUQM3_IH.js.map +1 -0
- package/dist/_chunks/index-CUq3KsxL.mjs +11 -0
- package/dist/_chunks/index-CUq3KsxL.mjs.map +1 -0
- package/dist/_chunks/index-CWoll-k2.mjs +52 -0
- package/dist/_chunks/index-CWoll-k2.mjs.map +1 -0
- package/dist/_chunks/index-CZco0cuK.js +51 -0
- package/dist/_chunks/index-CZco0cuK.js.map +1 -0
- package/dist/_chunks/index-CZx6-aIU.mjs +333 -0
- package/dist/_chunks/index-CZx6-aIU.mjs.map +1 -0
- package/dist/_chunks/index-C_HDOFKi.mjs +33 -0
- package/dist/_chunks/index-C_HDOFKi.mjs.map +1 -0
- package/dist/_chunks/index-Cajyonzp.js +35 -0
- package/dist/_chunks/index-Cajyonzp.js.map +1 -0
- package/dist/_chunks/index-CdYJTRXV.js +332 -0
- package/dist/_chunks/index-CdYJTRXV.js.map +1 -0
- package/dist/_chunks/index-CeJ19q5Q.mjs +35 -0
- package/dist/_chunks/index-CeJ19q5Q.mjs.map +1 -0
- package/dist/_chunks/index-CelAlD2Q.mjs +40 -0
- package/dist/_chunks/index-CelAlD2Q.mjs.map +1 -0
- package/dist/_chunks/index-Cg0WPCJs.mjs +333 -0
- package/dist/_chunks/index-Cg0WPCJs.mjs.map +1 -0
- package/dist/_chunks/index-CiJL3_26.mjs +333 -0
- package/dist/_chunks/index-CiJL3_26.mjs.map +1 -0
- package/dist/_chunks/index-ClPi2eHF.js +332 -0
- package/dist/_chunks/index-ClPi2eHF.js.map +1 -0
- package/dist/_chunks/index-Co_JvSFV.mjs +51 -0
- package/dist/_chunks/index-Co_JvSFV.mjs.map +1 -0
- package/dist/_chunks/index-CwIdvPAC.mjs +51 -0
- package/dist/_chunks/index-CwIdvPAC.mjs.map +1 -0
- package/dist/_chunks/index-D-Gptksr.js +33 -0
- package/dist/_chunks/index-D-Gptksr.js.map +1 -0
- package/dist/_chunks/index-D0yTVMeC.mjs +39 -0
- package/dist/_chunks/index-D0yTVMeC.mjs.map +1 -0
- package/dist/_chunks/index-D1A_00w5.mjs +333 -0
- package/dist/_chunks/index-D1A_00w5.mjs.map +1 -0
- package/dist/_chunks/index-D1UaYacs.mjs +27 -0
- package/dist/_chunks/index-D1UaYacs.mjs.map +1 -0
- package/dist/_chunks/index-D2zGgl2w.mjs +51 -0
- package/dist/_chunks/index-D2zGgl2w.mjs.map +1 -0
- package/dist/_chunks/index-D3-6uXvW.mjs +333 -0
- package/dist/_chunks/index-D3-6uXvW.mjs.map +1 -0
- package/dist/_chunks/index-D737t-4o.mjs +26 -0
- package/dist/_chunks/index-D737t-4o.mjs.map +1 -0
- package/dist/_chunks/index-D8-HrxmE.mjs +33 -0
- package/dist/_chunks/index-D8-HrxmE.mjs.map +1 -0
- package/dist/_chunks/index-D9aVdZ2c.js +51 -0
- package/dist/_chunks/index-D9aVdZ2c.js.map +1 -0
- package/dist/_chunks/index-DCzdJhzW.mjs +333 -0
- package/dist/_chunks/index-DCzdJhzW.mjs.map +1 -0
- package/dist/_chunks/index-DDz7JEzh.js +51 -0
- package/dist/_chunks/index-DDz7JEzh.js.map +1 -0
- package/dist/_chunks/index-DG6b_lDq.mjs +333 -0
- package/dist/_chunks/index-DG6b_lDq.mjs.map +1 -0
- package/dist/_chunks/index-DH66vQnJ.mjs +333 -0
- package/dist/_chunks/index-DH66vQnJ.mjs.map +1 -0
- package/dist/_chunks/index-DJUMPn8G.mjs +24 -0
- package/dist/_chunks/index-DJUMPn8G.mjs.map +1 -0
- package/dist/_chunks/index-DNCp3Sqv.js +35 -0
- package/dist/_chunks/index-DNCp3Sqv.js.map +1 -0
- package/dist/_chunks/index-DNDL_klT.mjs +35 -0
- package/dist/_chunks/index-DNDL_klT.mjs.map +1 -0
- package/dist/_chunks/index-DOArJxeA.mjs +333 -0
- package/dist/_chunks/index-DOArJxeA.mjs.map +1 -0
- package/dist/_chunks/index-DPCgcxx7.mjs +333 -0
- package/dist/_chunks/index-DPCgcxx7.mjs.map +1 -0
- package/dist/_chunks/index-DPcHpT6b.js +26 -0
- package/dist/_chunks/index-DPcHpT6b.js.map +1 -0
- package/dist/_chunks/index-DRZVqKtb.mjs +35 -0
- package/dist/_chunks/index-DRZVqKtb.mjs.map +1 -0
- package/dist/_chunks/index-DU2rOpse.mjs +333 -0
- package/dist/_chunks/index-DU2rOpse.mjs.map +1 -0
- package/dist/_chunks/index-DU9Ihqiu.js +26 -0
- package/dist/_chunks/index-DU9Ihqiu.js.map +1 -0
- package/dist/_chunks/index-DWAiG9eT.js +332 -0
- package/dist/_chunks/index-DWAiG9eT.js.map +1 -0
- package/dist/_chunks/index-DWwk5GLU.mjs +51 -0
- package/dist/_chunks/index-DWwk5GLU.mjs.map +1 -0
- package/dist/_chunks/index-DX3OfrDJ.js +26 -0
- package/dist/_chunks/index-DX3OfrDJ.js.map +1 -0
- package/dist/_chunks/index-DXZtG4D8.js +11 -0
- package/dist/_chunks/index-DXZtG4D8.js.map +1 -0
- package/dist/_chunks/index-DZ5lzQYz.js +11 -0
- package/dist/_chunks/index-DZ5lzQYz.js.map +1 -0
- package/dist/_chunks/index-DZMAifni.mjs +26 -0
- package/dist/_chunks/index-DZMAifni.mjs.map +1 -0
- package/dist/_chunks/index-DZnAjCBz.js +332 -0
- package/dist/_chunks/index-DZnAjCBz.js.map +1 -0
- package/dist/_chunks/index-DbAMftaP.js +332 -0
- package/dist/_chunks/index-DbAMftaP.js.map +1 -0
- package/dist/_chunks/index-Dbm0hBZC.js +332 -0
- package/dist/_chunks/index-Dbm0hBZC.js.map +1 -0
- package/dist/_chunks/index-DglOshol.js +26 -0
- package/dist/_chunks/index-DglOshol.js.map +1 -0
- package/dist/_chunks/index-Djom_nQa.mjs +333 -0
- package/dist/_chunks/index-Djom_nQa.mjs.map +1 -0
- package/dist/_chunks/index-DkG79Xua.js +332 -0
- package/dist/_chunks/index-DkG79Xua.js.map +1 -0
- package/dist/_chunks/index-DlCEVkda.js +10 -0
- package/dist/_chunks/index-DlCEVkda.js.map +1 -0
- package/dist/_chunks/index-DlrR4xk3.js +51 -0
- package/dist/_chunks/index-DlrR4xk3.js.map +1 -0
- package/dist/_chunks/index-DmWMbHrN.mjs +333 -0
- package/dist/_chunks/index-DmWMbHrN.mjs.map +1 -0
- package/dist/_chunks/index-DmtOtMph.mjs +39 -0
- package/dist/_chunks/index-DmtOtMph.mjs.map +1 -0
- package/dist/_chunks/index-DqDx3KVS.js +51 -0
- package/dist/_chunks/index-DqDx3KVS.js.map +1 -0
- package/dist/_chunks/index-DqVVRs3j.mjs +333 -0
- package/dist/_chunks/index-DqVVRs3j.mjs.map +1 -0
- package/dist/_chunks/index-DwKNBU_I.js +10 -0
- package/dist/_chunks/index-DwKNBU_I.js.map +1 -0
- package/dist/_chunks/index-DwqJrgdS.js +332 -0
- package/dist/_chunks/index-DwqJrgdS.js.map +1 -0
- package/dist/_chunks/index-Dxvy92_A.js +52 -0
- package/dist/_chunks/index-Dxvy92_A.js.map +1 -0
- package/dist/_chunks/index-DxzcHKzo.mjs +333 -0
- package/dist/_chunks/index-DxzcHKzo.mjs.map +1 -0
- package/dist/_chunks/index-Dy11_rTk.js +25 -0
- package/dist/_chunks/index-Dy11_rTk.js.map +1 -0
- package/dist/_chunks/index-Dy2qWaa2.mjs +333 -0
- package/dist/_chunks/index-Dy2qWaa2.mjs.map +1 -0
- package/dist/_chunks/index-Dz_C90Uw.mjs +25 -0
- package/dist/_chunks/index-Dz_C90Uw.mjs.map +1 -0
- package/dist/_chunks/index-EO6ncD4P.mjs +26 -0
- package/dist/_chunks/index-EO6ncD4P.mjs.map +1 -0
- package/dist/_chunks/index-F8K1BJrY.js +332 -0
- package/dist/_chunks/index-F8K1BJrY.js.map +1 -0
- package/dist/_chunks/index-FOS4mqdv.js +39 -0
- package/dist/_chunks/index-FOS4mqdv.js.map +1 -0
- package/dist/_chunks/index-FdJkKIm-.js +27 -0
- package/dist/_chunks/index-FdJkKIm-.js.map +1 -0
- package/dist/_chunks/index-IRZkd-GV.mjs +333 -0
- package/dist/_chunks/index-IRZkd-GV.mjs.map +1 -0
- package/dist/_chunks/index-Ihoq7N27.js +39 -0
- package/dist/_chunks/index-Ihoq7N27.js.map +1 -0
- package/dist/_chunks/index-Ju5-qd9f.mjs +51 -0
- package/dist/_chunks/index-Ju5-qd9f.mjs.map +1 -0
- package/dist/_chunks/index-KRsS4Q5E.js +332 -0
- package/dist/_chunks/index-KRsS4Q5E.js.map +1 -0
- package/dist/_chunks/index-O0FUr6y8.mjs +35 -0
- package/dist/_chunks/index-O0FUr6y8.mjs.map +1 -0
- package/dist/_chunks/index-O9oaphD1.mjs +26 -0
- package/dist/_chunks/index-O9oaphD1.mjs.map +1 -0
- package/dist/_chunks/index-OfmPI0qM.mjs +333 -0
- package/dist/_chunks/index-OfmPI0qM.mjs.map +1 -0
- package/dist/_chunks/index-PqxNGCPC.js +39 -0
- package/dist/_chunks/index-PqxNGCPC.js.map +1 -0
- package/dist/_chunks/index-QPw9JMM7.js +26 -0
- package/dist/_chunks/index-QPw9JMM7.js.map +1 -0
- package/dist/_chunks/index-RPgFQ8JN.js +11 -0
- package/dist/_chunks/index-RPgFQ8JN.js.map +1 -0
- package/dist/_chunks/index-RkGmI_5a.js +332 -0
- package/dist/_chunks/index-RkGmI_5a.js.map +1 -0
- package/dist/_chunks/index-RuWEiyPC.mjs +10 -0
- package/dist/_chunks/index-RuWEiyPC.mjs.map +1 -0
- package/dist/_chunks/index-Vm82ncrB.mjs +26 -0
- package/dist/_chunks/index-Vm82ncrB.mjs.map +1 -0
- package/dist/_chunks/index-Vt7G91cP.mjs +11 -0
- package/dist/_chunks/index-Vt7G91cP.mjs.map +1 -0
- package/dist/_chunks/index-YhzGM_It.mjs +35 -0
- package/dist/_chunks/index-YhzGM_It.mjs.map +1 -0
- package/dist/_chunks/index-ZqLzNBtG.mjs +26 -0
- package/dist/_chunks/index-ZqLzNBtG.mjs.map +1 -0
- package/dist/_chunks/index-fNfPzwf2.js +332 -0
- package/dist/_chunks/index-fNfPzwf2.js.map +1 -0
- package/dist/_chunks/index-g48HHxYy.mjs +26 -0
- package/dist/_chunks/index-g48HHxYy.mjs.map +1 -0
- package/dist/_chunks/index-gTgo3YNx.js +11 -0
- package/dist/_chunks/index-gTgo3YNx.js.map +1 -0
- package/dist/_chunks/index-ig6Hb9po.mjs +11 -0
- package/dist/_chunks/index-ig6Hb9po.mjs.map +1 -0
- package/dist/_chunks/index-k62BjD6g.mjs +26 -0
- package/dist/_chunks/index-k62BjD6g.mjs.map +1 -0
- package/dist/_chunks/index-keqbR8Rb.js +332 -0
- package/dist/_chunks/index-keqbR8Rb.js.map +1 -0
- package/dist/_chunks/index-lpvX9ndv.mjs +333 -0
- package/dist/_chunks/index-lpvX9ndv.mjs.map +1 -0
- package/dist/_chunks/index-mLpi6WXe.mjs +26 -0
- package/dist/_chunks/index-mLpi6WXe.mjs.map +1 -0
- package/dist/_chunks/index-rO6eiMQV.mjs +333 -0
- package/dist/_chunks/index-rO6eiMQV.mjs.map +1 -0
- package/dist/_chunks/index-t1SN83-K.mjs +51 -0
- package/dist/_chunks/index-t1SN83-K.mjs.map +1 -0
- package/dist/_chunks/index-uIh12_Oa.mjs +52 -0
- package/dist/_chunks/index-uIh12_Oa.mjs.map +1 -0
- package/dist/_chunks/index-xXDvLN5W.mjs +51 -0
- package/dist/_chunks/index-xXDvLN5W.mjs.map +1 -0
- package/dist/_chunks/index-yNivr0uw.mjs +11 -0
- package/dist/_chunks/index-yNivr0uw.mjs.map +1 -0
- package/dist/_chunks/index-z_wVLOOa.js +20 -0
- package/dist/_chunks/index-z_wVLOOa.js.map +1 -0
- package/dist/admin/index.js +3 -212
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +3 -212
- package/dist/admin/index.mjs.map +1 -0
- package/dist/admin/src/components/SettingsPage/index.d.ts +2 -0
- package/dist/admin/src/hooks/index.d.ts +4 -0
- package/dist/admin/src/hooks/useCacheConfig.d.ts +10 -0
- package/dist/admin/src/hooks/useCacheNotifications.d.ts +7 -0
- package/dist/admin/src/hooks/useCacheOperations.d.ts +10 -0
- package/dist/admin/src/hooks/useCachePermissions.d.ts +4 -0
- package/dist/server/index.js +23 -7
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +23 -7
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/src/config/index.d.ts +1 -0
- package/dist/server/src/controllers/controller.d.ts +1 -1
- package/dist/server/src/controllers/index.d.ts +1 -1
- package/dist/server/src/index.d.ts +2 -1
- package/package.json +7 -6
- package/dist/admin/src/components/PurgeModal/PurgeButton/index.d.ts +0 -4
package/dist/admin/index.js
CHANGED
|
@@ -1,213 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const reactIntl = require("react-intl");
|
|
6
|
-
const icons = require("@strapi/icons");
|
|
7
|
-
const designSystem = require("@strapi/design-system");
|
|
8
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
9
|
-
const v = glob[path];
|
|
10
|
-
if (v) {
|
|
11
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
12
|
-
}
|
|
13
|
-
return new Promise((_, reject) => {
|
|
14
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
15
|
-
reject.bind(
|
|
16
|
-
null,
|
|
17
|
-
new Error(
|
|
18
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
19
|
-
)
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
const PLUGIN_ID = "strapi-cache";
|
|
25
|
-
const Initializer = ({ setPlugin }) => {
|
|
26
|
-
const ref = react.useRef(setPlugin);
|
|
27
|
-
react.useEffect(() => {
|
|
28
|
-
ref.current(PLUGIN_ID);
|
|
29
|
-
}, []);
|
|
30
|
-
return null;
|
|
31
|
-
};
|
|
32
|
-
const pluginPermissions = {
|
|
33
|
-
purge: [{ action: "plugin::strapi-cache.purge-cache", subject: null }]
|
|
34
|
-
};
|
|
35
|
-
function PurgeButton({ onClick }) {
|
|
36
|
-
const formatMessage = reactIntl.useIntl().formatMessage;
|
|
37
|
-
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick, children: formatMessage({
|
|
38
|
-
id: "strapi-cache.cache.confirm",
|
|
39
|
-
defaultMessage: "Yes, confirm"
|
|
40
|
-
}) });
|
|
41
|
-
}
|
|
42
|
-
function PurgeModal({ buttonText, keyToUse, buttonWidth, contentTypeName }) {
|
|
43
|
-
const { allowedActions } = admin.useRBAC(pluginPermissions);
|
|
44
|
-
const formatMessage = reactIntl.useIntl().formatMessage;
|
|
45
|
-
const { post, get } = admin.useFetchClient();
|
|
46
|
-
const { toggleNotification } = admin.useNotification();
|
|
47
|
-
const [cacheableRoutes, setCacheableRoutes] = react.useState();
|
|
48
|
-
react.useEffect(() => {
|
|
49
|
-
if (!allowedActions.canPurgeCache) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const fetchCacheableRoutes = async () => {
|
|
53
|
-
try {
|
|
54
|
-
const { data } = await get("/strapi-cache/cacheable-routes");
|
|
55
|
-
return data;
|
|
56
|
-
} catch (error) {
|
|
57
|
-
toggleNotification({
|
|
58
|
-
type: "warning",
|
|
59
|
-
message: formatMessage({
|
|
60
|
-
id: "strapi-cache.cache.routes.fetch-error",
|
|
61
|
-
defaultMessage: "Unable to fetch cacheable routes. Cache purge may not work correctly."
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
return void 0;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
fetchCacheableRoutes().then((data) => {
|
|
68
|
-
setCacheableRoutes(data);
|
|
69
|
-
});
|
|
70
|
-
}, [allowedActions.canPurgeCache]);
|
|
71
|
-
const isCacheableRoute = () => {
|
|
72
|
-
if (!keyToUse || !cacheableRoutes) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return cacheableRoutes.length === 0 || cacheableRoutes.some((route) => {
|
|
76
|
-
return route.includes(keyToUse) || contentTypeName && route.includes(contentTypeName);
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const clearCache = () => {
|
|
80
|
-
if (!keyToUse) {
|
|
81
|
-
toggleNotification({
|
|
82
|
-
type: "warning",
|
|
83
|
-
message: formatMessage({
|
|
84
|
-
id: "strapi-cache.cache.purge.no-content-type",
|
|
85
|
-
defaultMessage: "No content type found"
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
post(`/strapi-cache/purge-cache/${keyToUse}`, void 0, {
|
|
91
|
-
headers: {
|
|
92
|
-
"Content-Type": "application/json"
|
|
93
|
-
}
|
|
94
|
-
}).then(() => {
|
|
95
|
-
toggleNotification({
|
|
96
|
-
type: "success",
|
|
97
|
-
message: formatMessage(
|
|
98
|
-
{
|
|
99
|
-
id: "strapi-cache.cache.purge.success",
|
|
100
|
-
defaultMessage: "Cache purged successfully"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
key: `"${keyToUse}"`
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
});
|
|
107
|
-
}).catch(() => {
|
|
108
|
-
toggleNotification({
|
|
109
|
-
type: "danger",
|
|
110
|
-
message: formatMessage(
|
|
111
|
-
{
|
|
112
|
-
id: "strapi-cache.cache.purge.error",
|
|
113
|
-
defaultMessage: "Error purging cache"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
key: `"${keyToUse}"`
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
if (!allowedActions.canPurgeCache || !isCacheableRoute()) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Root, { children: [
|
|
126
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { width: buttonWidth, startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Archive, {}), variant: "danger", children: buttonText }) }),
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { children: [
|
|
128
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: buttonText }) }),
|
|
129
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", children: formatMessage(
|
|
130
|
-
{
|
|
131
|
-
id: "strapi-cache.cache.purge.confirmation",
|
|
132
|
-
defaultMessage: "Are you sure you want to purge the cache?"
|
|
133
|
-
},
|
|
134
|
-
{ key: `"${keyToUse}"` }
|
|
135
|
-
) }) }),
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Close, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
|
|
138
|
-
id: "strapi-cache.cache.cancel",
|
|
139
|
-
defaultMessage: "No, cancel"
|
|
140
|
-
}) }) }),
|
|
141
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Close, { children: /* @__PURE__ */ jsxRuntime.jsx(PurgeButton, { onClick: clearCache }) })
|
|
142
|
-
] })
|
|
143
|
-
] })
|
|
144
|
-
] });
|
|
145
|
-
}
|
|
146
|
-
function PurgeCacheButton() {
|
|
147
|
-
const { contentType } = admin.unstable_useContentManagerContext();
|
|
148
|
-
const { formatMessage } = reactIntl.useIntl();
|
|
149
|
-
const keyToUse = contentType?.info.pluralName;
|
|
150
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
-
PurgeModal,
|
|
152
|
-
{
|
|
153
|
-
buttonText: formatMessage({
|
|
154
|
-
id: "strapi-cache.cache.purge",
|
|
155
|
-
defaultMessage: "Purge Cache"
|
|
156
|
-
}),
|
|
157
|
-
keyToUse
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
function PurgeEntityButton() {
|
|
162
|
-
const { formatMessage } = reactIntl.useIntl();
|
|
163
|
-
const { id, isSingleType, contentType } = admin.unstable_useContentManagerContext();
|
|
164
|
-
const apiPath = isSingleType ? contentType?.info.singularName : id;
|
|
165
|
-
if (!apiPath) {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
const keyToUse = encodeURIComponent(apiPath);
|
|
169
|
-
const contentTypeName = isSingleType ? contentType?.info.singularName : contentType?.info.pluralName;
|
|
170
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
171
|
-
PurgeModal,
|
|
172
|
-
{
|
|
173
|
-
buttonWidth: "100%",
|
|
174
|
-
buttonText: formatMessage({
|
|
175
|
-
id: "strapi-cache.cache.purge.entity",
|
|
176
|
-
defaultMessage: "Purge Entity Cache"
|
|
177
|
-
}),
|
|
178
|
-
keyToUse,
|
|
179
|
-
contentTypeName
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
const index = {
|
|
184
|
-
register(app) {
|
|
185
|
-
app.registerPlugin({
|
|
186
|
-
id: PLUGIN_ID,
|
|
187
|
-
initializer: Initializer,
|
|
188
|
-
isReady: false,
|
|
189
|
-
name: PLUGIN_ID
|
|
190
|
-
});
|
|
191
|
-
app.getPlugin("content-manager").injectComponent("listView", "actions", {
|
|
192
|
-
name: PurgeCacheButton,
|
|
193
|
-
Component: PurgeCacheButton
|
|
194
|
-
});
|
|
195
|
-
app.getPlugin("content-manager").injectComponent("editView", "right-links", {
|
|
196
|
-
name: PurgeEntityButton,
|
|
197
|
-
Component: PurgeEntityButton
|
|
198
|
-
});
|
|
199
|
-
},
|
|
200
|
-
async registerTrads({ locales }) {
|
|
201
|
-
return Promise.all(
|
|
202
|
-
locales.map(async (locale) => {
|
|
203
|
-
try {
|
|
204
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("../_chunks/de-Bw-yMVQV.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-3qeM6Pow.js")) }), `./translations/${locale}.json`, 3);
|
|
205
|
-
return { data, locale };
|
|
206
|
-
} catch {
|
|
207
|
-
return { data: {}, locale };
|
|
208
|
-
}
|
|
209
|
-
})
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
module.exports = index;
|
|
2
|
+
const index = require("../_chunks/index-CEeS79tY.js");
|
|
3
|
+
module.exports = index.index;
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,214 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useRBAC, useFetchClient, useNotification, unstable_useContentManagerContext } from "@strapi/strapi/admin";
|
|
4
|
-
import { useIntl } from "react-intl";
|
|
5
|
-
import { Archive } from "@strapi/icons";
|
|
6
|
-
import { Button, Modal, Typography } from "@strapi/design-system";
|
|
7
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
8
|
-
const v = glob[path];
|
|
9
|
-
if (v) {
|
|
10
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
11
|
-
}
|
|
12
|
-
return new Promise((_, reject) => {
|
|
13
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
14
|
-
reject.bind(
|
|
15
|
-
null,
|
|
16
|
-
new Error(
|
|
17
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
18
|
-
)
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
const PLUGIN_ID = "strapi-cache";
|
|
24
|
-
const Initializer = ({ setPlugin }) => {
|
|
25
|
-
const ref = useRef(setPlugin);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
ref.current(PLUGIN_ID);
|
|
28
|
-
}, []);
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
31
|
-
const pluginPermissions = {
|
|
32
|
-
purge: [{ action: "plugin::strapi-cache.purge-cache", subject: null }]
|
|
33
|
-
};
|
|
34
|
-
function PurgeButton({ onClick }) {
|
|
35
|
-
const formatMessage = useIntl().formatMessage;
|
|
36
|
-
return /* @__PURE__ */ jsx(Button, { onClick, children: formatMessage({
|
|
37
|
-
id: "strapi-cache.cache.confirm",
|
|
38
|
-
defaultMessage: "Yes, confirm"
|
|
39
|
-
}) });
|
|
40
|
-
}
|
|
41
|
-
function PurgeModal({ buttonText, keyToUse, buttonWidth, contentTypeName }) {
|
|
42
|
-
const { allowedActions } = useRBAC(pluginPermissions);
|
|
43
|
-
const formatMessage = useIntl().formatMessage;
|
|
44
|
-
const { post, get } = useFetchClient();
|
|
45
|
-
const { toggleNotification } = useNotification();
|
|
46
|
-
const [cacheableRoutes, setCacheableRoutes] = useState();
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
if (!allowedActions.canPurgeCache) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const fetchCacheableRoutes = async () => {
|
|
52
|
-
try {
|
|
53
|
-
const { data } = await get("/strapi-cache/cacheable-routes");
|
|
54
|
-
return data;
|
|
55
|
-
} catch (error) {
|
|
56
|
-
toggleNotification({
|
|
57
|
-
type: "warning",
|
|
58
|
-
message: formatMessage({
|
|
59
|
-
id: "strapi-cache.cache.routes.fetch-error",
|
|
60
|
-
defaultMessage: "Unable to fetch cacheable routes. Cache purge may not work correctly."
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
return void 0;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
fetchCacheableRoutes().then((data) => {
|
|
67
|
-
setCacheableRoutes(data);
|
|
68
|
-
});
|
|
69
|
-
}, [allowedActions.canPurgeCache]);
|
|
70
|
-
const isCacheableRoute = () => {
|
|
71
|
-
if (!keyToUse || !cacheableRoutes) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return cacheableRoutes.length === 0 || cacheableRoutes.some((route) => {
|
|
75
|
-
return route.includes(keyToUse) || contentTypeName && route.includes(contentTypeName);
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
const clearCache = () => {
|
|
79
|
-
if (!keyToUse) {
|
|
80
|
-
toggleNotification({
|
|
81
|
-
type: "warning",
|
|
82
|
-
message: formatMessage({
|
|
83
|
-
id: "strapi-cache.cache.purge.no-content-type",
|
|
84
|
-
defaultMessage: "No content type found"
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
post(`/strapi-cache/purge-cache/${keyToUse}`, void 0, {
|
|
90
|
-
headers: {
|
|
91
|
-
"Content-Type": "application/json"
|
|
92
|
-
}
|
|
93
|
-
}).then(() => {
|
|
94
|
-
toggleNotification({
|
|
95
|
-
type: "success",
|
|
96
|
-
message: formatMessage(
|
|
97
|
-
{
|
|
98
|
-
id: "strapi-cache.cache.purge.success",
|
|
99
|
-
defaultMessage: "Cache purged successfully"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
key: `"${keyToUse}"`
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
});
|
|
106
|
-
}).catch(() => {
|
|
107
|
-
toggleNotification({
|
|
108
|
-
type: "danger",
|
|
109
|
-
message: formatMessage(
|
|
110
|
-
{
|
|
111
|
-
id: "strapi-cache.cache.purge.error",
|
|
112
|
-
defaultMessage: "Error purging cache"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
key: `"${keyToUse}"`
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
if (!allowedActions.canPurgeCache || !isCacheableRoute()) {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
return /* @__PURE__ */ jsxs(Modal.Root, { children: [
|
|
125
|
-
/* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(Button, { width: buttonWidth, startIcon: /* @__PURE__ */ jsx(Archive, {}), variant: "danger", children: buttonText }) }),
|
|
126
|
-
/* @__PURE__ */ jsxs(Modal.Content, { children: [
|
|
127
|
-
/* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: buttonText }) }),
|
|
128
|
-
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Typography, { variant: "omega", children: formatMessage(
|
|
129
|
-
{
|
|
130
|
-
id: "strapi-cache.cache.purge.confirmation",
|
|
131
|
-
defaultMessage: "Are you sure you want to purge the cache?"
|
|
132
|
-
},
|
|
133
|
-
{ key: `"${keyToUse}"` }
|
|
134
|
-
) }) }),
|
|
135
|
-
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
136
|
-
/* @__PURE__ */ jsx(Modal.Close, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
|
|
137
|
-
id: "strapi-cache.cache.cancel",
|
|
138
|
-
defaultMessage: "No, cancel"
|
|
139
|
-
}) }) }),
|
|
140
|
-
/* @__PURE__ */ jsx(Modal.Close, { children: /* @__PURE__ */ jsx(PurgeButton, { onClick: clearCache }) })
|
|
141
|
-
] })
|
|
142
|
-
] })
|
|
143
|
-
] });
|
|
144
|
-
}
|
|
145
|
-
function PurgeCacheButton() {
|
|
146
|
-
const { contentType } = unstable_useContentManagerContext();
|
|
147
|
-
const { formatMessage } = useIntl();
|
|
148
|
-
const keyToUse = contentType?.info.pluralName;
|
|
149
|
-
return /* @__PURE__ */ jsx(
|
|
150
|
-
PurgeModal,
|
|
151
|
-
{
|
|
152
|
-
buttonText: formatMessage({
|
|
153
|
-
id: "strapi-cache.cache.purge",
|
|
154
|
-
defaultMessage: "Purge Cache"
|
|
155
|
-
}),
|
|
156
|
-
keyToUse
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
function PurgeEntityButton() {
|
|
161
|
-
const { formatMessage } = useIntl();
|
|
162
|
-
const { id, isSingleType, contentType } = unstable_useContentManagerContext();
|
|
163
|
-
const apiPath = isSingleType ? contentType?.info.singularName : id;
|
|
164
|
-
if (!apiPath) {
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
const keyToUse = encodeURIComponent(apiPath);
|
|
168
|
-
const contentTypeName = isSingleType ? contentType?.info.singularName : contentType?.info.pluralName;
|
|
169
|
-
return /* @__PURE__ */ jsx(
|
|
170
|
-
PurgeModal,
|
|
171
|
-
{
|
|
172
|
-
buttonWidth: "100%",
|
|
173
|
-
buttonText: formatMessage({
|
|
174
|
-
id: "strapi-cache.cache.purge.entity",
|
|
175
|
-
defaultMessage: "Purge Entity Cache"
|
|
176
|
-
}),
|
|
177
|
-
keyToUse,
|
|
178
|
-
contentTypeName
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
const index = {
|
|
183
|
-
register(app) {
|
|
184
|
-
app.registerPlugin({
|
|
185
|
-
id: PLUGIN_ID,
|
|
186
|
-
initializer: Initializer,
|
|
187
|
-
isReady: false,
|
|
188
|
-
name: PLUGIN_ID
|
|
189
|
-
});
|
|
190
|
-
app.getPlugin("content-manager").injectComponent("listView", "actions", {
|
|
191
|
-
name: PurgeCacheButton,
|
|
192
|
-
Component: PurgeCacheButton
|
|
193
|
-
});
|
|
194
|
-
app.getPlugin("content-manager").injectComponent("editView", "right-links", {
|
|
195
|
-
name: PurgeEntityButton,
|
|
196
|
-
Component: PurgeEntityButton
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
async registerTrads({ locales }) {
|
|
200
|
-
return Promise.all(
|
|
201
|
-
locales.map(async (locale) => {
|
|
202
|
-
try {
|
|
203
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("../_chunks/de-OlWEMza0.mjs"), "./translations/en.json": () => import("../_chunks/en-CFA1lEXn.mjs") }), `./translations/${locale}.json`, 3);
|
|
204
|
-
return { data, locale };
|
|
205
|
-
} catch {
|
|
206
|
-
return { data: {}, locale };
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
};
|
|
1
|
+
import { i } from "../_chunks/index-CNdnmVNv.mjs";
|
|
212
2
|
export {
|
|
213
|
-
|
|
3
|
+
i as default
|
|
214
4
|
};
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type CacheConfig = {
|
|
2
|
+
cacheableRoutes: string[];
|
|
3
|
+
disableAdminPopups: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const useCacheConfig: (enabled?: boolean) => {
|
|
6
|
+
config: CacheConfig | undefined;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
refetch: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CacheConfig } from './useCacheConfig';
|
|
2
|
+
export declare const useCacheNotifications: (config?: CacheConfig) => {
|
|
3
|
+
showConfigFetchError: (error: Error) => void;
|
|
4
|
+
showPurgeSuccess: (key: string) => void;
|
|
5
|
+
showPurgeError: (key: string) => void;
|
|
6
|
+
showNoContentTypeWarning: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CacheConfig } from './useCacheConfig';
|
|
2
|
+
export type CacheOperationResult = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
message?: string;
|
|
5
|
+
error?: Error;
|
|
6
|
+
};
|
|
7
|
+
export declare const useCacheOperations: () => {
|
|
8
|
+
isCacheableRoute: (keyToUse?: string, contentTypeName?: string, config?: CacheConfig) => boolean;
|
|
9
|
+
clearCache: (keyToUse?: string) => Promise<CacheOperationResult>;
|
|
10
|
+
};
|
package/dist/server/index.js
CHANGED
|
@@ -404,7 +404,8 @@ const config = {
|
|
|
404
404
|
cacheAuthorizedRequests: false,
|
|
405
405
|
cacheGetTimeoutInMs: 1e3,
|
|
406
406
|
autoPurgeCache: true,
|
|
407
|
-
autoPurgeCacheOnStart: true
|
|
407
|
+
autoPurgeCacheOnStart: true,
|
|
408
|
+
disableAdminPopups: false
|
|
408
409
|
}),
|
|
409
410
|
validator: (config2) => {
|
|
410
411
|
if (typeof config2.debug !== "boolean") {
|
|
@@ -439,7 +440,9 @@ const config = {
|
|
|
439
440
|
throw new Error(`Invalid config: redisConfig must be set when using redis provider`);
|
|
440
441
|
}
|
|
441
442
|
if (typeof config2.redisConfig !== "string" && typeof config2.redisConfig !== "object") {
|
|
442
|
-
throw new Error(
|
|
443
|
+
throw new Error(
|
|
444
|
+
`Invalid config: redisConfig must be a string or object when using redis provider`
|
|
445
|
+
);
|
|
443
446
|
}
|
|
444
447
|
if (!Array.isArray(config2.redisClusterNodes) || config2.redisClusterNodes.some((item) => !("host" in item && "port" in item))) {
|
|
445
448
|
throw new Error(
|
|
@@ -471,6 +474,9 @@ const config = {
|
|
|
471
474
|
if (typeof config2.autoPurgeCacheOnStart !== "boolean") {
|
|
472
475
|
throw new Error(`Invalid config: autoPurgeCacheOnStart must be a boolean`);
|
|
473
476
|
}
|
|
477
|
+
if (typeof config2.disableAdminPopups !== "boolean") {
|
|
478
|
+
throw new Error(`Invalid config: disableAdminPopups must be a boolean`);
|
|
479
|
+
}
|
|
474
480
|
}
|
|
475
481
|
};
|
|
476
482
|
const contentTypes = {};
|
|
@@ -491,9 +497,18 @@ const controller = ({ strapi: strapi2 }) => ({
|
|
|
491
497
|
message: `Cache purged successfully for key: ${key}`
|
|
492
498
|
};
|
|
493
499
|
},
|
|
494
|
-
async
|
|
495
|
-
|
|
496
|
-
|
|
500
|
+
async config(ctx) {
|
|
501
|
+
try {
|
|
502
|
+
const config2 = {
|
|
503
|
+
cacheableRoutes: strapi2.plugin("strapi-cache").config("cacheableRoutes") ?? [],
|
|
504
|
+
disableAdminPopups: strapi2.plugin("strapi-cache").config("disableAdminPopups") ?? false
|
|
505
|
+
};
|
|
506
|
+
ctx.body = config2;
|
|
507
|
+
} catch (error) {
|
|
508
|
+
console.error("Error constructing config:", error);
|
|
509
|
+
ctx.status = 500;
|
|
510
|
+
ctx.body = { error: "Configuration not available" };
|
|
511
|
+
}
|
|
497
512
|
}
|
|
498
513
|
});
|
|
499
514
|
const controllers = {
|
|
@@ -535,8 +550,8 @@ const purgeRoute = [
|
|
|
535
550
|
},
|
|
536
551
|
{
|
|
537
552
|
method: "GET",
|
|
538
|
-
path: "/
|
|
539
|
-
handler: "controller.
|
|
553
|
+
path: "/config",
|
|
554
|
+
handler: "controller.config",
|
|
540
555
|
config: {
|
|
541
556
|
policies: [
|
|
542
557
|
"admin::isAuthenticatedAdmin",
|
|
@@ -818,3 +833,4 @@ const index = {
|
|
|
818
833
|
middlewares
|
|
819
834
|
};
|
|
820
835
|
module.exports = index;
|
|
836
|
+
//# sourceMappingURL=index.js.map
|