@selvajs/selva 4.3.1 → 4.3.3
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/build/client/_app/immutable/chunks/{VoeDk8Ji.js → CjgpD29S.js} +1 -1
- package/build/client/_app/immutable/chunks/CjgpD29S.js.br +0 -0
- package/build/client/_app/immutable/chunks/CjgpD29S.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BRVNXmK7.js → CnA5vyOL.js} +1 -1
- package/build/client/_app/immutable/chunks/CnA5vyOL.js.br +0 -0
- package/build/client/_app/immutable/chunks/CnA5vyOL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bsojhuor.js → CqGL49tP.js} +1 -1
- package/build/client/_app/immutable/chunks/CqGL49tP.js.br +0 -0
- package/build/client/_app/immutable/chunks/CqGL49tP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D8sV3P57.js +3 -0
- package/build/client/_app/immutable/chunks/D8sV3P57.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8sV3P57.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BOu0_8hg.js → DPlo5P1h.js} +1 -1
- package/build/client/_app/immutable/chunks/DPlo5P1h.js.br +0 -0
- package/build/client/_app/immutable/chunks/DPlo5P1h.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BGuW4NBA.js → R9nUBj8V.js} +1 -1
- package/build/client/_app/immutable/chunks/R9nUBj8V.js.br +0 -0
- package/build/client/_app/immutable/chunks/R9nUBj8V.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dus1Wc-_.js → pwX8D5nC.js} +1 -1
- package/build/client/_app/immutable/chunks/pwX8D5nC.js.br +0 -0
- package/build/client/_app/immutable/chunks/pwX8D5nC.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.BuFVNRIb.js → app.01dGDgTS.js} +2 -2
- package/build/client/_app/immutable/entry/app.01dGDgTS.js.br +0 -0
- package/build/client/_app/immutable/entry/app.01dGDgTS.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DzwfmypV.js +1 -0
- package/build/client/_app/immutable/entry/start.DzwfmypV.js.br +2 -0
- package/build/client/_app/immutable/entry/start.DzwfmypV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.DTTqOpbo.js → 1.CnIfwGK4.js} +1 -1
- package/build/client/_app/immutable/nodes/1.CnIfwGK4.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.CnIfwGK4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.Bd_TroBi.js → 11.B6Xpxi3i.js} +1 -1
- package/build/client/_app/immutable/nodes/11.B6Xpxi3i.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.B6Xpxi3i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.CZPWgSyX.js → 13.CXTKVFR3.js} +1 -1
- package/build/client/_app/immutable/nodes/13.CXTKVFR3.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.CXTKVFR3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.ErUEed70.js → 14.B0uUPvFS.js} +1 -1
- package/build/client/_app/immutable/nodes/14.B0uUPvFS.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.B0uUPvFS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.C5iZ7akY.js +13 -0
- package/build/client/_app/immutable/nodes/15.C5iZ7akY.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.C5iZ7akY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.ZGqQw9u_.js → 16.CLYt630z.js} +1 -1
- package/build/client/_app/immutable/nodes/16.CLYt630z.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.CLYt630z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{17.BAfTvzjf.js → 17.BokspzUr.js} +1 -1
- package/build/client/_app/immutable/nodes/17.BokspzUr.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.BokspzUr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{19.BA4Q7Ejv.js → 19.CRgB24ZG.js} +1 -1
- package/build/client/_app/immutable/nodes/19.CRgB24ZG.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.CRgB24ZG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.qGoF_BJR.js → 2.D9KReksc.js} +1 -1
- package/build/client/_app/immutable/nodes/2.D9KReksc.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.D9KReksc.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{20.B7pbJgV7.js → 20.D1lhpSmh.js} +1 -1
- package/build/client/_app/immutable/nodes/20.D1lhpSmh.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.D1lhpSmh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{21.CQUr9a-8.js → 21.hjOBQ5EP.js} +1 -1
- package/build/client/_app/immutable/nodes/21.hjOBQ5EP.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.hjOBQ5EP.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{23.B1irvd8d.js → 23.7f9D0c47.js} +1 -1
- package/build/client/_app/immutable/nodes/23.7f9D0c47.js.br +0 -0
- package/build/client/_app/immutable/nodes/{23.B1irvd8d.js.gz → 23.7f9D0c47.js.gz} +0 -0
- package/build/client/_app/immutable/nodes/{24.DaWQ1jI1.js → 24.BmouU14w.js} +1 -1
- package/build/client/_app/immutable/nodes/24.BmouU14w.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.BmouU14w.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{27.BVltlINS.js → 27.CCXSZTyB.js} +1 -1
- package/build/client/_app/immutable/nodes/27.CCXSZTyB.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.CCXSZTyB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{28.CkAyrVXL.js → 28.D9Dvgd6e.js} +1 -1
- package/build/client/_app/immutable/nodes/28.D9Dvgd6e.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.D9Dvgd6e.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{29.DuyPKFrU.js → 29.weyznaQS.js} +1 -1
- package/build/client/_app/immutable/nodes/29.weyznaQS.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.weyznaQS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.vtzWe8dr.js → 3.OK16_whZ.js} +1 -1
- package/build/client/_app/immutable/nodes/3.OK16_whZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.OK16_whZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{30.B8jrnlRp.js → 30.B8_RcnN4.js} +1 -1
- package/build/client/_app/immutable/nodes/30.B8_RcnN4.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.B8_RcnN4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.Cung723A.js → 5.D76vCiaE.js} +1 -1
- package/build/client/_app/immutable/nodes/5.D76vCiaE.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.D76vCiaE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.ChV00aii.js → 6.Couok3a8.js} +1 -1
- package/build/client/_app/immutable/nodes/6.Couok3a8.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Couok3a8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CoT_11A9.js → 7.CznPXfc7.js} +1 -1
- package/build/client/_app/immutable/nodes/7.CznPXfc7.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CznPXfc7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.DVP4Zm3d.js → 8.BI4SDYuL.js} +1 -1
- package/build/client/_app/immutable/nodes/8.BI4SDYuL.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.BI4SDYuL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.Cw9Pz35A.js → 9.DSxD_4s0.js} +1 -1
- package/build/client/_app/immutable/nodes/9.DSxD_4s0.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DSxD_4s0.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{1-C2I1bO4p.js → 1-Dxz4sIiV.js} +2 -2
- package/build/server/chunks/{1-C2I1bO4p.js.map → 1-Dxz4sIiV.js.map} +1 -1
- package/build/server/chunks/{11-CDngEJ0B.js → 11-C19mKwaM.js} +2 -2
- package/build/server/chunks/{11-CDngEJ0B.js.map → 11-C19mKwaM.js.map} +1 -1
- package/build/server/chunks/{13-BPFyBgiN.js → 13-BtiE_2pG.js} +2 -2
- package/build/server/chunks/{13-BPFyBgiN.js.map → 13-BtiE_2pG.js.map} +1 -1
- package/build/server/chunks/{14-Dc1K62Ey.js → 14-I2IgJdid.js} +2 -2
- package/build/server/chunks/{14-Dc1K62Ey.js.map → 14-I2IgJdid.js.map} +1 -1
- package/build/server/chunks/{15-BNeKc8aQ.js → 15-BbtT7FFe.js} +10 -6
- package/build/server/chunks/15-BbtT7FFe.js.map +1 -0
- package/build/server/chunks/{16-C4rP4sq1.js → 16-CQqolidT.js} +2 -2
- package/build/server/chunks/{16-C4rP4sq1.js.map → 16-CQqolidT.js.map} +1 -1
- package/build/server/chunks/{17-ClRSe3-O.js → 17-XuiwDpIi.js} +2 -2
- package/build/server/chunks/{17-ClRSe3-O.js.map → 17-XuiwDpIi.js.map} +1 -1
- package/build/server/chunks/{19-DCCUt_I_.js → 19-CJ3FZWfS.js} +2 -2
- package/build/server/chunks/{19-DCCUt_I_.js.map → 19-CJ3FZWfS.js.map} +1 -1
- package/build/server/chunks/{2-CRTHDZDg.js → 2-DdWDj4bF.js} +2 -2
- package/build/server/chunks/{2-CRTHDZDg.js.map → 2-DdWDj4bF.js.map} +1 -1
- package/build/server/chunks/{20-Bqn_Hog-.js → 20-D81XytuT.js} +2 -2
- package/build/server/chunks/{20-Bqn_Hog-.js.map → 20-D81XytuT.js.map} +1 -1
- package/build/server/chunks/{21-tHwvS2VE.js → 21-BWX-ggON.js} +2 -2
- package/build/server/chunks/{21-tHwvS2VE.js.map → 21-BWX-ggON.js.map} +1 -1
- package/build/server/chunks/{23-CjlgEkW8.js → 23-CmqHsyAK.js} +2 -2
- package/build/server/chunks/{23-CjlgEkW8.js.map → 23-CmqHsyAK.js.map} +1 -1
- package/build/server/chunks/{24-BLJ24n1x.js → 24-CbRCOBes.js} +2 -2
- package/build/server/chunks/{24-BLJ24n1x.js.map → 24-CbRCOBes.js.map} +1 -1
- package/build/server/chunks/{27-7PPspJ4o.js → 27-DzVhk-wE.js} +2 -2
- package/build/server/chunks/{27-7PPspJ4o.js.map → 27-DzVhk-wE.js.map} +1 -1
- package/build/server/chunks/{28-Cj4f8LeS.js → 28-C8-s9yBe.js} +2 -2
- package/build/server/chunks/{28-Cj4f8LeS.js.map → 28-C8-s9yBe.js.map} +1 -1
- package/build/server/chunks/{29-B36SMjZF.js → 29-BfMolGsW.js} +2 -2
- package/build/server/chunks/{29-B36SMjZF.js.map → 29-BfMolGsW.js.map} +1 -1
- package/build/server/chunks/{3-ByoVETsZ.js → 3-CyNTWn-4.js} +2 -2
- package/build/server/chunks/{3-ByoVETsZ.js.map → 3-CyNTWn-4.js.map} +1 -1
- package/build/server/chunks/{30-BUZh-uxK.js → 30-MuniAMA0.js} +2 -2
- package/build/server/chunks/{30-BUZh-uxK.js.map → 30-MuniAMA0.js.map} +1 -1
- package/build/server/chunks/{5-BItOzJDH.js → 5-BMrjSEud.js} +2 -2
- package/build/server/chunks/{5-BItOzJDH.js.map → 5-BMrjSEud.js.map} +1 -1
- package/build/server/chunks/{6-CA2Aephf.js → 6-_Of__4iG.js} +2 -2
- package/build/server/chunks/{6-CA2Aephf.js.map → 6-_Of__4iG.js.map} +1 -1
- package/build/server/chunks/{7-uBm9NdYN.js → 7-CvsUFCZS.js} +2 -2
- package/build/server/chunks/{7-uBm9NdYN.js.map → 7-CvsUFCZS.js.map} +1 -1
- package/build/server/chunks/{8-K8AHqphy.js → 8-BumJ3BW3.js} +2 -2
- package/build/server/chunks/{8-K8AHqphy.js.map → 8-BumJ3BW3.js.map} +1 -1
- package/build/server/chunks/{9-mW8A2Lrz.js → 9-Bzl9WJnt.js} +3 -3
- package/build/server/chunks/{9-mW8A2Lrz.js.map → 9-Bzl9WJnt.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BqMtP8Q7.js → _page.svelte-Bp8SPqhi.js} +5 -5
- package/build/server/chunks/{_page.svelte-BqMtP8Q7.js.map → _page.svelte-Bp8SPqhi.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CR79Ws-C.js → _page.svelte-D2SVtXT2.js} +48 -31
- package/build/server/chunks/_page.svelte-D2SVtXT2.js.map +1 -0
- package/build/server/chunks/{_server.ts-Xl5CYncx.js → _server.ts-BLhNqGtF.js} +9 -5
- package/build/server/chunks/_server.ts-BLhNqGtF.js.map +1 -0
- package/build/server/chunks/{_server.ts-KdED3s6W.js → _server.ts-D9Jw0wGY.js} +19 -31
- package/build/server/chunks/_server.ts-D9Jw0wGY.js.map +1 -0
- package/build/server/chunks/updateCheck.server-qRJNJ4LU.js +68 -0
- package/build/server/chunks/updateCheck.server-qRJNJ4LU.js.map +1 -0
- package/build/server/index.js +1 -1
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +26 -26
- package/build/server/manifest.js.map +1 -1
- package/package.json +4 -4
- package/build/client/_app/immutable/chunks/BGuW4NBA.js.br +0 -0
- package/build/client/_app/immutable/chunks/BGuW4NBA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOu0_8hg.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOu0_8hg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BRVNXmK7.js.br +0 -0
- package/build/client/_app/immutable/chunks/BRVNXmK7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bsojhuor.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bsojhuor.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ClNtf5dE.js +0 -3
- package/build/client/_app/immutable/chunks/ClNtf5dE.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClNtf5dE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dus1Wc-_.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dus1Wc-_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/VoeDk8Ji.js.br +0 -0
- package/build/client/_app/immutable/chunks/VoeDk8Ji.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BuFVNRIb.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BuFVNRIb.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BJkf9eCh.js +0 -1
- package/build/client/_app/immutable/entry/start.BJkf9eCh.js.br +0 -2
- package/build/client/_app/immutable/entry/start.BJkf9eCh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DTTqOpbo.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DTTqOpbo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.Bd_TroBi.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.Bd_TroBi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.CZPWgSyX.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.CZPWgSyX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.ErUEed70.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.ErUEed70.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.czhLtsoD.js +0 -13
- package/build/client/_app/immutable/nodes/15.czhLtsoD.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.czhLtsoD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.ZGqQw9u_.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.ZGqQw9u_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.BAfTvzjf.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.BAfTvzjf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/19.BA4Q7Ejv.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.BA4Q7Ejv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.qGoF_BJR.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.qGoF_BJR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.B7pbJgV7.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.B7pbJgV7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.CQUr9a-8.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.CQUr9a-8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/23.B1irvd8d.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DaWQ1jI1.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DaWQ1jI1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/27.BVltlINS.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.BVltlINS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/28.CkAyrVXL.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.CkAyrVXL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/29.DuyPKFrU.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.DuyPKFrU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.vtzWe8dr.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.vtzWe8dr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.B8jrnlRp.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.B8jrnlRp.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.Cung723A.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.Cung723A.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.ChV00aii.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.ChV00aii.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CoT_11A9.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CoT_11A9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DVP4Zm3d.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DVP4Zm3d.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.Cw9Pz35A.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.Cw9Pz35A.js.gz +0 -0
- package/build/server/chunks/15-BNeKc8aQ.js.map +0 -1
- package/build/server/chunks/_page.svelte-CR79Ws-C.js.map +0 -1
- package/build/server/chunks/_server.ts-KdED3s6W.js.map +0 -1
- package/build/server/chunks/_server.ts-Xl5CYncx.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.svelte-D2SVtXT2.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/admin/system/_page.svelte.js"],"sourcesContent":["import { aj as spread_props, k as attr_class, I as escape_html, am as stringify, j as attr, y as derived, G as ensure_array_like, T as head } from \"../../../../chunks/renderer.js\";\nimport { C as Card, a as Card_content } from \"../../../../chunks/card-content.js\";\nimport { C as Card_header, a as Card_title } from \"../../../../chunks/card-title.js\";\nimport { C as Card_description } from \"../../../../chunks/card-description.js\";\nimport { I as Icon } from \"../../../../chunks/Icon2.js\";\nimport { B as Button } from \"../../../../chunks/button.js\";\nimport { R as Refresh_cw } from \"../../../../chunks/refresh-cw.js\";\nimport { T as Triangle_alert } from \"../../../../chunks/triangle-alert.js\";\nimport { R as Root, b as Alert_dialog_content, e as Alert_dialog_header, f as Alert_dialog_title, c as Alert_dialog_description, d as Alert_dialog_footer, a as Alert_dialog_cancel, A as Alert_dialog_action } from \"../../../../chunks/index4.js\";\nimport { S as SectionHeader } from \"../../../../chunks/SectionHeader.js\";\nfunction Circle_arrow_up($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"10\" }],\n [\"path\", { \"d\": \"m16 12-4-4-4 4\" }],\n [\"path\", { \"d\": \"M12 16V8\" }]\n ];\n Icon($$renderer, spread_props([{ name: \"circle-arrow-up\" }, props, { iconNode }]));\n}\nfunction Circle_check($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"10\" }],\n [\"path\", { \"d\": \"m9 12 2 2 4-4\" }]\n ];\n Icon($$renderer, spread_props([{ name: \"circle-check\" }, props, { iconNode }]));\n}\nfunction Circle_x($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"10\" }],\n [\"path\", { \"d\": \"m15 9-6 6\" }],\n [\"path\", { \"d\": \"m9 9 6 6\" }]\n ];\n Icon($$renderer, spread_props([{ name: \"circle-x\" }, props, { iconNode }]));\n}\nfunction Info($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"10\" }],\n [\"path\", { \"d\": \"M12 16v-4\" }],\n [\"path\", { \"d\": \"M12 8h.01\" }]\n ];\n Icon($$renderer, spread_props([{ name: \"info\" }, props, { iconNode }]));\n}\nfunction Minus($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [[\"path\", { \"d\": \"M5 12h14\" }]];\n Icon($$renderer, spread_props([{ name: \"minus\" }, props, { iconNode }]));\n}\nfunction Stethoscope($$renderer, $$props) {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\"path\", { \"d\": \"M11 2v2\" }],\n [\"path\", { \"d\": \"M5 2v2\" }],\n [\n \"path\",\n {\n \"d\": \"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1\"\n }\n ],\n [\"path\", { \"d\": \"M8 15a6 6 0 0 0 12 0v-3\" }],\n [\"circle\", { \"cx\": \"20\", \"cy\": \"10\", \"r\": \"2\" }]\n ];\n Icon($$renderer, spread_props([{ name: \"stethoscope\" }, props, { iconNode }]));\n}\nfunction firstMatch(logs, re) {\n const m = re.exec(logs);\n return m ? m[1] : void 0;\n}\nfunction parseVersions(logs) {\n const avail = /Available:\\s*(\\d+\\.\\d+\\.\\d+[^\\s]*)\\s*(?:→|->)\\s*(\\d+\\.\\d+\\.\\d+[^\\s]*)/.exec(logs);\n if (avail) return { from: avail[1], to: avail[2] };\n const from = firstMatch(logs, /Current @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/);\n const to = firstMatch(logs, /New @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/);\n return { from, to };\n}\nfunction has(logs, needle) {\n return logs.includes(needle);\n}\nfunction deriveOutcome(exitCode, logs) {\n const { from, to } = parseVersions(logs);\n if (exitCode === null) {\n return { severity: \"pending\", title: \"Update in progress…\" };\n }\n if (exitCode === 6 || has(logs, \"Manual recovery required\") || has(logs, \"manual intervention required\")) {\n return {\n severity: \"critical\",\n title: \"Update failed AND rollback failed — the app may be OFFLINE\",\n detail: \"Both the new version and the rollback failed their health check. SSH into the server and run: `pm2 logs selva-compute`, then `pm2 start ecosystem.config.cjs` from the deployment directory.\",\n from,\n to\n };\n }\n if (exitCode === -2) {\n return {\n severity: \"critical\",\n title: \"App did not come back online within 5 minutes\",\n detail: \"The update may still be finishing in the background, or the new process is crash-looping. Check `pm2 logs selva-compute`. Do not re-run the update until you have confirmed the current state.\",\n from,\n to\n };\n }\n if (exitCode === 5 || has(logs, \"Rolled back\")) {\n return {\n severity: \"warning\",\n title: `Update failed — safely rolled back${from ? ` to ${from}` : \"\"}. The app is online.`,\n detail: \"The new version failed its health check, so the previous version was restored and is serving normally. Review the log below for why the new version failed before retrying.\",\n from,\n to\n };\n }\n if (has(logs, \"npm cache may be stale\") || has(logs, \"No version change\")) {\n return {\n severity: \"warning\",\n title: \"No version change — npm installed the same version.\",\n detail: \"Your npm cache may be stale. On the server: `npm cache clean --force`, remove node_modules + package-lock.json, then `npm install --prefer-online`.\",\n from,\n to\n };\n }\n if (exitCode === 0) {\n if (has(logs, \"Already on the latest version\") || has(logs, \"Nothing to do\")) {\n return {\n severity: \"info\",\n title: `Already up to date${from ? ` (${from})` : \"\"} — nothing to install.`,\n detail: \"No changes were made and the app was not restarted.\",\n from,\n to\n };\n }\n if (from && to && from !== to) {\n return {\n severity: \"success\",\n title: `Updated ${from} → ${to}. The app is back online.`,\n from,\n to\n };\n }\n if (to) {\n return {\n severity: \"success\",\n title: `Update complete — now on ${to}. The app is back online.`,\n from,\n to\n };\n }\n return {\n severity: \"success\",\n title: \"Update completed and the app is back online.\",\n from,\n to\n };\n }\n return {\n severity: \"critical\",\n title: `Update failed (exit code ${exitCode}).`,\n detail: \"The update did not complete cleanly. Review the log below, and check `pm2 logs selva-compute` to confirm whether the app is currently online.\",\n from,\n to\n };\n}\nfunction UpdateSection($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n currentVersion,\n latestVersion = null,\n updateAvailable = false,\n isRunning = false,\n isRestarting = false,\n logs = \"\",\n exitCode = null,\n onRun\n } = $$props;\n let showRunConfirm = false;\n let outcome = derived(() => exitCode === null ? null : deriveOutcome(exitCode, logs));\n const severityStyles = {\n success: {\n text: \"text-success\",\n border: \"border-success/40\",\n bg: \"bg-success/10\",\n icon: Circle_check\n },\n info: {\n text: \"text-foreground\",\n border: \"border-border\",\n bg: \"bg-muted/50\",\n icon: Info\n },\n warning: {\n text: \"text-warning\",\n border: \"border-warning/40\",\n bg: \"bg-warning/10\",\n icon: Triangle_alert\n },\n critical: {\n text: \"text-destructive\",\n border: \"border-destructive/40\",\n bg: \"bg-destructive/10\",\n icon: Circle_x\n },\n pending: {\n text: \"text-muted-foreground\",\n border: \"border-border\",\n bg: \"bg-muted/50\",\n icon: Refresh_cw\n }\n };\n function buttonLabel() {\n if (isRestarting) return \"Restarting & verifying…\";\n if (isRunning) return \"Running…\";\n return \"Run Update\";\n }\n function handleRunClick() {\n showRunConfirm = true;\n }\n function confirmRun() {\n showRunConfirm = false;\n onRun?.();\n }\n if (Card) {\n $$renderer2.push(\"<!--[-->\");\n Card($$renderer2, {\n children: ($$renderer3) => {\n if (Card_header) {\n $$renderer3.push(\"<!--[-->\");\n Card_header($$renderer3, {\n children: ($$renderer4) => {\n $$renderer4.push(`<div class=\"flex items-start justify-between gap-3\">`);\n if (Card_title) {\n $$renderer4.push(\"<!--[-->\");\n Card_title($$renderer4, {\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Application Update`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` `);\n if (currentVersion) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<span${attr_class(`rounded-full border px-2 py-0.5 font-mono text-xs ${stringify(updateAvailable ? \"border-warning/40 bg-warning/10 text-warning\" : \"border-border bg-muted text-muted-foreground\")}`)} title=\"Currently installed @selvajs/selva version\">v${escape_html(currentVersion)}</span>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--></div> `);\n if (Card_description) {\n $$renderer4.push(\"<!--[-->\");\n Card_description($$renderer4, {\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Update @selvajs/* to the latest published release and restart`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n $$renderer3.push(` `);\n if (Card_content) {\n $$renderer3.push(\"<!--[-->\");\n Card_content($$renderer3, {\n class: \"space-y-4\",\n children: ($$renderer4) => {\n if (updateAvailable && latestVersion) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<div class=\"border-warning/40 bg-warning/10 text-warning flex items-center gap-2 rounded-md border px-3 py-2 text-sm\" role=\"status\">`);\n Circle_arrow_up($$renderer4, { class: \"h-4 w-4 shrink-0\" });\n $$renderer4.push(`<!----> <span>Update available — <span class=\"font-mono\">v${escape_html(currentVersion)}</span> → <span class=\"font-mono\">v${escape_html(latestVersion)}</span></span></div>`);\n } else if (currentVersion && latestVersion) {\n $$renderer4.push(\"<!--[1-->\");\n $$renderer4.push(`<p class=\"text-muted-foreground text-sm\">You're on the latest release (<span class=\"font-mono\">v${escape_html(currentVersion)}</span>).</p>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--> `);\n Button($$renderer4, {\n onclick: handleRunClick,\n disabled: isRunning,\n variant: \"destructive\",\n children: ($$renderer5) => {\n if (isRestarting) {\n $$renderer5.push(\"<!--[0-->\");\n Refresh_cw($$renderer5, { class: \"mr-2 h-4 w-4 animate-spin\" });\n } else {\n $$renderer5.push(\"<!--[-1-->\");\n }\n $$renderer5.push(`<!--]--> ${escape_html(buttonLabel())}`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(`<!----> `);\n if (isRestarting && exitCode === null) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<div class=\"border-border bg-muted/50 text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm\">`);\n Refresh_cw($$renderer4, { class: \"h-4 w-4 animate-spin\" });\n $$renderer4.push(`<!----> <span>PM2 is restarting the app — waiting for the new process to come online…</span></div>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--> `);\n if (outcome()) {\n $$renderer4.push(\"<!--[0-->\");\n const style = severityStyles[outcome().severity];\n const Icon2 = style.icon;\n $$renderer4.push(`<div${attr_class(`flex items-start gap-3 rounded-md border px-3 py-3 ${stringify(style.border)} ${stringify(style.bg)}`)}${attr(\"role\", outcome().severity === \"critical\" ? \"alert\" : \"status\")}${attr(\"aria-live\", outcome().severity === \"critical\" ? \"assertive\" : \"polite\")}>`);\n if (Icon2) {\n $$renderer4.push(\"<!--[-->\");\n Icon2($$renderer4, { class: `mt-0.5 h-5 w-5 shrink-0 ${stringify(style.text)}` });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` <div class=\"min-w-0 space-y-1\"><p${attr_class(`text-sm font-medium ${stringify(style.text)}`)}>${escape_html(outcome().title)}</p> `);\n if (outcome().from && outcome().to && outcome().from !== outcome().to) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<p class=\"text-muted-foreground font-mono text-xs\">${escape_html(outcome().from)} → ${escape_html(outcome().to)}</p>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--> `);\n if (outcome().detail) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<p class=\"text-muted-foreground text-xs whitespace-pre-line\">${escape_html(outcome().detail)}</p>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--></div></div>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--> `);\n if (logs) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<div class=\"space-y-2\"><h4 class=\"text-sm font-medium\">Update Logs</h4> <pre class=\"bg-muted text-foreground max-h-96 overflow-auto rounded-md p-4 font-mono text-xs\">${escape_html(logs)}</pre></div>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]-->`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer2.push(\"<!--]-->\");\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(\"<!--]-->\");\n }\n $$renderer2.push(` `);\n if (Root) {\n $$renderer2.push(\"<!--[-->\");\n Root($$renderer2, {\n open: showRunConfirm,\n onOpenChange: (o) => showRunConfirm = o,\n children: ($$renderer3) => {\n if (Alert_dialog_content) {\n $$renderer3.push(\"<!--[-->\");\n Alert_dialog_content($$renderer3, {\n children: ($$renderer4) => {\n if (Alert_dialog_header) {\n $$renderer4.push(\"<!--[-->\");\n Alert_dialog_header($$renderer4, {\n children: ($$renderer5) => {\n if (Alert_dialog_title) {\n $$renderer5.push(\"<!--[-->\");\n Alert_dialog_title($$renderer5, {\n children: ($$renderer6) => {\n $$renderer6.push(`<!---->Run Update?`);\n },\n $$slots: { default: true }\n });\n $$renderer5.push(\"<!--]-->\");\n } else {\n $$renderer5.push(\"<!--[!-->\");\n $$renderer5.push(\"<!--]-->\");\n }\n $$renderer5.push(` `);\n if (Alert_dialog_description) {\n $$renderer5.push(\"<!--[-->\");\n Alert_dialog_description($$renderer5, {\n children: ($$renderer6) => {\n $$renderer6.push(`<!---->This will pull the latest changes and restart the application. The service will be\n\t\t\t\ttemporarily unavailable.`);\n },\n $$slots: { default: true }\n });\n $$renderer5.push(\"<!--]-->\");\n } else {\n $$renderer5.push(\"<!--[!-->\");\n $$renderer5.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` `);\n if (Alert_dialog_footer) {\n $$renderer4.push(\"<!--[-->\");\n Alert_dialog_footer($$renderer4, {\n children: ($$renderer5) => {\n if (Alert_dialog_cancel) {\n $$renderer5.push(\"<!--[-->\");\n Alert_dialog_cancel($$renderer5, {\n children: ($$renderer6) => {\n $$renderer6.push(`<!---->Cancel`);\n },\n $$slots: { default: true }\n });\n $$renderer5.push(\"<!--]-->\");\n } else {\n $$renderer5.push(\"<!--[!-->\");\n $$renderer5.push(\"<!--]-->\");\n }\n $$renderer5.push(` `);\n if (Alert_dialog_action) {\n $$renderer5.push(\"<!--[-->\");\n Alert_dialog_action($$renderer5, {\n onclick: confirmRun,\n disabled: isRunning,\n children: ($$renderer6) => {\n $$renderer6.push(`<!---->${escape_html(isRestarting ? \"Restarting…\" : \"Continue\")}`);\n },\n $$slots: { default: true }\n });\n $$renderer5.push(\"<!--]-->\");\n } else {\n $$renderer5.push(\"<!--[!-->\");\n $$renderer5.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer2.push(\"<!--]-->\");\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(\"<!--]-->\");\n }\n });\n}\nfunction HealthSection($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let running = false;\n let report = null;\n let error = null;\n const statusStyle = {\n ok: { text: \"text-success\", icon: Circle_check, label: \"OK\" },\n degraded: { text: \"text-warning\", icon: Triangle_alert, label: \"Degraded\" },\n error: { text: \"text-destructive\", icon: Circle_x, label: \"Error\" },\n not_applicable: { text: \"text-muted-foreground\", icon: Minus, label: \"N/A\" }\n };\n async function runCheck() {\n running = true;\n error = null;\n try {\n const res = await fetch(\"/admin/api/system/health\", { cache: \"no-store\" });\n if (!res.ok) {\n error = `Health check request failed (HTTP ${res.status}).`;\n report = null;\n return;\n }\n report = await res.json();\n } catch (err) {\n error = err instanceof Error ? err.message : \"Health check request failed.\";\n report = null;\n } finally {\n running = false;\n }\n }\n if (Card) {\n $$renderer2.push(\"<!--[-->\");\n Card($$renderer2, {\n children: ($$renderer3) => {\n if (Card_header) {\n $$renderer3.push(\"<!--[-->\");\n Card_header($$renderer3, {\n children: ($$renderer4) => {\n if (Card_title) {\n $$renderer4.push(\"<!--[-->\");\n Card_title($$renderer4, {\n class: \"text-sm font-medium\",\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->System health`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` `);\n if (Card_description) {\n $$renderer4.push(\"<!--[-->\");\n Card_description($$renderer4, {\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Re-runs runtime integrity checks live (not the cached boot snapshot), so results reflect the\n\t\t\tcurrent state after any fix.`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n $$renderer3.push(` `);\n if (Card_content) {\n $$renderer3.push(\"<!--[-->\");\n Card_content($$renderer3, {\n class: \"space-y-4\",\n children: ($$renderer4) => {\n Button($$renderer4, {\n onclick: runCheck,\n disabled: running,\n variant: \"outline\",\n children: ($$renderer5) => {\n Stethoscope($$renderer5, {\n class: `mr-2 h-4 w-4 ${stringify(running ? \"animate-pulse\" : \"\")}`\n });\n $$renderer5.push(`<!----> ${escape_html(running ? \"Checking…\" : \"Run health check\")}`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(`<!----> `);\n if (error) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<div class=\"border-destructive/40 bg-destructive/10 text-destructive flex items-start gap-2 rounded-md border px-3 py-2 text-sm\" role=\"alert\">`);\n Circle_x($$renderer4, { class: \"mt-0.5 h-4 w-4 shrink-0\" });\n $$renderer4.push(`<!----> <span>${escape_html(error)}</span></div>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--> `);\n if (report) {\n $$renderer4.push(\"<!--[0-->\");\n const overall = statusStyle[report.overall];\n const OverallIcon = overall.icon;\n $$renderer4.push(`<div class=\"space-y-3\"><div${attr_class(`flex items-center gap-2 text-sm font-medium ${stringify(overall.text)}`)}>`);\n if (OverallIcon) {\n $$renderer4.push(\"<!--[-->\");\n OverallIcon($$renderer4, { class: \"h-5 w-5\" });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` <span>${escape_html(report.overall === \"ok\" ? \"All checks passed\" : report.overall === \"degraded\" ? \"Attention needed\" : report.overall === \"error\" ? \"Check failed to run\" : \"No applicable checks\")}</span> <span class=\"text-muted-foreground ml-auto text-xs font-normal\">${escape_html(new Date(report.checkedAt).toLocaleTimeString())}</span></div> <div class=\"divide-y rounded-lg border\"><!--[-->`);\n const each_array = ensure_array_like(report.checks);\n for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {\n let check = each_array[$$index];\n const style = statusStyle[check.status];\n const Icon2 = style.icon;\n $$renderer4.push(`<div class=\"flex items-start gap-3 px-4 py-3\">`);\n if (Icon2) {\n $$renderer4.push(\"<!--[-->\");\n Icon2($$renderer4, { class: `mt-0.5 h-4 w-4 shrink-0 ${stringify(style.text)}` });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` <div class=\"min-w-0 flex-1 space-y-1\"><div class=\"flex items-center justify-between gap-2\"><span class=\"text-sm font-medium\">${escape_html(check.label)}</span> <span${attr_class(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-wide uppercase ${stringify(style.text)}`)}>${escape_html(style.label)}</span></div> <p class=\"text-muted-foreground text-xs\">${escape_html(check.summary)}</p> `);\n if (check.remediation) {\n $$renderer4.push(\"<!--[0-->\");\n $$renderer4.push(`<p class=\"text-foreground text-xs\">${escape_html(check.remediation)}</p>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]--></div></div>`);\n }\n $$renderer4.push(`<!--]--></div></div>`);\n } else {\n $$renderer4.push(\"<!--[-1-->\");\n }\n $$renderer4.push(`<!--]-->`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer2.push(\"<!--]-->\");\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(\"<!--]-->\");\n }\n });\n}\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { data } = $$props;\n const flagDescriptions = {\n ALLOW_CROSS_ORG_PUBLIC: \"When on, projects can be made visible to every authenticated user on the instance, not just their own org.\",\n ALLOW_ORG_COMPUTE_OVERRIDE: \"When on, individual orgs can configure their own Rhino.Compute server instead of the instance pool.\",\n ALLOW_ORG_CREATION: 'When on, signed-in users see a \"Create organization\" action. Off by default in self-hosted instances.',\n ENABLE_PLATFORM_PROJECTS: \"When on, the Admin → Projects surface is reachable: instance admins can create platform-owned projects and grant view/solve access to orgs or individual users. When off, the surface 404s and platform-visibility projects are hidden everywhere — existing rows are preserved.\",\n ENABLE_SHARING: \"When on, editors can mint per-definition share links that grant anonymous external access. When off, the mint/list/revoke routes return 404 and any previously-minted tokens stop resolving.\"\n };\n let updateRunning = false;\n let updateLogs = \"\";\n let updateExitCode = null;\n let updateRestarting = false;\n async function fetchHealth() {\n try {\n const res = await fetch(\"/api/health\", { cache: \"no-store\" });\n if (!res.ok) return null;\n return await res.json();\n } catch {\n return null;\n }\n }\n async function fetchUpdateLog() {\n try {\n const res = await fetch(\"/admin/api/system/update\", { cache: \"no-store\" });\n if (!res.ok) return null;\n return await res.text();\n } catch {\n return null;\n }\n }\n function exitCodeFromLog(log) {\n if (/\\bManual recovery required\\b/.test(log)) return 6;\n if (/\\bRolled back to .* — previous version is online\\b/.test(log)) return 5;\n if (/New process failed health check/.test(log) && !/Rolled back/.test(log)) return 3;\n if (/\\[FATAL\\]/.test(log) && !/\\[DONE\\]/.test(log)) return 1;\n if (/\\[DONE\\]/.test(log)) return 0;\n return null;\n }\n async function waitForAppRestart(previousInstanceId) {\n updateLogs += \"\\nWaiting for app to come back online…\\n\";\n await new Promise((r) => setTimeout(r, 2e3));\n const maxAttempts = 150;\n for (let i = 0; i < maxAttempts; i++) {\n const [health, log] = await Promise.all([fetchHealth(), fetchUpdateLog()]);\n if (log && log.trim().length > 0) {\n updateLogs = log;\n }\n const newProcessUp = health?.instanceId && health.instanceId !== previousInstanceId;\n const logVerdict = exitCodeFromLog(updateLogs);\n if (newProcessUp) {\n updateExitCode = logVerdict ?? 0;\n updateRunning = false;\n updateRestarting = false;\n return;\n }\n if (!previousInstanceId && health && logVerdict !== null) {\n updateExitCode = logVerdict;\n updateRunning = false;\n updateRestarting = false;\n return;\n }\n await new Promise((r) => setTimeout(r, 2e3));\n }\n const finalLog = await fetchUpdateLog();\n if (finalLog && finalLog.trim().length > 0) updateLogs = finalLog;\n updateLogs += \"\\n⚠ App did not come back within 5 minutes — check PM2 logs.\\n\";\n updateExitCode = -2;\n updateRunning = false;\n updateRestarting = false;\n }\n async function runUpdate() {\n updateRunning = true;\n updateRestarting = false;\n updateLogs = \"\";\n updateExitCode = null;\n const preHealth = await fetchHealth();\n const previousInstanceId = preHealth?.instanceId ?? null;\n try {\n const response = await fetch(\"/admin/api/system/update\", { method: \"POST\" });\n if (!response.ok) {\n updateLogs = \"Failed to start update process\";\n updateExitCode = response.status;\n updateRunning = false;\n return;\n }\n const reader = response.body?.getReader();\n const decoder = new TextDecoder();\n if (!reader) {\n updateLogs = \"Failed to read response\";\n updateExitCode = -1;\n updateRunning = false;\n return;\n }\n let buffer = \"\";\n let sawRestarting = false;\n let sawExit = false;\n let streamExitCode = null;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n const parts = buffer.split(\"\\n\\n\");\n buffer = parts.pop();\n for (const part of parts) {\n if (!part.startsWith(\"data: \")) continue;\n try {\n const event = JSON.parse(part.slice(6));\n if (event.type === \"log\") {\n updateLogs += event.data + \"\\n\";\n } else if (event.type === \"restarting\") {\n updateLogs += event.data + \"\\n\";\n updateRestarting = true;\n sawRestarting = true;\n } else if (event.type === \"exit\") {\n sawExit = true;\n streamExitCode = event.code;\n }\n } catch {\n }\n }\n }\n if (sawRestarting) {\n await waitForAppRestart(previousInstanceId);\n } else if (sawExit && streamExitCode === 0) {\n updateExitCode = 0;\n updateRunning = false;\n } else if (sawExit) {\n updateExitCode = streamExitCode ?? -1;\n updateRunning = false;\n } else {\n await waitForAppRestart(previousInstanceId);\n }\n } catch (err) {\n if (updateRestarting) {\n await waitForAppRestart(previousInstanceId);\n } else {\n updateLogs += \"\\nError: \" + (err instanceof Error ? err.message : \"Unknown error\");\n updateExitCode = -1;\n updateRunning = false;\n }\n }\n }\n head(\"1uq49ma\", $$renderer2, ($$renderer3) => {\n $$renderer3.title(($$renderer4) => {\n $$renderer4.push(`<title>Admin · System</title>`);\n });\n });\n $$renderer2.push(`<div class=\"space-y-6\">`);\n SectionHeader($$renderer2, {\n eyebrow: \"Admin\",\n title: \"System settings\",\n description: \"Instance-wide configuration, platform flags, and the update runner. To change platform flags, edit SELVA_FLAG_* in your .env and restart the app.\"\n });\n $$renderer2.push(`<!----> `);\n if (Card) {\n $$renderer2.push(\"<!--[-->\");\n Card($$renderer2, {\n children: ($$renderer3) => {\n if (Card_header) {\n $$renderer3.push(\"<!--[-->\");\n Card_header($$renderer3, {\n children: ($$renderer4) => {\n if (Card_title) {\n $$renderer4.push(\"<!--[-->\");\n Card_title($$renderer4, {\n class: \"text-sm font-medium\",\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Platform flags`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n $$renderer4.push(` `);\n if (Card_description) {\n $$renderer4.push(\"<!--[-->\");\n Card_description($$renderer4, {\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Resolved state of the env-driven flags that control instance behavior. To change a flag,\n\t\t\t\tedit your environment configuration and restart the app.`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(\"<!--]-->\");\n } else {\n $$renderer4.push(\"<!--[!-->\");\n $$renderer4.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n $$renderer3.push(` `);\n if (Card_content) {\n $$renderer3.push(\"<!--[-->\");\n Card_content($$renderer3, {\n children: ($$renderer4) => {\n $$renderer4.push(`<div class=\"divide-y rounded-lg border\"><!--[-->`);\n const each_array = ensure_array_like(Object.entries(data.flags));\n for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {\n let [name, value] = each_array[$$index];\n $$renderer4.push(`<div class=\"flex items-start justify-between gap-4 px-4 py-3\"><div class=\"min-w-0 flex-1\"><code class=\"text-foreground font-mono text-xs\">${escape_html(name)}</code> <p class=\"text-muted-foreground mt-1 text-xs\">${escape_html(flagDescriptions[name])}</p></div> <span${attr_class(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-wide uppercase ${value ? \"border-success/40 bg-success/10 text-success\" : \"border-border text-muted-foreground\"}`)}>${escape_html(value ? \"On\" : \"Off\")}</span></div>`);\n }\n $$renderer4.push(`<!--]--></div>`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(\"<!--]-->\");\n } else {\n $$renderer3.push(\"<!--[!-->\");\n $$renderer3.push(\"<!--]-->\");\n }\n },\n $$slots: { default: true }\n });\n $$renderer2.push(\"<!--]-->\");\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(\"<!--]-->\");\n }\n $$renderer2.push(` `);\n if (data.isInstanceAdmin) {\n $$renderer2.push(\"<!--[0-->\");\n HealthSection($$renderer2);\n } else {\n $$renderer2.push(\"<!--[-1-->\");\n }\n $$renderer2.push(`<!--]--> `);\n if (data.canManageUpdates) {\n $$renderer2.push(\"<!--[0-->\");\n UpdateSection($$renderer2, {\n currentVersion: data.version,\n latestVersion: data.update.latest,\n updateAvailable: data.update.updateAvailable,\n isRunning: updateRunning,\n isRestarting: updateRestarting,\n logs: updateLogs,\n exitCode: updateExitCode,\n onRun: runUpdate\n });\n } else {\n $$renderer2.push(\"<!--[-1-->\");\n }\n $$renderer2.push(`<!--]--></div>`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE;AAC9C,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO;AAC/C,EAAE,MAAM,QAAQ,GAAG;AACnB,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACrD,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC;AACvC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE;AAChC,GAAG;AACH,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AACpF;AACA,SAAS,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE;AAC3C,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO;AAC/C,EAAE,MAAM,QAAQ,GAAG;AACnB,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACrD,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE;AACrC,GAA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';
|
|
3
|
+
import { createRequire } from 'module';
|
|
3
4
|
import { g as getBootHealth, i as isDegraded } from './bootHealth.server-CLLVkbZZ.js';
|
|
4
5
|
import './context-DKDYb-He.js';
|
|
5
6
|
import 'zod';
|
|
@@ -12,9 +13,11 @@ import 'node:crypto';
|
|
|
12
13
|
import 'node:fs/promises';
|
|
13
14
|
import '@supabase/supabase-js';
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
+
const INSTANCE_ID = randomUUID();
|
|
17
|
+
const RUNTIME_VERSION = (() => {
|
|
16
18
|
try {
|
|
17
|
-
|
|
19
|
+
const require2 = createRequire(import.meta.url);
|
|
20
|
+
return require2("@selvajs/selva/package.json").version;
|
|
18
21
|
} catch {
|
|
19
22
|
return null;
|
|
20
23
|
}
|
|
@@ -25,11 +28,12 @@ const GET = async () => {
|
|
|
25
28
|
const body = {
|
|
26
29
|
status: degraded ? "degraded" : "ok",
|
|
27
30
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
28
|
-
|
|
31
|
+
instanceId: INSTANCE_ID,
|
|
32
|
+
version: RUNTIME_VERSION,
|
|
29
33
|
boot
|
|
30
34
|
};
|
|
31
35
|
return json(body, { status: degraded ? 503 : 200 });
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
export { GET };
|
|
35
|
-
//# sourceMappingURL=_server.ts-
|
|
39
|
+
//# sourceMappingURL=_server.ts-BLhNqGtF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-BLhNqGtF.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/health/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { randomUUID } from \"crypto\";\nimport { createRequire } from \"module\";\nimport { g as getBootHealth, i as isDegraded } from \"../../../../chunks/bootHealth.server.js\";\nconst INSTANCE_ID = randomUUID();\nconst RUNTIME_VERSION = (() => {\n try {\n const require2 = createRequire(import.meta.url);\n return require2(\"@selvajs/selva/package.json\").version;\n } catch {\n return null;\n }\n})();\nconst GET = async () => {\n const boot = await getBootHealth();\n const degraded = isDegraded(boot);\n const body = {\n status: degraded ? \"degraded\" : \"ok\",\n timestamp: (/* @__PURE__ */ new Date()).toISOString(),\n instanceId: INSTANCE_ID,\n version: RUNTIME_VERSION,\n boot\n };\n return json(body, { status: degraded ? 503 : 200 });\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,MAAM,WAAW,GAAG,UAAU,EAAE;AAChC,MAAM,eAAe,GAAG,CAAC,MAAM;AAC/B,EAAE,IAAI;AACN,IAAI,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACnD,IAAI,OAAO,QAAQ,CAAC,6BAA6B,CAAC,CAAC,OAAO;AAC1D,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,OAAO,IAAI;AACf,EAAE;AACF,CAAC,GAAG;AACC,MAAC,GAAG,GAAG,YAAY;AACxB,EAAE,MAAM,IAAI,GAAG,MAAM,aAAa,EAAE;AACpC,EAAE,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC;AACnC,EAAE,MAAM,IAAI,GAAG;AACf,IAAI,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,IAAI;AACxC,IAAI,SAAS,EAAE,iBAAiB,IAAI,IAAI,EAAE,EAAE,WAAW,EAAE;AACzD,IAAI,UAAU,EAAE,WAAW;AAC3B,IAAI,OAAO,EAAE,eAAe;AAC5B,IAAI;AACJ,GAAG;AACH,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AACrD;;;;"}
|
|
@@ -2,8 +2,9 @@ import { spawn } from 'child_process';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { readFileSync, existsSync } from 'fs';
|
|
4
4
|
import { p as private_env } from './shared-server-C3WdcJCQ.js';
|
|
5
|
+
import { json } from '@sveltejs/kit';
|
|
5
6
|
import { z as requirePermission } from './access.server-ByXvmWyF.js';
|
|
6
|
-
import '
|
|
7
|
+
import { c as checkForUpdate } from './updateCheck.server-qRJNJ4LU.js';
|
|
7
8
|
import './context-DKDYb-He.js';
|
|
8
9
|
import 'zod';
|
|
9
10
|
import './providers.server-wGknM6CR.js';
|
|
@@ -249,32 +250,18 @@ echo "[FATAL] Manual recovery required. Check: pm2 logs selva-compute"
|
|
|
249
250
|
exit 6
|
|
250
251
|
`;
|
|
251
252
|
}
|
|
253
|
+
function isDeploymentDir(dir) {
|
|
254
|
+
return existsSync(join(dir, "node_modules", "@selvajs", "selva", "package.json"));
|
|
255
|
+
}
|
|
256
|
+
const NPM_UPDATE_ARGS = ["update", "--save", "--prefer-online", "@selvajs/cli", "@selvajs/selva"];
|
|
252
257
|
function detectUpdatePlan() {
|
|
253
|
-
if (private_env.INSTALL_DIR &&
|
|
254
|
-
return {
|
|
255
|
-
mode: "git",
|
|
256
|
-
cwd: private_env.INSTALL_DIR,
|
|
257
|
-
cmd: "bash",
|
|
258
|
-
args: [join(private_env.INSTALL_DIR, "scripts", "update.sh")]
|
|
259
|
-
};
|
|
258
|
+
if (private_env.INSTALL_DIR && isDeploymentDir(private_env.INSTALL_DIR)) {
|
|
259
|
+
return { cwd: private_env.INSTALL_DIR, args: NPM_UPDATE_ARGS };
|
|
260
260
|
}
|
|
261
261
|
let dir = process.cwd();
|
|
262
262
|
for (let i = 0; i < 6; i++) {
|
|
263
|
-
if (
|
|
264
|
-
return {
|
|
265
|
-
mode: "git",
|
|
266
|
-
cwd: dir,
|
|
267
|
-
cmd: "bash",
|
|
268
|
-
args: [join(dir, "scripts", "update.sh")]
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
if (existsSync(join(dir, "node_modules", "@selvajs", "selva", "package.json"))) {
|
|
272
|
-
return {
|
|
273
|
-
mode: "npm",
|
|
274
|
-
cwd: dir,
|
|
275
|
-
cmd: "npm",
|
|
276
|
-
args: ["update", "--save", "--prefer-online", "@selvajs/cli", "@selvajs/selva"]
|
|
277
|
-
};
|
|
263
|
+
if (isDeploymentDir(dir)) {
|
|
264
|
+
return { cwd: dir, args: NPM_UPDATE_ARGS };
|
|
278
265
|
}
|
|
279
266
|
const parent = join(dir, "..");
|
|
280
267
|
if (parent === dir) break;
|
|
@@ -288,7 +275,7 @@ const POST = async ({ locals }) => {
|
|
|
288
275
|
if (!plan) {
|
|
289
276
|
return new Response(
|
|
290
277
|
JSON.stringify({
|
|
291
|
-
error: "Couldn't determine how to update this deployment. Expected
|
|
278
|
+
error: "Couldn't determine how to update this deployment. Expected node_modules/@selvajs/selva (CLI scaffold) in the cwd or a parent directory."
|
|
292
279
|
}),
|
|
293
280
|
{ status: 500, headers: { "Content-Type": "application/json" } }
|
|
294
281
|
);
|
|
@@ -303,14 +290,12 @@ const POST = async ({ locals }) => {
|
|
|
303
290
|
controller.enqueue(encoder.encode(message));
|
|
304
291
|
}
|
|
305
292
|
try {
|
|
306
|
-
const versionBefore =
|
|
293
|
+
const versionBefore = readRuntimeVersion(plan.cwd);
|
|
307
294
|
const prelude = [
|
|
308
|
-
`[INFO]
|
|
295
|
+
`[INFO] Updating deployment (cwd: ${plan.cwd})`,
|
|
309
296
|
...versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : []
|
|
310
297
|
];
|
|
311
|
-
const runnerScript =
|
|
312
|
-
exec ${shellQuote(plan.cmd)} ${plan.args.map(shellQuote).join(" ")}
|
|
313
|
-
` : buildNpmRunnerScript(
|
|
298
|
+
const runnerScript = buildNpmRunnerScript(
|
|
314
299
|
plan.args,
|
|
315
300
|
versionBefore,
|
|
316
301
|
join(plan.cwd, "ecosystem.config.cjs")
|
|
@@ -391,8 +376,11 @@ exec ${shellQuote(plan.cmd)} ${plan.args.map(shellQuote).join(" ")}
|
|
|
391
376
|
}
|
|
392
377
|
});
|
|
393
378
|
};
|
|
394
|
-
const GET = async ({ locals }) => {
|
|
379
|
+
const GET = async ({ locals, url, fetch }) => {
|
|
395
380
|
requirePermission(locals, "instance_admin");
|
|
381
|
+
if (url.searchParams.get("check") !== null) {
|
|
382
|
+
return json(await checkForUpdate(fetch), { headers: { "Cache-Control": "no-store" } });
|
|
383
|
+
}
|
|
396
384
|
let body = "";
|
|
397
385
|
try {
|
|
398
386
|
body = readFileSync(UPDATE_LOG_PATH, "utf8");
|
|
@@ -407,4 +395,4 @@ const GET = async ({ locals }) => {
|
|
|
407
395
|
};
|
|
408
396
|
|
|
409
397
|
export { GET, POST };
|
|
410
|
-
//# sourceMappingURL=_server.ts-
|
|
398
|
+
//# sourceMappingURL=_server.ts-D9Jw0wGY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-D9Jw0wGY.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/admin/api/system/update/_server.ts.js"],"sourcesContent":["import { spawn } from \"child_process\";\nimport { join } from \"path\";\nimport { readFileSync, existsSync } from \"fs\";\nimport { p as private_env } from \"../../../../../../chunks/shared-server.js\";\nimport { json } from \"@sveltejs/kit\";\nimport { z as requirePermission } from \"../../../../../../chunks/access.server.js\";\nimport { c as checkForUpdate } from \"../../../../../../chunks/updateCheck.server.js\";\nconst UPDATE_LOG_PATH = \"/tmp/selva-update.log\";\nfunction stripAnsi(str) {\n return str.replace(/\\x1B\\[[0-9;]*[mGKHF]/g, \"\");\n}\nfunction readRuntimeVersion(dir) {\n try {\n const pkg = JSON.parse(\n readFileSync(join(dir, \"node_modules\", \"@selvajs\", \"selva\", \"package.json\"), \"utf8\")\n );\n return typeof pkg.version === \"string\" ? pkg.version : void 0;\n } catch {\n return void 0;\n }\n}\nfunction shellQuote(s) {\n return `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\nfunction buildLauncher(runnerScript, prelude = []) {\n const echoes = prelude.map((line) => `echo ${shellQuote(line)}`).join(\"\\n\");\n return `\nLOGFILE=${shellQuote(UPDATE_LOG_PATH)}\nRUNNER=/tmp/selva-update-runner.sh\nmkdir -p \"$(dirname \"$LOGFILE\")\"\n: > \"$LOGFILE\"\n\ncat > \"$RUNNER\" <<'__SELVA_RUNNER_EOF__'\n${runnerScript}\n__SELVA_RUNNER_EOF__\nchmod +x \"$RUNNER\"\n\ntrap '' PIPE\nexec > >(tee --output-error=warn-nopipe -a \"$LOGFILE\" 2>/dev/null) 2>&1\n${echoes}\n\n# Daemonize the runner so PM2's tree-kill of selva-compute can't reach it.\n# setsid puts it in a new session; the trailing & + disown + launcher exit\n# leaves the runner with PPID=1 once we're gone. stdin/stdout/stderr are\n# fully detached from this process (and from selva-compute's pipes).\nsetsid bash \"$RUNNER\" </dev/null >>\"$LOGFILE\" 2>&1 &\nRUNNER_PID=$!\ndisown\necho \"[INFO] Update runner started (PID $RUNNER_PID, log: $LOGFILE)\"\n\n# Small pause so the runner has time to print its first line before SSE\n# closes — otherwise the frontend's first poll might see no progress.\nsleep 1\nexit 0\n`;\n}\nfunction buildNpmRunnerScript(npmArgs, versionBefore, ecosystemPath) {\n const npmCommand = [\"npm\", ...npmArgs].map(shellQuote).join(\" \");\n const before = shellQuote(versionBefore ?? \"\");\n const ecosystem = shellQuote(ecosystemPath);\n return `#!/bin/bash\nset -o pipefail\nBEFORE=${before}\nECOSYSTEM=${ecosystem}\n\n# Last-resort safety net. If the script exits with the app NOT online for\n# any reason (crash, kill -9, network blip, npm hang past timeout), try to\n# bring it back from ecosystem.config.cjs before we go. The whole point of\n# this script is to update the app; leaving it down is the worst possible\n# outcome.\non_exit() {\n STATUS=$(pm2 jlist 2>/dev/null | node -e \"\n try {\n const list = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));\n const app = list.find(p => p.name === 'selva-compute');\n process.stdout.write(app ? app.pm2_env.status : 'missing');\n } catch { process.stdout.write('error'); }\n \" 2>/dev/null || echo \"error\")\n if [ \"$STATUS\" != \"online\" ]; then\n echo \"[RECOVER] selva-compute is '$STATUS' — starting from ecosystem.config.cjs\"\n pm2 start \"$ECOSYSTEM\" --update-env >/dev/null 2>&1 || \\\\\n echo \"[RECOVER] pm2 start failed — manual intervention required: cd $(dirname \"$ECOSYSTEM\") && pm2 start ecosystem.config.cjs\"\n fi\n}\ntrap on_exit EXIT\n\n# ---------------------------------------------------------------------------\n# 1. Pre-flight: skip the whole cycle if there's nothing to install.\n# ---------------------------------------------------------------------------\n# Without this, clicking \"Update\" on an already-current instance triggered\n# a full stop/install/start cycle and a downtime window for no reason. Now\n# we just check the registry first.\necho \"[STEP] Checking npm registry for available updates\"\nLATEST=$(npm view @selvajs/selva version --silent 2>/dev/null || echo \"\")\nif [ -z \"$LATEST\" ]; then\n echo \"[WARN] Could not query npm registry — proceeding with update attempt anyway\"\nelif [ -n \"$BEFORE\" ] && [ \"$LATEST\" = \"$BEFORE\" ]; then\n echo \"[INFO] Already on the latest version ($BEFORE)\"\n echo \"[DONE] Nothing to do\"\n exit 0\nelse\n echo \"[INFO] Available: $BEFORE → $LATEST\"\nfi\n\n# ---------------------------------------------------------------------------\n# 2. Resync PM2 daemon if its in-memory version drifted from the CLI on disk.\n# ---------------------------------------------------------------------------\n# After a global pm2 upgrade the daemon keeps running its original version\n# while the CLI moves forward. Process commands then talk to a stale daemon\n# and the symptom is \"stop works, start never lands\". \\`pm2 update\\` dumps\n# processes, kills the daemon, respawns on the current CLI, restores the\n# dump. Doing it before we touch anything keeps the rest of the script\n# talking to a coherent daemon.\necho \"[STEP] Checking PM2 daemon/CLI version sync\"\nif pm2 ping 2>&1 | grep -q \"out-of-date\" || pm2 list 2>&1 | grep -q \"out-of-date\"; then\n echo \"[STEP] PM2 daemon is out-of-date — running 'pm2 update' to resync\"\n if ! pm2 update; then\n echo \"[FATAL] pm2 update failed — aborting before stopping the running app\"\n exit 1\n fi\n echo \"[INFO] PM2 daemon resynced\"\nfi\n\n# ---------------------------------------------------------------------------\n# 3. Stop selva-compute BEFORE npm rewrites build/.\n# ---------------------------------------------------------------------------\n# SvelteKit's node adapter lazy-imports chunks from build/server/chunks/ on\n# every request. Letting npm rewrite build/ while the old process is still\n# serving traffic = in-flight requests hit ERR_MODULE_NOT_FOUND for chunks\n# whose hash just changed under their feet. Stopping first is a brief\n# downtime window (~1-2s longer than restart-in-place) for a much smaller\n# blast radius.\n#\n# This is also where the SSE connection to the frontend dies — selva-compute\n# IS the SSE server. From here on, the user sees output via the log-file\n# polling fallback in the admin UI, not over SSE.\necho \"[STEP] Stopping selva-compute\"\nif ! pm2 stop selva-compute; then\n echo \"[WARN] pm2 stop failed — selva-compute may not be running yet. Continuing.\"\nfi\n\n# ---------------------------------------------------------------------------\n# 4. Run npm update.\n# ---------------------------------------------------------------------------\necho \"[STEP] Updating @selvajs/* packages\"\nif ! ${npmCommand}; then\n echo \"[FATAL] npm update failed — EXIT trap will restart the previous build\"\n exit 1\nfi\n\nAFTER=$(node -e \"try{console.log(require('./node_modules/@selvajs/selva/package.json').version)}catch(e){}\" 2>/dev/null)\necho \"[INFO] New @selvajs/selva: \\${AFTER:-unknown}\"\n\nif [ -n \"$BEFORE\" ] && [ \"$BEFORE\" = \"$AFTER\" ]; then\n echo \"[WARN] No version change ($BEFORE). Your npm cache may be stale.\"\n echo \"[WARN] Recover with:\"\n echo \"[WARN] npm cache clean --force\"\n echo \"[WARN] rm -rf node_modules package-lock.json\"\n echo \"[WARN] npm install --prefer-online\"\nfi\n\n# ---------------------------------------------------------------------------\n# 5. Start selva-compute with the new build.\n# ---------------------------------------------------------------------------\n# Start from ecosystem.config.cjs, NOT \\`pm2 start selva-compute\\` — the\n# latter requires selva-compute to already be in pm2's in-memory process\n# list. After a \\`pm2 update\\` (step 2) that's not guaranteed.\necho \"[STEP] Starting selva-compute with new build\"\nif ! pm2 start \"$ECOSYSTEM\" --update-env; then\n echo \"[FATAL] pm2 start failed — investigate with \\\\\\`pm2 logs selva-compute\\\\\\`\"\n exit 2\nfi\n\n# ---------------------------------------------------------------------------\n# 6. Health probe the new process.\n# ---------------------------------------------------------------------------\n# Read PORT from .env the same way scripts/update.sh does, so non-default\n# ports are respected.\nPORT=$(grep \"^PORT=\" .env 2>/dev/null \\\\\n | head -1 \\\\\n | cut -d'=' -f2 \\\\\n | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e 's/^[\"'\"'\"']//' -e 's/[\"'\"'\"']$//' -e 's/[[:space:]]*#.*//')\nPORT=\\${PORT:-3000}\n\necho \"[STEP] Health-probing the new process on port $PORT\"\nHEALTHY=0\nfor i in $(seq 1 15); do\n sleep 2\n CODE=$(curl -sS -o /tmp/selva-health.$$ -w \"%{http_code}\" --max-time 5 \"http://localhost:$PORT/api/health\" 2>/dev/null || echo \"000\")\n if [ \"$CODE\" = \"200\" ]; then\n HEALTHY=1\n echo \"[INFO] Health probe passed after \\${i} attempt(s)\"\n rm -f /tmp/selva-health.$$\n break\n fi\n echo \"[INFO] Probe attempt $i/15: HTTP $CODE — retrying\"\ndone\n\nif [ \"$HEALTHY\" = \"1\" ]; then\n echo \"[DONE] Update complete\"\n exit 0\nfi\n\n# ---------------------------------------------------------------------------\n# 7. Rollback path.\n# ---------------------------------------------------------------------------\necho \"[FATAL] New process failed health check after 30s\"\nif [ -f /tmp/selva-health.$$ ]; then\n echo \"[FATAL] Last response body:\"\n cat /tmp/selva-health.$$\n rm -f /tmp/selva-health.$$\nfi\n\nif [ -z \"$BEFORE\" ]; then\n echo \"[FATAL] No prior version recorded — cannot roll back automatically.\"\n echo \"[FATAL] EXIT trap will attempt to restart the current build anyway.\"\n exit 3\nfi\n\necho \"[STEP] Rolling back @selvajs/selva to $BEFORE\"\npm2 stop selva-compute >/dev/null 2>&1 || true\nif ! npm install --save \"@selvajs/selva@$BEFORE\"; then\n echo \"[FATAL] Rollback npm install failed — EXIT trap will retry restart.\"\n exit 4\nfi\n\npm2 start \"$ECOSYSTEM\" --update-env || true\nsleep 3\nROLLBACK_CODE=$(curl -sS -o /dev/null -w \"%{http_code}\" --max-time 5 \"http://localhost:$PORT/api/health\" 2>/dev/null || echo \"000\")\nif [ \"$ROLLBACK_CODE\" = \"200\" ]; then\n echo \"[DONE] Rolled back to $BEFORE — previous version is online\"\n exit 5\nfi\n\necho \"[FATAL] Rollback restart also failed health check (HTTP $ROLLBACK_CODE)\"\necho \"[FATAL] Manual recovery required. Check: pm2 logs selva-compute\"\nexit 6\n`;\n}\nfunction isDeploymentDir(dir) {\n return existsSync(join(dir, \"node_modules\", \"@selvajs\", \"selva\", \"package.json\"));\n}\nconst NPM_UPDATE_ARGS = [\"update\", \"--save\", \"--prefer-online\", \"@selvajs/cli\", \"@selvajs/selva\"];\nfunction detectUpdatePlan() {\n if (private_env.INSTALL_DIR && isDeploymentDir(private_env.INSTALL_DIR)) {\n return { cwd: private_env.INSTALL_DIR, args: NPM_UPDATE_ARGS };\n }\n let dir = process.cwd();\n for (let i = 0; i < 6; i++) {\n if (isDeploymentDir(dir)) {\n return { cwd: dir, args: NPM_UPDATE_ARGS };\n }\n const parent = join(dir, \"..\");\n if (parent === dir) break;\n dir = parent;\n }\n return null;\n}\nconst POST = async ({ locals }) => {\n requirePermission(locals, \"instance_admin\");\n const plan = detectUpdatePlan();\n if (!plan) {\n return new Response(\n JSON.stringify({\n error: \"Couldn't determine how to update this deployment. Expected node_modules/@selvajs/selva (CLI scaffold) in the cwd or a parent directory.\"\n }),\n { status: 500, headers: { \"Content-Type\": \"application/json\" } }\n );\n }\n const stream = new ReadableStream({\n start(controller) {\n const encoder = new TextEncoder();\n function sendEvent(type, data) {\n const message = `data: ${JSON.stringify({ type, ...data })}\n\n`;\n controller.enqueue(encoder.encode(message));\n }\n try {\n const versionBefore = readRuntimeVersion(plan.cwd);\n const prelude = [\n `[INFO] Updating deployment (cwd: ${plan.cwd})`,\n ...versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : []\n ];\n const runnerScript = buildNpmRunnerScript(\n plan.args,\n versionBefore,\n join(plan.cwd, \"ecosystem.config.cjs\")\n );\n const cmd = \"bash\";\n const args = [\"-c\", buildLauncher(runnerScript, prelude)];\n const localBin = join(plan.cwd, \"node_modules\", \".bin\");\n const child = spawn(cmd, args, {\n cwd: plan.cwd,\n env: {\n PATH: `${localBin}:${process.env.PATH ?? \"\"}`,\n HOME: process.env.HOME,\n INSTALL_DIR: plan.cwd\n },\n detached: true,\n stdio: [\"ignore\", \"pipe\", \"pipe\"]\n });\n child.unref();\n const timeout = setTimeout(\n () => {\n try {\n if (child.pid) process.kill(-child.pid, \"SIGTERM\");\n } catch {\n }\n sendEvent(\"log\", { data: \"[FATAL] Update timed out after 15 minutes\" });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n },\n 15 * 60 * 1e3\n );\n let restarting = false;\n child.stdout.on(\"data\", (data) => {\n const lines = data.toString().split(\"\\n\");\n for (const line of lines) {\n const clean = stripAnsi(line).trim();\n if (clean) {\n if (!restarting && (clean.includes(\"Applying action stopProcessId\") || clean.includes(\"Applying action restartProcessId\"))) {\n restarting = true;\n sendEvent(\"restarting\", { data: clean });\n } else {\n sendEvent(\"log\", { data: clean });\n }\n }\n }\n });\n child.stderr.on(\"data\", (data) => {\n const lines = data.toString().split(\"\\n\");\n for (const line of lines) {\n const clean = stripAnsi(line).trim();\n if (clean) {\n sendEvent(\"log\", { data: `[ERROR] ${clean}` });\n }\n }\n });\n child.on(\"close\", (code) => {\n clearTimeout(timeout);\n sendEvent(\"exit\", { code: code ?? -1 });\n controller.close();\n });\n child.on(\"error\", (err) => {\n clearTimeout(timeout);\n sendEvent(\"log\", { data: `[FATAL] ${err.message}` });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n });\n } catch (err) {\n sendEvent(\"log\", { data: `[FATAL] Failed to spawn process: ${err}` });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n }\n }\n });\n return new Response(stream, {\n headers: {\n \"Content-Type\": \"text/event-stream\",\n \"Cache-Control\": \"no-cache\",\n Connection: \"keep-alive\"\n }\n });\n};\nconst GET = async ({ locals, url, fetch }) => {\n requirePermission(locals, \"instance_admin\");\n if (url.searchParams.get(\"check\") !== null) {\n return json(await checkForUpdate(fetch), { headers: { \"Cache-Control\": \"no-store\" } });\n }\n let body = \"\";\n try {\n body = readFileSync(UPDATE_LOG_PATH, \"utf8\");\n } catch {\n }\n return new Response(body, {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n \"Cache-Control\": \"no-store\"\n }\n });\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA,MAAM,eAAe,GAAG,uBAAuB;AAC/C,SAAS,SAAS,CAAC,GAAG,EAAE;AACxB,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC;AACjD;AACA,SAAS,kBAAkB,CAAC,GAAG,EAAE;AACjC,EAAE,IAAI;AACN,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK;AAC1B,MAAM,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM;AACzF,KAAK;AACL,IAAI,OAAO,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;AACjE,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,OAAO,MAAM;AACjB,EAAE;AACF;AACA,SAAS,UAAU,CAAC,CAAC,EAAE;AACvB,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxC;AACA,SAAS,aAAa,CAAC,YAAY,EAAE,OAAO,GAAG,EAAE,EAAE;AACnD,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7E,EAAE,OAAO;AACT,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC;AACrC;AACA;AACA;;AAEA;AACA,EAAE,YAAY;AACd;AACA;;AAEA;AACA;AACA,EAAE,MAAM;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,SAAS,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE;AACrE,EAAE,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAClE,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,IAAI,EAAE,CAAC;AAChD,EAAE,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC;AAC7C,EAAE,OAAO,CAAC;AACV;AACA,OAAO,EAAE,MAAM;AACf,UAAU,EAAE,SAAS;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,EAAE,UAAU,CAAC;AAClB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;A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UAAU,EAAE,EAAE,CAAC;AAC1F,EAAE;AACF,EAAE,IAAI,IAAI,GAAG,EAAE;AACf,EAAE,IAAI;AACN,IAAI,IAAI,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC;AAChD,EAAE,CAAC,CAAC,MAAM;AACV,EAAE;AACF,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC5B,IAAI,OAAO,EAAE;AACb,MAAM,cAAc,EAAE,2BAA2B;AACjD,MAAM,eAAe,EAAE;AACvB;AACA,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { p as private_env } from './shared-server-C3WdcJCQ.js';
|
|
4
|
+
|
|
5
|
+
function parseSemver(v) {
|
|
6
|
+
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v.trim());
|
|
7
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
|
|
8
|
+
}
|
|
9
|
+
function isNewer(latest, current) {
|
|
10
|
+
const a = parseSemver(latest);
|
|
11
|
+
const b = parseSemver(current);
|
|
12
|
+
if (!a || !b) return latest !== current;
|
|
13
|
+
for (let i = 0; i < 3; i++) {
|
|
14
|
+
if (a[i] > b[i]) return true;
|
|
15
|
+
if (a[i] < b[i]) return false;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function readInstalledVersion() {
|
|
20
|
+
const dirs = [];
|
|
21
|
+
if (private_env.INSTALL_DIR) dirs.push(private_env.INSTALL_DIR);
|
|
22
|
+
let dir = process.cwd();
|
|
23
|
+
for (let i = 0; i < 6; i++) {
|
|
24
|
+
dirs.push(dir);
|
|
25
|
+
const parent = join(dir, "..");
|
|
26
|
+
if (parent === dir) break;
|
|
27
|
+
dir = parent;
|
|
28
|
+
}
|
|
29
|
+
for (const d of dirs) {
|
|
30
|
+
const pkgPath = join(d, "node_modules", "@selvajs", "selva", "package.json");
|
|
31
|
+
if (!existsSync(pkgPath)) continue;
|
|
32
|
+
try {
|
|
33
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
34
|
+
if (typeof pkg.version === "string") return pkg.version;
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
async function fetchLatestVersion(fetchImpl) {
|
|
41
|
+
const ctrl = new AbortController();
|
|
42
|
+
const timer = setTimeout(() => ctrl.abort(), 5e3);
|
|
43
|
+
try {
|
|
44
|
+
const res = await fetchImpl("https://registry.npmjs.org/@selvajs%2Fselva/latest", {
|
|
45
|
+
headers: { Accept: "application/json" },
|
|
46
|
+
signal: ctrl.signal
|
|
47
|
+
});
|
|
48
|
+
if (!res.ok) return null;
|
|
49
|
+
const body = await res.json();
|
|
50
|
+
return typeof body.version === "string" ? body.version : null;
|
|
51
|
+
} catch {
|
|
52
|
+
return null;
|
|
53
|
+
} finally {
|
|
54
|
+
clearTimeout(timer);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function checkForUpdate(fetchImpl) {
|
|
58
|
+
const current = readInstalledVersion();
|
|
59
|
+
const latest = await fetchLatestVersion(fetchImpl);
|
|
60
|
+
return {
|
|
61
|
+
current,
|
|
62
|
+
latest,
|
|
63
|
+
updateAvailable: !!(current && latest && isNewer(latest, current))
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { checkForUpdate as c };
|
|
68
|
+
//# sourceMappingURL=updateCheck.server-qRJNJ4LU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCheck.server-qRJNJ4LU.js","sources":["../../../.svelte-kit/adapter-node/chunks/updateCheck.server.js"],"sourcesContent":["import { existsSync, readFileSync } from \"fs\";\nimport { join } from \"path\";\nimport { p as private_env } from \"./shared-server.js\";\nfunction parseSemver(v) {\n const m = /^(\\d+)\\.(\\d+)\\.(\\d+)/.exec(v.trim());\n return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;\n}\nfunction isNewer(latest, current) {\n const a = parseSemver(latest);\n const b = parseSemver(current);\n if (!a || !b) return latest !== current;\n for (let i = 0; i < 3; i++) {\n if (a[i] > b[i]) return true;\n if (a[i] < b[i]) return false;\n }\n return false;\n}\nfunction readInstalledVersion() {\n const dirs = [];\n if (private_env.INSTALL_DIR) dirs.push(private_env.INSTALL_DIR);\n let dir = process.cwd();\n for (let i = 0; i < 6; i++) {\n dirs.push(dir);\n const parent = join(dir, \"..\");\n if (parent === dir) break;\n dir = parent;\n }\n for (const d of dirs) {\n const pkgPath = join(d, \"node_modules\", \"@selvajs\", \"selva\", \"package.json\");\n if (!existsSync(pkgPath)) continue;\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, \"utf8\"));\n if (typeof pkg.version === \"string\") return pkg.version;\n } catch {\n }\n }\n return null;\n}\nasync function fetchLatestVersion(fetchImpl) {\n const ctrl = new AbortController();\n const timer = setTimeout(() => ctrl.abort(), 5e3);\n try {\n const res = await fetchImpl(\"https://registry.npmjs.org/@selvajs%2Fselva/latest\", {\n headers: { Accept: \"application/json\" },\n signal: ctrl.signal\n });\n if (!res.ok) return null;\n const body = await res.json();\n return typeof body.version === \"string\" ? body.version : null;\n } catch {\n return null;\n } finally {\n clearTimeout(timer);\n }\n}\nasync function checkForUpdate(fetchImpl) {\n const current = readInstalledVersion();\n const latest = await fetchLatestVersion(fetchImpl);\n return {\n current,\n latest,\n updateAvailable: !!(current && latest && isNewer(latest, current))\n };\n}\nexport {\n checkForUpdate as c\n};\n"],"names":[],"mappings":";;;;AAGA,SAAS,WAAW,CAAC,CAAC,EAAE;AACxB,EAAE,MAAM,CAAC,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACjD,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE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MAAM,kBAAkB,CAAC,SAAS,CAAC;AACpD,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,MAAM;AACV,IAAI,eAAe,EAAE,CAAC,EAAE,OAAO,IAAI,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;AACrE,GAAG;AACH;;;;"}
|
package/build/server/index.js
CHANGED
|
@@ -1171,7 +1171,7 @@ const options = {
|
|
|
1171
1171
|
<div class="error">
|
|
1172
1172
|
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
1173
1173
|
},
|
|
1174
|
-
version_hash: "
|
|
1174
|
+
version_hash: "1mi5csx"
|
|
1175
1175
|
};
|
|
1176
1176
|
async function get_hooks() {
|
|
1177
1177
|
let handle;
|