@selvajs/selva 4.20.0-beta.29 → 4.20.0-beta.30
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/adapter-node.js +1 -1
- package/build/client/_app/immutable/entry/{app.q5GmHZh7.js → app.CN37JsEV.js} +2 -2
- package/build/client/_app/immutable/entry/app.CN37JsEV.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CN37JsEV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.Cuq4zfye.js → 15.BXIV1QfS.js} +1 -1
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.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/instance.js +3 -3
- package/build/server/chunks/internal.js +1 -1
- package/build/server/chunks/package.js +1 -1
- package/build/server/chunks/package.js.map +1 -1
- package/build/server/chunks/update-outcome.js +14 -0
- package/build/server/chunks/update-outcome.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js +40 -6
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js.map +1 -1
- package/build/server/manifest-full.js +1 -1
- package/build/server/manifest.js +1 -1
- package/build/server/nodes/15.js +1 -1
- package/build/server/server.js +1 -1
- package/package.json +6 -6
- package/build/client/_app/immutable/entry/app.q5GmHZh7.js.br +0 -0
- package/build/client/_app/immutable/entry/app.q5GmHZh7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.Cuq4zfye.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.Cuq4zfye.js.gz +0 -0
package/build/adapter-node.js
CHANGED
|
@@ -7,5 +7,5 @@ export const app_path = "_app";
|
|
|
7
7
|
export const origin = undefined;
|
|
8
8
|
export const env_prefix = "";
|
|
9
9
|
export const mime_types = {".png":"image/png",".ico":"image/x-icon",".svg":"image/svg+xml",".webmanifest":"application/manifest+json",".txt":"text/plain",".json":"application/json",".css":"text/css",".woff2":"font/woff2",".js":"text/javascript",".hdr":""};
|
|
10
|
-
export const assets = JSON.parse("{\"entries\":[[\"/_app/immutable/assets/0.DwB0QWdx.css\",{\"file\":\"_app/immutable/assets/0.DwB0QWdx.css\",\"size\":135486,\"etag\":\"rZsn6lbRMr18uQe_DF3ji_240CZOUVLvqf8cqySJ9hg\",\"gz\":24777,\"br\":20254}],[\"/_app/immutable/assets/21.CZQvs3vE.css\",{\"file\":\"_app/immutable/assets/21.CZQvs3vE.css\",\"size\":6443,\"etag\":\"yChzBCacWHcbuq_Eh1dCR_hM8Z7TllywbO6NY3kNUjI\",\"gz\":1956,\"br\":1713}],[\"/_app/immutable/assets/7.T1zeJ20D.css\",{\"file\":\"_app/immutable/assets/7.T1zeJ20D.css\",\"size\":1248,\"etag\":\"0c8tuY2kPhW1crleIgeRKZKpkWx8Xk0y0RcMf3i0THw\",\"gz\":444,\"br\":414}],[\"/_app/immutable/assets/DataTable.BjgXtTHK.css\",{\"file\":\"_app/immutable/assets/DataTable.BjgXtTHK.css\",\"size\":364,\"etag\":\"xc-rMLEE_MYQxdaoTA2BCWYCT906CN3MPhA_L_ujV0k\",\"gz\":145,\"br\":116}],[\"/_app/immutable/assets/hanken-grotesk-latin-ext-wght-normal.Dg-wlmqe.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-latin-ext-wght-normal.Dg-wlmqe.woff2\",\"size\":19588,\"etag\":\"dorykj4KsVSfHfugpcjqdJxMAfAdjnf_r3_NEvV6CiQ\"}],[\"/_app/immutable/assets/hanken-grotesk-latin-wght-normal.CaVRRdDk.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-latin-wght-normal.CaVRRdDk.woff2\",\"size\":34704,\"etag\":\"6SAe3fHUHQtiJTKV2GnOPPZXaPcQK3l_Asf4yHa0qdU\"}],[\"/_app/immutable/assets/hanken-grotesk-vietnamese-wght-normal.CHiFlh_0.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-vietnamese-wght-normal.CHiFlh_0.woff2\",\"size\":9320,\"etag\":\"mStdFH7d6dY3ziLnu5zJ5pCcBUECJrNqLlga2ph360o\"}],[\"/_app/immutable/assets/select.CV-KWLNP.css\",{\"file\":\"_app/immutable/assets/select.CV-KWLNP.css\",\"size\":289,\"etag\":\"d3gUJK0pHvJ1f6ZiL2mJ4AmvKUONRGPDbQU_UdWZbs8\",\"gz\":149,\"br\":101}],[\"/_app/immutable/chunks/-MlIqmcL.js\",{\"file\":\"_app/immutable/chunks/-MlIqmcL.js\",\"size\":1249,\"etag\":\"dXizTp44WrxTqiFKttdzDRu1Zx8cSp0cl9IptAcLKWU\",\"gz\":669,\"br\":615}],[\"/_app/immutable/chunks/1AvDtYi1.js\",{\"file\":\"_app/immutable/chunks/1AvDtYi1.js\",\"size\":1004,\"etag\":\"EsKeI4wTinkrNxwjQnZiqR8efOQzDvShDjLvouF06Xg\",\"gz\":568,\"br\":506}],[\"/_app/immutable/chunks/1VJx1aVI.js\",{\"file\":\"_app/immutable/chunks/1VJx1aVI.js\",\"size\":454,\"etag\":\"9EwGEUFTNOFr9i0xHRtupu-AnU6GIwlQIZupkQiEGus\",\"gz\":287,\"br\":248}],[\"/_app/immutable/chunks/34Sd6e9o.js\",{\"file\":\"_app/immutable/chunks/34Sd6e9o.js\",\"size\":465,\"etag\":\"d_p0TlCFKVYx5LfH0r_DpN2FJz0RdgGqV0jz7iN2VYE\",\"gz\":309,\"br\":298}],[\"/_app/immutable/chunks/6oDkMEbX.js\",{\"file\":\"_app/immutable/chunks/6oDkMEbX.js\",\"size\":1241555,\"etag\":\"a3gzeRYOcP9gkdzT__UOXN-qgZmN9MwV5qeKzXFHEA0\",\"gz\":368569,\"br\":304895}],[\"/_app/immutable/chunks/85w20NVU.js\",{\"file\":\"_app/immutable/chunks/85w20NVU.js\",\"size\":515,\"etag\":\"EE9Xra7r1X-LlBEE4zwdps9uuP_Wb-j-6UpzxflvHlM\",\"gz\":326,\"br\":317}],[\"/_app/immutable/chunks/B187F-XR.js\",{\"file\":\"_app/immutable/chunks/B187F-XR.js\",\"size\":285,\"etag\":\"_q_B43mMIQhj9mwDrSQYRSPiBp9zR6mkFH5qmVPL4zE\",\"gz\":237,\"br\":207}],[\"/_app/immutable/chunks/B7VqKSCZ.js\",{\"file\":\"_app/immutable/chunks/B7VqKSCZ.js\",\"size\":285,\"etag\":\"5jcB_TdvooY1sMzhsWFpt8BlQTuw5IRjT0BvUnSHI2g\",\"gz\":231,\"br\":204}],[\"/_app/immutable/chunks/B8LXiPqe.js\",{\"file\":\"_app/immutable/chunks/B8LXiPqe.js\",\"size\":1039,\"etag\":\"4APp0l2RaHOhpqq3e-VMNfG5fZY2LGQzVRbEGJnE7wA\",\"gz\":545,\"br\":475}],[\"/_app/immutable/chunks/B9-uqzXO.js\",{\"file\":\"_app/immutable/chunks/B9-uqzXO.js\",\"size\":283,\"etag\":\"qmEtdraNGMhC32xeq9dNSB_PR41nprBHwi4Y3DfK2hs\",\"gz\":236,\"br\":208}],[\"/_app/immutable/chunks/B9IvNrzX.js\",{\"file\":\"_app/immutable/chunks/B9IvNrzX.js\",\"size\":49,\"etag\":\"D_IOIKC-2UYlKFCv_PDIwUehUTyGLN4XDLG68xWcIB8\",\"gz\":66,\"br\":53}],[\"/_app/immutable/chunks/BCgmDXNw.js\",{\"file\":\"_app/immutable/chunks/BCgmDXNw.js\",\"size\":1710,\"etag\":\"LtDo3KR40aoJ3Wc4yJpXPwy77EJsHcWcsHxH_Fzug1A\",\"gz\":915,\"br\":823}],[\"/_app/immutable/chunks/BFJ8iwO4.js\",{\"file\":\"_app/immutable/chunks/BFJ8iwO4.js\",\"size\":1603,\"etag\":\"z1M8RULwtO6Zj0_fPkmUks9spA-Kq3dsPfjQi_0qoDA\",\"gz\":700,\"br\":607}],[\"/_app/immutable/chunks/BFtd89gK.js\",{\"file\":\"_app/immutable/chunks/BFtd89gK.js\",\"size\":488,\"etag\":\"tufgEZkUWfVOIkUvtbmoji0Fg0DpyGMKDE21-EmUMIE\",\"gz\":361,\"br\":306}],[\"/_app/immutable/chunks/BHnRUwtv.js\",{\"file\":\"_app/immutable/chunks/BHnRUwtv.js\",\"size\":22,\"etag\":\"f8Fx2ToFfkLaJggw8GHv6584lIriyWj8IzLWyoo2riA\",\"gz\":42,\"br\":26}],[\"/_app/immutable/chunks/BJGlbpZ0.js\",{\"file\":\"_app/immutable/chunks/BJGlbpZ0.js\",\"size\":4234,\"etag\":\"Qp2wACSIUn8EFG-lAzdWn3mbAPgD4AdwubfpDbym9lw\",\"gz\":1450,\"br\":1324}],[\"/_app/immutable/chunks/BLG35vEW.js\",{\"file\":\"_app/immutable/chunks/BLG35vEW.js\",\"size\":236,\"etag\":\"8LgRpZV9wVHebgI9Uotagr4Wo2hDYUQFbsUYqDPyT8g\",\"gz\":205,\"br\":155}],[\"/_app/immutable/chunks/BPWrsj_h.js\",{\"file\":\"_app/immutable/chunks/BPWrsj_h.js\",\"size\":449,\"etag\":\"CvY5qAYVvP3GHZDpLFG7ZVTrdu7ZJ7mXjx-ji4XbmEY\",\"gz\":297,\"br\":296}],[\"/_app/immutable/chunks/BQmUk61d.js\",{\"file\":\"_app/immutable/chunks/BQmUk61d.js\",\"size\":3930,\"etag\":\"oV25Pm8Ph_YNURUeTUTYBNoJnF7DgizN6qRHS3IwPsc\",\"gz\":1434,\"br\":1306}],[\"/_app/immutable/chunks/BRA_lgsI.js\",{\"file\":\"_app/immutable/chunks/BRA_lgsI.js\",\"size\":45663,\"etag\":\"DmdG2BlrkH5RT5YVfaRvLcKWhrxY-NJzhR82YTqYQR4\",\"gz\":16509,\"br\":15028}],[\"/_app/immutable/chunks/BVVRTJCQ.js\",{\"file\":\"_app/immutable/chunks/BVVRTJCQ.js\",\"size\":277,\"etag\":\"Vwod-d0LKIT90QUdvWMUD3Gudn7DUj3vU9RuLXqcjnA\",\"gz\":166,\"br\":123}],[\"/_app/immutable/chunks/BbFMtSJ8.js\",{\"file\":\"_app/immutable/chunks/BbFMtSJ8.js\",\"size\":2553,\"etag\":\"DlkFOV5giCS-Lt8XZL7e97xfCRf1-ktrdjAqXAnIhO8\",\"gz\":1080,\"br\":958}],[\"/_app/immutable/chunks/Bct5vmEM.js\",{\"file\":\"_app/immutable/chunks/Bct5vmEM.js\",\"size\":447,\"etag\":\"Ue2-45h03THZAzzKO0SXdJ-NEMmkm03pCMYT9ltZmW8\",\"gz\":317,\"br\":289}],[\"/_app/immutable/chunks/Bga9Qxze.js\",{\"file\":\"_app/immutable/chunks/Bga9Qxze.js\",\"size\":78573,\"etag\":\"uMbCKwJckC9oThqbYTytEMHKHztgIgt8z-8CrJ5EZj8\",\"gz\":22420,\"br\":20000}],[\"/_app/immutable/chunks/Bjy-W4x2.js\",{\"file\":\"_app/immutable/chunks/Bjy-W4x2.js\",\"size\":1365,\"etag\":\"8HQkdYMY3WtfMrD-jenS_7jZehfIQXWGJtGLoPqgRWo\",\"gz\":654,\"br\":499}],[\"/_app/immutable/chunks/BkTC9VdY.js\",{\"file\":\"_app/immutable/chunks/BkTC9VdY.js\",\"size\":313,\"etag\":\"9WdXzgjx2mcRCL8LouQ1274XbfJvZAsZ7mC84Xjaoj4\",\"gz\":248,\"br\":222}],[\"/_app/immutable/chunks/BmbAoXqr.js\",{\"file\":\"_app/immutable/chunks/BmbAoXqr.js\",\"size\":316,\"etag\":\"M0VikCWnNYmrqAadJ_biVIHwmnaLnS_5x8C2k69Qh80\",\"gz\":250,\"br\":223}],[\"/_app/immutable/chunks/BrpXEGl0.js\",{\"file\":\"_app/immutable/chunks/BrpXEGl0.js\",\"size\":380,\"etag\":\"TXhqiFJapbG-ig4Kjb3NgSKbtxka1SPjhct7atQS5Ig\",\"gz\":282,\"br\":248}],[\"/_app/immutable/chunks/BuCeXb-q.js\",{\"file\":\"_app/immutable/chunks/BuCeXb-q.js\",\"size\":9706,\"etag\":\"iNfKo_BhOG8V9_66VjqGd3KFLQZ1QAtEXoRaEWVvDeU\",\"gz\":2231,\"br\":1975}],[\"/_app/immutable/chunks/BvRGv1MX.js\",{\"file\":\"_app/immutable/chunks/BvRGv1MX.js\",\"size\":285,\"etag\":\"1bIWPfP_oBTZ4luTtpMvSOy7qjfge_Fl3J01DnjdU6I\",\"gz\":239,\"br\":210}],[\"/_app/immutable/chunks/BvRk9kiK.js\",{\"file\":\"_app/immutable/chunks/BvRk9kiK.js\",\"size\":0,\"etag\":\"47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU\",\"gz\":20,\"br\":1}],[\"/_app/immutable/chunks/Bx2qumU5.js\",{\"file\":\"_app/immutable/chunks/Bx2qumU5.js\",\"size\":554,\"etag\":\"-g3407I9Yqx4Cj7Fz2eDP-OK5Up8EDSB5pxQUEc48Q8\",\"gz\":394,\"br\":346}],[\"/_app/immutable/chunks/ByPYmSUR.js\",{\"file\":\"_app/immutable/chunks/ByPYmSUR.js\",\"size\":501,\"etag\":\"eturIkYszlDgAjoM7ujaNf77JV4nlltVRd_GGwauQA8\",\"gz\":355,\"br\":317}],[\"/_app/immutable/chunks/C0bsOHz0.js\",{\"file\":\"_app/immutable/chunks/C0bsOHz0.js\",\"size\":389,\"etag\":\"HEyrrc5IyCXFuWWHXScDzO-kQV9JZJ034k0WHYb1x0Y\",\"gz\":297,\"br\":268}],[\"/_app/immutable/chunks/C1xbQMZF.js\",{\"file\":\"_app/immutable/chunks/C1xbQMZF.js\",\"size\":11524,\"etag\":\"VZbA7PaJRCRCyiIDCTRI-NPdg_MSBs8U__iNOx4SnVY\",\"gz\":4068,\"br\":3573}],[\"/_app/immutable/chunks/C6Y_BUwr.js\",{\"file\":\"_app/immutable/chunks/C6Y_BUwr.js\",\"size\":6747,\"etag\":\"SpW3gkbKhN1qLkXQwNnZo-mq61CfE5fVbunvRtS9pJ8\",\"gz\":2454,\"br\":2156}],[\"/_app/immutable/chunks/C9yuuH4J.js\",{\"file\":\"_app/immutable/chunks/C9yuuH4J.js\",\"size\":629,\"etag\":\"dSKJvkfpuPdccG89wYSP7FpYGHmdhC4KX8Eohi7PDxc\",\"gz\":347,\"br\":315}],[\"/_app/immutable/chunks/CBWE8gpj.js\",{\"file\":\"_app/immutable/chunks/CBWE8gpj.js\",\"size\":4010,\"etag\":\"ATcp1r0hYKnbIuQ-JyjHPRrIqMKoH2dUVGR9BFv2KqU\",\"gz\":1616,\"br\":1434}],[\"/_app/immutable/chunks/CK2nnbJa.js\",{\"file\":\"_app/immutable/chunks/CK2nnbJa.js\",\"size\":9357,\"etag\":\"EmD_6VJjs5D6S2cEd-tZVAJQI9Sc-cF_rdSKxm5LFvw\",\"gz\":2748,\"br\":2418}],[\"/_app/immutable/chunks/CNij7yXO.js\",{\"file\":\"_app/immutable/chunks/CNij7yXO.js\",\"size\":54,\"etag\":\"Qn7V20Hv0T6_COdc33CpSPgMtE4nSIx3LociBF31Avc\",\"gz\":74,\"br\":52}],[\"/_app/immutable/chunks/CNkLk5_8.js\",{\"file\":\"_app/immutable/chunks/CNkLk5_8.js\",\"size\":437,\"etag\":\"zIh702Bb8_cqJeww-jC4SNDLW2evNCj-4ux9I1KJ-uA\",\"gz\":300,\"br\":277}],[\"/_app/immutable/chunks/CRzLMJPS.js\",{\"file\":\"_app/immutable/chunks/CRzLMJPS.js\",\"size\":1534,\"etag\":\"vMRl4-Ydw4eKaf-pXMtTy4LZWxY5raIjQgsoHr0VAEg\",\"gz\":798,\"br\":682}],[\"/_app/immutable/chunks/CUaHcctM.js\",{\"file\":\"_app/immutable/chunks/CUaHcctM.js\",\"size\":1710,\"etag\":\"VTCPerjnWFGeq78-yLisTRVAwhoFkJfdVuswSeH0Qfc\",\"gz\":677,\"br\":624}],[\"/_app/immutable/chunks/CVl4suwo.js\",{\"file\":\"_app/immutable/chunks/CVl4suwo.js\",\"size\":35125,\"etag\":\"iF0Wj78PMToUrG33tHysNvWV_hEHSXVwuKy6vHpMJHw\",\"gz\":8770,\"br\":7863}],[\"/_app/immutable/chunks/CXFC38jr.js\",{\"file\":\"_app/immutable/chunks/CXFC38jr.js\",\"size\":423,\"etag\":\"jffXYtavHyTVY_Xg9xwkcxS8u1DwRoqhh4E2vw8oZJk\",\"gz\":299,\"br\":292}],[\"/_app/immutable/chunks/Ca-1xMUo.js\",{\"file\":\"_app/immutable/chunks/Ca-1xMUo.js\",\"size\":70334,\"etag\":\"HEMV1Er65So0aDjUNaox5P8CiAQv59OIBxIVgW91uD8\",\"gz\":22048,\"br\":14247}],[\"/_app/immutable/chunks/CcWwBvi8.js\",{\"file\":\"_app/immutable/chunks/CcWwBvi8.js\",\"size\":199,\"etag\":\"BFQwVHx5SSYHA7YmxagbM3Qgc32LhP2jhiWalfRY7kM\",\"gz\":155,\"br\":120}],[\"/_app/immutable/chunks/CdTxvcQ4.js\",{\"file\":\"_app/immutable/chunks/CdTxvcQ4.js\",\"size\":7663,\"etag\":\"Z69he7h35-sr6kBwoFRyCFVgPK1XF6O4rLH3BaS8BSM\",\"gz\":2322,\"br\":2021}],[\"/_app/immutable/chunks/ChEklEBB.js\",{\"file\":\"_app/immutable/chunks/ChEklEBB.js\",\"size\":371,\"etag\":\"EipkBnD2Q5xdCt_ESx2GfI09NjAAFCuDkkzUuzwmOrU\",\"gz\":287,\"br\":254}],[\"/_app/immutable/chunks/CivEAG-M.js\",{\"file\":\"_app/immutable/chunks/CivEAG-M.js\",\"size\":1771,\"etag\":\"zbRC8fb5G2lAvwkgAXl2bStGny63Y-FWisSQDsndX3o\",\"gz\":690,\"br\":608}],[\"/_app/immutable/chunks/Cj9-pF71.js\",{\"file\":\"_app/immutable/chunks/Cj9-pF71.js\",\"size\":886,\"etag\":\"yspZ-RHQyCbn3-10_vRHYtYulo04WJsRRw9FqNe4B_w\",\"gz\":531,\"br\":460}],[\"/_app/immutable/chunks/Cms9vBTq.js\",{\"file\":\"_app/immutable/chunks/Cms9vBTq.js\",\"size\":18235,\"etag\":\"ug3DfeB7khvJ9Ys7pvORNMJT5AoSZOHk-702aFkiCU8\",\"gz\":5383,\"br\":4833}],[\"/_app/immutable/chunks/CoB4qHba.js\",{\"file\":\"_app/immutable/chunks/CoB4qHba.js\",\"size\":627,\"etag\":\"WVEfvd2kWGSAPXhi70mBJ48uniWItWRTdpoUnvGpGE8\",\"gz\":397,\"br\":362}],[\"/_app/immutable/chunks/CoLPPvYz.js\",{\"file\":\"_app/immutable/chunks/CoLPPvYz.js\",\"size\":463,\"etag\":\"-HZVBPGh0jJdAqT7BMCE-8ft-tF4wfTxI67ZG3X_8T8\",\"gz\":314,\"br\":288}],[\"/_app/immutable/chunks/CoRMsLUN.js\",{\"file\":\"_app/immutable/chunks/CoRMsLUN.js\",\"size\":7920,\"etag\":\"7KprsHQEzTcAElwroZVkRWL9DyCrcDwFxm7RZ1NQGbE\",\"gz\":3227,\"br\":2903}],[\"/_app/immutable/chunks/Cv8bPnPc.js\",{\"file\":\"_app/immutable/chunks/Cv8bPnPc.js\",\"size\":4100,\"etag\":\"ySRs8FmJllIMPKcd3o_jvpPO6TUgimOUnHdPNormys4\",\"gz\":1806,\"br\":1558}],[\"/_app/immutable/chunks/Cyt8LZpN.js\",{\"file\":\"_app/immutable/chunks/Cyt8LZpN.js\",\"size\":3804,\"etag\":\"iBhwLWGoai_F9w3Q5DxgUaJtNaVRls4WFHHa9xjPB94\",\"gz\":1696,\"br\":1515}],[\"/_app/immutable/chunks/CzfnuBzq.js\",{\"file\":\"_app/immutable/chunks/CzfnuBzq.js\",\"size\":2318,\"etag\":\"nhqLNEjdzzedifsJ9VxI6rWlyDQDAO1mGZqhDWRCpX8\",\"gz\":1137,\"br\":1017}],[\"/_app/immutable/chunks/D-1_v2Lf.js\",{\"file\":\"_app/immutable/chunks/D-1_v2Lf.js\",\"size\":497,\"etag\":\"Jl_ydZUYiYu8Hx9k14ZxgzBzAJlC42clZEsoRmy1CSw\",\"gz\":346,\"br\":341}],[\"/_app/immutable/chunks/D6SQx3MR.js\",{\"file\":\"_app/immutable/chunks/D6SQx3MR.js\",\"size\":307,\"etag\":\"suuIPriyzjRFaGKQP2FOBvnK7ChJD24Rw4-J_5QIU6g\",\"gz\":251,\"br\":224}],[\"/_app/immutable/chunks/D6cAtf8B.js\",{\"file\":\"_app/immutable/chunks/D6cAtf8B.js\",\"size\":1139,\"etag\":\"lbWO1IsLGq-BbywQ4jkZf3BzMlHT9hM3R_r9q_NGYlE\",\"gz\":609,\"br\":573}],[\"/_app/immutable/chunks/DBMBAz5L.js\",{\"file\":\"_app/immutable/chunks/DBMBAz5L.js\",\"size\":342,\"etag\":\"MJOx8vmBrmBXSB5d-cCHFqmEMrAUKY90Foo-HchIjWQ\",\"gz\":274,\"br\":251}],[\"/_app/immutable/chunks/DG4fF26P.js\",{\"file\":\"_app/immutable/chunks/DG4fF26P.js\",\"size\":9818,\"etag\":\"Riq752L7JXSP-t-riCJc7EUwKdYuwTpHP1cs7Rr47tY\",\"gz\":3022,\"br\":2724}],[\"/_app/immutable/chunks/DIYaLgLs.js\",{\"file\":\"_app/immutable/chunks/DIYaLgLs.js\",\"size\":1661,\"etag\":\"ZmUoXk7DhQgTY_w5GsfpMXv-X75N5d3wcXB1tkWBTKc\",\"gz\":933,\"br\":833}],[\"/_app/immutable/chunks/DNFu5yLd.js\",{\"file\":\"_app/immutable/chunks/DNFu5yLd.js\",\"size\":37668,\"etag\":\"sG-oxPYZLYfeM-ImpAX1y1Ac91rxC4dw1FnUHx1m3W8\",\"gz\":12251,\"br\":10931}],[\"/_app/immutable/chunks/DQsP4nZb.js\",{\"file\":\"_app/immutable/chunks/DQsP4nZb.js\",\"size\":15253,\"etag\":\"dHJsYwAuhYyvAGJcgZ4Uu3v3Uldv_2_XybUhxa1t9io\",\"gz\":5195,\"br\":4560}],[\"/_app/immutable/chunks/DR4HRB4w.js\",{\"file\":\"_app/immutable/chunks/DR4HRB4w.js\",\"size\":2178,\"etag\":\"DlXs98EsywVWODZC5Z0PJSe42XzhkFQ50YMAH04CnsM\",\"gz\":1108,\"br\":976}],[\"/_app/immutable/chunks/DUooINX6.js\",{\"file\":\"_app/immutable/chunks/DUooINX6.js\",\"size\":52,\"etag\":\"zeHdF7qvCaUwq7OoniDLHI4YOGboQj2m_5rng-BRt3g\",\"gz\":69,\"br\":56}],[\"/_app/immutable/chunks/DVcao28H.js\",{\"file\":\"_app/immutable/chunks/DVcao28H.js\",\"size\":5362,\"etag\":\"qE7gqCCwhmAEFFL3Utzky9An36pBP0nayX946hyN6XI\",\"gz\":2286,\"br\":2030}],[\"/_app/immutable/chunks/D_-42ATH.js\",{\"file\":\"_app/immutable/chunks/D_-42ATH.js\",\"size\":2329,\"etag\":\"M8Zot-niaI6Kd3XjrKAVlcs00fEUueYmoqVyhxgIbk0\",\"gz\":1046,\"br\":940}],[\"/_app/immutable/chunks/DbTdXFSI.js\",{\"file\":\"_app/immutable/chunks/DbTdXFSI.js\",\"size\":49630,\"etag\":\"6i_lIyLAINekpq0fBaKd3SLWhpsZG5K5PWnu_zVrpJk\",\"gz\":14893,\"br\":13027}],[\"/_app/immutable/chunks/DcS7V4T3.js\",{\"file\":\"_app/immutable/chunks/DcS7V4T3.js\",\"size\":693,\"etag\":\"aBLDVLjNC9PAaUxOykXrU73jSWZ59wrrJsOO1diJhuo\",\"gz\":443,\"br\":391}],[\"/_app/immutable/chunks/Djv8qD_2.js\",{\"file\":\"_app/immutable/chunks/Djv8qD_2.js\",\"size\":462,\"etag\":\"U9mUzG6j8jpbFkJOa0G22N7dCmMBWrKWPg1kAuQMXQY\",\"gz\":343,\"br\":338}],[\"/_app/immutable/chunks/DmlEI0uK.js\",{\"file\":\"_app/immutable/chunks/DmlEI0uK.js\",\"size\":295,\"etag\":\"a37t9f8MP0gpBp9sS1Bc0Q51hbTPfZwIlfJxNy_ERvw\",\"gz\":238,\"br\":208}],[\"/_app/immutable/chunks/DnJObvmm.js\",{\"file\":\"_app/immutable/chunks/DnJObvmm.js\",\"size\":172,\"etag\":\"Vs6jUBe5qhMrT0nvLhkVrBkp4r2M7foQiaMItPvZcwY\",\"gz\":151,\"br\":128}],[\"/_app/immutable/chunks/DqBxcKN2.js\",{\"file\":\"_app/immutable/chunks/DqBxcKN2.js\",\"size\":465,\"etag\":\"Je5SexgFzRJmuIDf2p3tD0cRGNGO6FhxchxGg-jV66o\",\"gz\":322,\"br\":286}],[\"/_app/immutable/chunks/DqR8kuM6.js\",{\"file\":\"_app/immutable/chunks/DqR8kuM6.js\",\"size\":527,\"etag\":\"owmAdqIFkZWrlYWOHlmJpBU88jpa3TbcHaGZy7uyaQI\",\"gz\":315,\"br\":269}],[\"/_app/immutable/chunks/Dqc45la5.js\",{\"file\":\"_app/immutable/chunks/Dqc45la5.js\",\"size\":283,\"etag\":\"M7pernINi5XnWpUJ06BVtrslXSWJ8xD2fX8_J_UO6vU\",\"gz\":237,\"br\":208}],[\"/_app/immutable/chunks/DtmJiR65.js\",{\"file\":\"_app/immutable/chunks/DtmJiR65.js\",\"size\":296,\"etag\":\"aVoFNV8luBdaeCgSNZZVpUIljRP-Jtr_q7viM-7vrSg\",\"gz\":240,\"br\":210}],[\"/_app/immutable/chunks/DyqtDkQe.js\",{\"file\":\"_app/immutable/chunks/DyqtDkQe.js\",\"size\":4312,\"etag\":\"xe8JYlajTQnvippCdM0Lqevu4moAd-9gjPPt2fQNkpY\",\"gz\":1816,\"br\":1587}],[\"/_app/immutable/chunks/DzeQucGI.js\",{\"file\":\"_app/immutable/chunks/DzeQucGI.js\",\"size\":8051,\"etag\":\"LOxtDZ5WGkbzIVvm83Ran4zz8JzPbuuRTz8rW7F9vuw\",\"gz\":3260,\"br\":2843}],[\"/_app/immutable/chunks/I4bYfY0F.js\",{\"file\":\"_app/immutable/chunks/I4bYfY0F.js\",\"size\":833,\"etag\":\"sAYbXbEDH4aE_JHZdUWMzS15dgSAs7vEyAfmCYARCFQ\",\"gz\":490,\"br\":401}],[\"/_app/immutable/chunks/Jlr_WNWs.js\",{\"file\":\"_app/immutable/chunks/Jlr_WNWs.js\",\"size\":427,\"etag\":\"yqg6Wb5M_PuxkVoobbKRPsA2D9dCpGvJEVLgGZfxZrA\",\"gz\":324,\"br\":299}],[\"/_app/immutable/chunks/LbAo7oFZ.js\",{\"file\":\"_app/immutable/chunks/LbAo7oFZ.js\",\"size\":2465,\"etag\":\"qz7db-Z0i37IkUYlyAQWfh82tzR96ZQpbANZFl2oHR8\",\"gz\":1150,\"br\":1007}],[\"/_app/immutable/chunks/OznVWGiS.js\",{\"file\":\"_app/immutable/chunks/OznVWGiS.js\",\"size\":28970,\"etag\":\"gHHab117vzQGHQTFfkp7au7c0LIDF2Og5tuSy9dRA-E\",\"gz\":9816,\"br\":8865}],[\"/_app/immutable/chunks/Rbl3OsBf.js\",{\"file\":\"_app/immutable/chunks/Rbl3OsBf.js\",\"size\":2436,\"etag\":\"aVFgWyy4BV9MNN2mOk5SPYCHVAUROzPC-8B47KhKyX4\",\"gz\":983,\"br\":885}],[\"/_app/immutable/chunks/TZzCN567.js\",{\"file\":\"_app/immutable/chunks/TZzCN567.js\",\"size\":28682,\"etag\":\"hzbRxGVATa9Me8J-WgFp1hhOGqliCn8_YhdgcGT5BYA\",\"gz\":8610,\"br\":7674}],[\"/_app/immutable/chunks/Uzaejkud.js\",{\"file\":\"_app/immutable/chunks/Uzaejkud.js\",\"size\":1593,\"etag\":\"D8OTweBfyeL4ibUzGGbSX3n2cw-FtMSLN8bZXEP7uYs\",\"gz\":673,\"br\":576}],[\"/_app/immutable/chunks/ZGbF6Eux.js\",{\"file\":\"_app/immutable/chunks/ZGbF6Eux.js\",\"size\":1404,\"etag\":\"OKj3arX6hY3xKosYJqZDNA0DxvSgKhD9lBGHK0X_9UI\",\"gz\":716,\"br\":635}],[\"/_app/immutable/chunks/ag4k__EW.js\",{\"file\":\"_app/immutable/chunks/ag4k__EW.js\",\"size\":1061,\"etag\":\"pUfzHHB3S4IEXQUe7f8ScRDZTFluZvtUqk8-2n3ox6U\",\"gz\":608,\"br\":521}],[\"/_app/immutable/chunks/fJvE1weH.js\",{\"file\":\"_app/immutable/chunks/fJvE1weH.js\",\"size\":496,\"etag\":\"eYkt4T9TybBWPlsfeF0mPsuX_RKCCc7175iYGOBrzbg\",\"gz\":352,\"br\":315}],[\"/_app/immutable/chunks/gNgZDPHs.js\",{\"file\":\"_app/immutable/chunks/gNgZDPHs.js\",\"size\":378,\"etag\":\"0EPtovcRNzqT_HuCI8bg_KkBob6KfveYC7OSTVPhZ8I\",\"gz\":295,\"br\":257}],[\"/_app/immutable/chunks/hvudoNyJ.js\",{\"file\":\"_app/immutable/chunks/hvudoNyJ.js\",\"size\":355,\"etag\":\"a3N6E98WfVl-Qu4t8v50S-RjRdTwXIbsEnPEFvh_bME\",\"gz\":287,\"br\":255}],[\"/_app/immutable/chunks/lMQbJOeE.js\",{\"file\":\"_app/immutable/chunks/lMQbJOeE.js\",\"size\":307,\"etag\":\"m1iGxMnsEo0Pu7fK5eEIc-BmrKTszVV3GX5WQQuNKoA\",\"gz\":250,\"br\":224}],[\"/_app/immutable/chunks/nJUe9gXb.js\",{\"file\":\"_app/immutable/chunks/nJUe9gXb.js\",\"size\":272,\"etag\":\"EWztI178C31l-awpkx76mFg9lGwL9aiFChwlEwN4S9Y\",\"gz\":228,\"br\":201}],[\"/_app/immutable/chunks/rIQJtl5L.js\",{\"file\":\"_app/immutable/chunks/rIQJtl5L.js\",\"size\":318,\"etag\":\"OCV6uyiMwPV6hSDZI_lXgf32YNSzQCVhm669kbwBIgo\",\"gz\":257,\"br\":234}],[\"/_app/immutable/chunks/sphvlIzg.js\",{\"file\":\"_app/immutable/chunks/sphvlIzg.js\",\"size\":57773,\"etag\":\"W0rwsH1e71wclQMzxDeW03MpVCCmXPR47rEUEY4QDvc\",\"gz\":21841,\"br\":19754}],[\"/_app/immutable/chunks/v0PYjZZ5.js\",{\"file\":\"_app/immutable/chunks/v0PYjZZ5.js\",\"size\":427,\"etag\":\"lx3MngxzmKnmvw9EGWmpWLFBbgn-evQDcVLrUgSu0NY\",\"gz\":307,\"br\":272}],[\"/_app/immutable/entry/app.q5GmHZh7.js\",{\"file\":\"_app/immutable/entry/app.q5GmHZh7.js\",\"size\":10049,\"etag\":\"XfVRD3etjLVaIfbaAv1OFdUr-3bYMF3kV4YGug6aZ1Y\",\"gz\":2961,\"br\":2580}],[\"/_app/immutable/entry/payload.DSmR2FwN.js\",{\"file\":\"_app/immutable/entry/payload.DSmR2FwN.js\",\"size\":65,\"etag\":\"t8untEsjl8fSj320o07HNKmF5k_yfXTd-NlkXPgU8J8\",\"gz\":77,\"br\":60}],[\"/_app/immutable/entry/start.BW9gOvFV.js\",{\"file\":\"_app/immutable/entry/start.BW9gOvFV.js\",\"size\":574,\"etag\":\"uCYPOoOqk4AF0JHfus0ADPFWhOh02nKVmbD6UoEYDFM\",\"gz\":329,\"br\":310}],[\"/_app/immutable/nodes/0.CC0wt5QB.js\",{\"file\":\"_app/immutable/nodes/0.CC0wt5QB.js\",\"size\":23394,\"etag\":\"mKwbFr05yGQITl4IoPkXoDjjtmbHv_uaPkQbzp5dUd8\",\"gz\":8321,\"br\":7304}],[\"/_app/immutable/nodes/1.D3kiiIk_.js\",{\"file\":\"_app/immutable/nodes/1.D3kiiIk_.js\",\"size\":326,\"etag\":\"hjcLc2RL-ZdYs3ctFd_PCRqUv7owqkpSoBbv_X3T2x4\",\"gz\":225,\"br\":194}],[\"/_app/immutable/nodes/10.B3aBLsAq.js\",{\"file\":\"_app/immutable/nodes/10.B3aBLsAq.js\",\"size\":10781,\"etag\":\"E-ym-t_6EMI14rh6o288eFMl1PfwXI_jVXROOJSlJSQ\",\"gz\":3832,\"br\":3323}],[\"/_app/immutable/nodes/11.DS0azG6Y.js\",{\"file\":\"_app/immutable/nodes/11.DS0azG6Y.js\",\"size\":26805,\"etag\":\"dzh2lreCB9aaCG35WIbU7BU3uF45NsgvTgmiv4a4vB0\",\"gz\":9081,\"br\":7950}],[\"/_app/immutable/nodes/12.B7-VLcK9.js\",{\"file\":\"_app/immutable/nodes/12.B7-VLcK9.js\",\"size\":1994,\"etag\":\"Ih9zMNSUUw5rjBHD1nmrPO-e4UkxeH_OFE2jZZSAkB4\",\"gz\":1010,\"br\":882}],[\"/_app/immutable/nodes/13.BQ0cOim-.js\",{\"file\":\"_app/immutable/nodes/13.BQ0cOim-.js\",\"size\":4892,\"etag\":\"h_z7WedbqV9AQbNQ8Dlvei8M3CvSgbF1yux0tWHLYM0\",\"gz\":2183,\"br\":1856}],[\"/_app/immutable/nodes/14.BsbXlPTK.js\",{\"file\":\"_app/immutable/nodes/14.BsbXlPTK.js\",\"size\":12604,\"etag\":\"YmC79Epis6aK4JMel0K5dRpuWGsfgiKFDJYQB2T4aYA\",\"gz\":4124,\"br\":3542}],[\"/_app/immutable/nodes/15.Cuq4zfye.js\",{\"file\":\"_app/immutable/nodes/15.Cuq4zfye.js\",\"size\":56005,\"etag\":\"FvWDJFn3cGsiRX813JQValxKOfFNO4iqVW3v5DRm1pM\",\"gz\":18031,\"br\":15684}],[\"/_app/immutable/nodes/16.D7-QOesS.js\",{\"file\":\"_app/immutable/nodes/16.D7-QOesS.js\",\"size\":16716,\"etag\":\"eRsF1fm08T6SJ6GPTgHDH2mIIkwiLphOQtdJrIcW2Dk\",\"gz\":6014,\"br\":5197}],[\"/_app/immutable/nodes/17.0cv7e5IP.js\",{\"file\":\"_app/immutable/nodes/17.0cv7e5IP.js\",\"size\":1346,\"etag\":\"G-J2IN8lPz7fTuC1J5m9TDsSbse1adhpNxwWu1bG6z4\",\"gz\":763,\"br\":637}],[\"/_app/immutable/nodes/18.PJQUQ85Q.js\",{\"file\":\"_app/immutable/nodes/18.PJQUQ85Q.js\",\"size\":146,\"etag\":\"LpKtuSgu88CrOCGfWrmgEZjPAcsD7lJTzDEKZ_HWEXY\",\"gz\":145,\"br\":113}],[\"/_app/immutable/nodes/19.DRxrJE9N.js\",{\"file\":\"_app/immutable/nodes/19.DRxrJE9N.js\",\"size\":4615,\"etag\":\"qdrWCkaeIHw-ILOHLwoYVUgLwr5uhXZKCwpQ1vR5s3g\",\"gz\":2086,\"br\":1764}],[\"/_app/immutable/nodes/2.c6X0ddnS.js\",{\"file\":\"_app/immutable/nodes/2.c6X0ddnS.js\",\"size\":1633,\"etag\":\"qd_5fOgzSWSCrktyxbNVyWMgsYsb2KRP-HYY8AeRbQc\",\"gz\":680,\"br\":577}],[\"/_app/immutable/nodes/20.CyrNl6i7.js\",{\"file\":\"_app/immutable/nodes/20.CyrNl6i7.js\",\"size\":11935,\"etag\":\"vnOoVevmC2_T7eqdQuZI9jAhw6dX831wjheP6CqFv3Y\",\"gz\":4470,\"br\":3912}],[\"/_app/immutable/nodes/21._AcAMXtP.js\",{\"file\":\"_app/immutable/nodes/21._AcAMXtP.js\",\"size\":50,\"etag\":\"yTxNURaS5N3Twalmo-mwCBP9zKy3UedaIvZcvmxZGgI\",\"gz\":70,\"br\":53}],[\"/_app/immutable/nodes/22.q4pJo1Ec.js\",{\"file\":\"_app/immutable/nodes/22.q4pJo1Ec.js\",\"size\":6898,\"etag\":\"VkppbyQMYPRjQ1ckBekULcgnchEoKOILFcxpIrXAMc0\",\"gz\":2743,\"br\":2352}],[\"/_app/immutable/nodes/24.CPSunfJJ.js\",{\"file\":\"_app/immutable/nodes/24.CPSunfJJ.js\",\"size\":4807,\"etag\":\"ofj-9I1fwDKJ81gWXQOh5Sjcku-ggZjTQ2edsJORirE\",\"gz\":2107,\"br\":1832}],[\"/_app/immutable/nodes/25.DW1_vMxq.js\",{\"file\":\"_app/immutable/nodes/25.DW1_vMxq.js\",\"size\":90058,\"etag\":\"vV9k3zGCiwiYFl_xI3jymLxEYj4fq510YhNZz32qNqo\",\"gz\":24195,\"br\":20241}],[\"/_app/immutable/nodes/26.CqaMEm_t.js\",{\"file\":\"_app/immutable/nodes/26.CqaMEm_t.js\",\"size\":6187,\"etag\":\"qBOkJZ99eahm9cmjmQnw1AnUzj4uhQ7tst4kd_4OWxo\",\"gz\":2241,\"br\":1867}],[\"/_app/immutable/nodes/27.BZljPb4_.js\",{\"file\":\"_app/immutable/nodes/27.BZljPb4_.js\",\"size\":2673,\"etag\":\"VzylVQR9hJwuJ5nVZQ_4s6aQDuxlc-Fs467Pl3fYOQo\",\"gz\":1195,\"br\":1049}],[\"/_app/immutable/nodes/28.BUnWplt-.js\",{\"file\":\"_app/immutable/nodes/28.BUnWplt-.js\",\"size\":2795,\"etag\":\"2GcjoaPOWYPetFAmRhkTdCEoEBozdbOXc30hVIe8FhU\",\"gz\":1174,\"br\":977}],[\"/_app/immutable/nodes/29.PsrL6xdd.js\",{\"file\":\"_app/immutable/nodes/29.PsrL6xdd.js\",\"size\":11298,\"etag\":\"JTGEYgp1C90MTYPXMRso4z5CgqVdE0KXnw2vsFiqeH4\",\"gz\":4070,\"br\":3550}],[\"/_app/immutable/nodes/3.3Z4QUsQQ.js\",{\"file\":\"_app/immutable/nodes/3.3Z4QUsQQ.js\",\"size\":429,\"etag\":\"PpGg5snhbmlf6EYRWbODo9SmVX1gY4COA2IpQoEX95M\",\"gz\":292,\"br\":249}],[\"/_app/immutable/nodes/30.Bz0cB9UL.js\",{\"file\":\"_app/immutable/nodes/30.Bz0cB9UL.js\",\"size\":18378,\"etag\":\"_CnrYFUY2racnWfoV-EJ2hI1IUjxvCSevKB3Du7i33Q\",\"gz\":6495,\"br\":5598}],[\"/_app/immutable/nodes/31.CFCkC-P2.js\",{\"file\":\"_app/immutable/nodes/31.CFCkC-P2.js\",\"size\":7034,\"etag\":\"evks87s_yk4KEeK6XBUTfKQ_Bp3BHKjtxWF690tfPtU\",\"gz\":2842,\"br\":2446}],[\"/_app/immutable/nodes/32.DWY9hRHg.js\",{\"file\":\"_app/immutable/nodes/32.DWY9hRHg.js\",\"size\":4452,\"etag\":\"MjAx03w5FBTS0nKXe2Uak9S4aQXypSXssfAsSr-hl7U\",\"gz\":1992,\"br\":1737}],[\"/_app/immutable/nodes/33.CswdDR11.js\",{\"file\":\"_app/immutable/nodes/33.CswdDR11.js\",\"size\":5588,\"etag\":\"YI06eHVZqMnfzP9Qzxgx-WgdRIotrcAUIxdUJIpKzVs\",\"gz\":1845,\"br\":1581}],[\"/_app/immutable/nodes/34.ZQaLUUXZ.js\",{\"file\":\"_app/immutable/nodes/34.ZQaLUUXZ.js\",\"size\":6246,\"etag\":\"zvtQ8DX07iEE6T_oGU8DM13CIf-awZ6Rcp__E3Rpc-E\",\"gz\":2590,\"br\":2237}],[\"/_app/immutable/nodes/35.DFkalFgm.js\",{\"file\":\"_app/immutable/nodes/35.DFkalFgm.js\",\"size\":17653,\"etag\":\"elASGVWrVV6GRmZ1Oa_x-r4W88LKktqYPgfbLbp0eQA\",\"gz\":6041,\"br\":5239}],[\"/_app/immutable/nodes/4.DPB_nXDo.js\",{\"file\":\"_app/immutable/nodes/4.DPB_nXDo.js\",\"size\":158,\"etag\":\"-9Z8ixcEVjr3Ui1AtpRXLRAQITJGsfqJeBCIp2fA1T0\",\"gz\":152,\"br\":119}],[\"/_app/immutable/nodes/5.Ck6I7GRI.js\",{\"file\":\"_app/immutable/nodes/5.Ck6I7GRI.js\",\"size\":259,\"etag\":\"YYlHnbf3KwARNq5FpLXJJUrk8GJezV9Shhq-Ms5B0eg\",\"gz\":209,\"br\":170}],[\"/_app/immutable/nodes/6.BiSiWLjz.js\",{\"file\":\"_app/immutable/nodes/6.BiSiWLjz.js\",\"size\":3261,\"etag\":\"_kivbQryhMD-Yh2_GXKueZM3kbe8KBmPP1-b-Jp0FlM\",\"gz\":1460,\"br\":1266}],[\"/_app/immutable/nodes/7.OTA16TkX.js\",{\"file\":\"_app/immutable/nodes/7.OTA16TkX.js\",\"size\":3493,\"etag\":\"OmfDr9JCBhDNEU8dL82EXTHSmeV8FTUKOJ6gcxJdEKw\",\"gz\":1760,\"br\":1581}],[\"/_app/immutable/nodes/8.CeF7Yj23.js\",{\"file\":\"_app/immutable/nodes/8.CeF7Yj23.js\",\"size\":3809,\"etag\":\"xpgB4c8MwaVuELgKCtmfmNnpRPc2zp91fmQ0DUKJjVk\",\"gz\":1597,\"br\":1322}],[\"/_app/immutable/nodes/9.Bxpo8jgd.js\",{\"file\":\"_app/immutable/nodes/9.Bxpo8jgd.js\",\"size\":7577,\"etag\":\"mvARGvuhz0hA2_s8qYpGsSKvieiu1jx4e4QJOMthVdw\",\"gz\":3171,\"br\":2755}],[\"/_app/version.json\",{\"file\":\"_app/version.json\",\"size\":27,\"etag\":\"IqKQhjDASCwOKWu1V1Pkgg5BCuy3xRMt6NtUaYOpfYo\",\"gz\":47,\"br\":29}],[\"/baseHDR.hdr\",{\"file\":\"baseHDR.hdr\",\"size\":1508872,\"etag\":\"9qmJ-JQy607uMZE2Spwc7tGVxOw1RBc6PAT9lsuR0Lo\"}],[\"/favicon/apple-touch-icon.png\",{\"file\":\"favicon/apple-touch-icon.png\",\"size\":7135,\"etag\":\"C0s9bHzE-hjbyHwnF65paHQz08gttJgVpzRVaItKx_c\"}],[\"/favicon/favicon-96x96.png\",{\"file\":\"favicon/favicon-96x96.png\",\"size\":3960,\"etag\":\"fDf3u3Wdg-dlRHqfGKs15V4E6KtNTG9KyX3ct3BS6Sw\"}],[\"/favicon/favicon.ico\",{\"file\":\"favicon/favicon.ico\",\"size\":15086,\"etag\":\"8mnzuylcXVvCjPOawpQxriKLjD4fe-KHgKtUTFXgMY4\"}],[\"/favicon/favicon.svg\",{\"file\":\"favicon/favicon.svg\",\"size\":4203,\"etag\":\"JCjFSDM_HOoHjHeHutI62nXVNPzad__uxKbk83nFLMM\",\"gz\":1114,\"br\":948}],[\"/favicon/site.webmanifest\",{\"file\":\"favicon/site.webmanifest\",\"size\":409,\"etag\":\"9jvbqGyIMgUxJNL1qoUjhtfLMS1KxRHuJn1yc9Ci3oY\"}],[\"/favicon/web-app-manifest-192x192.png\",{\"file\":\"favicon/web-app-manifest-192x192.png\",\"size\":7728,\"etag\":\"QsrMtIx6pcBeTRlqhj71DW86T-DyGR7MGXgglCg_r7E\"}],[\"/favicon/web-app-manifest-512x512.png\",{\"file\":\"favicon/web-app-manifest-512x512.png\",\"size\":23760,\"etag\":\"G7IO7KarAmcIZa1tdpLxdxWHapuZmB9hzPKBTUp8LHs\"}],[\"/robots.txt\",{\"file\":\"robots.txt\",\"size\":63,\"etag\":\"sDMkMme8vauEywHpQIEdbXeolNePBHD6rw60P45O_Mk\",\"gz\":77,\"br\":67}]],\"aliases\":[]}");
|
|
10
|
+
export const assets = JSON.parse("{\"entries\":[[\"/_app/immutable/assets/0.DwB0QWdx.css\",{\"file\":\"_app/immutable/assets/0.DwB0QWdx.css\",\"size\":135486,\"etag\":\"rZsn6lbRMr18uQe_DF3ji_240CZOUVLvqf8cqySJ9hg\",\"gz\":24777,\"br\":20254}],[\"/_app/immutable/assets/21.CZQvs3vE.css\",{\"file\":\"_app/immutable/assets/21.CZQvs3vE.css\",\"size\":6443,\"etag\":\"yChzBCacWHcbuq_Eh1dCR_hM8Z7TllywbO6NY3kNUjI\",\"gz\":1956,\"br\":1713}],[\"/_app/immutable/assets/7.T1zeJ20D.css\",{\"file\":\"_app/immutable/assets/7.T1zeJ20D.css\",\"size\":1248,\"etag\":\"0c8tuY2kPhW1crleIgeRKZKpkWx8Xk0y0RcMf3i0THw\",\"gz\":444,\"br\":414}],[\"/_app/immutable/assets/DataTable.BjgXtTHK.css\",{\"file\":\"_app/immutable/assets/DataTable.BjgXtTHK.css\",\"size\":364,\"etag\":\"xc-rMLEE_MYQxdaoTA2BCWYCT906CN3MPhA_L_ujV0k\",\"gz\":145,\"br\":116}],[\"/_app/immutable/assets/hanken-grotesk-latin-ext-wght-normal.Dg-wlmqe.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-latin-ext-wght-normal.Dg-wlmqe.woff2\",\"size\":19588,\"etag\":\"dorykj4KsVSfHfugpcjqdJxMAfAdjnf_r3_NEvV6CiQ\"}],[\"/_app/immutable/assets/hanken-grotesk-latin-wght-normal.CaVRRdDk.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-latin-wght-normal.CaVRRdDk.woff2\",\"size\":34704,\"etag\":\"6SAe3fHUHQtiJTKV2GnOPPZXaPcQK3l_Asf4yHa0qdU\"}],[\"/_app/immutable/assets/hanken-grotesk-vietnamese-wght-normal.CHiFlh_0.woff2\",{\"file\":\"_app/immutable/assets/hanken-grotesk-vietnamese-wght-normal.CHiFlh_0.woff2\",\"size\":9320,\"etag\":\"mStdFH7d6dY3ziLnu5zJ5pCcBUECJrNqLlga2ph360o\"}],[\"/_app/immutable/assets/select.CV-KWLNP.css\",{\"file\":\"_app/immutable/assets/select.CV-KWLNP.css\",\"size\":289,\"etag\":\"d3gUJK0pHvJ1f6ZiL2mJ4AmvKUONRGPDbQU_UdWZbs8\",\"gz\":149,\"br\":101}],[\"/_app/immutable/chunks/-MlIqmcL.js\",{\"file\":\"_app/immutable/chunks/-MlIqmcL.js\",\"size\":1249,\"etag\":\"dXizTp44WrxTqiFKttdzDRu1Zx8cSp0cl9IptAcLKWU\",\"gz\":669,\"br\":615}],[\"/_app/immutable/chunks/1AvDtYi1.js\",{\"file\":\"_app/immutable/chunks/1AvDtYi1.js\",\"size\":1004,\"etag\":\"EsKeI4wTinkrNxwjQnZiqR8efOQzDvShDjLvouF06Xg\",\"gz\":568,\"br\":506}],[\"/_app/immutable/chunks/1VJx1aVI.js\",{\"file\":\"_app/immutable/chunks/1VJx1aVI.js\",\"size\":454,\"etag\":\"9EwGEUFTNOFr9i0xHRtupu-AnU6GIwlQIZupkQiEGus\",\"gz\":287,\"br\":248}],[\"/_app/immutable/chunks/34Sd6e9o.js\",{\"file\":\"_app/immutable/chunks/34Sd6e9o.js\",\"size\":465,\"etag\":\"d_p0TlCFKVYx5LfH0r_DpN2FJz0RdgGqV0jz7iN2VYE\",\"gz\":309,\"br\":298}],[\"/_app/immutable/chunks/6oDkMEbX.js\",{\"file\":\"_app/immutable/chunks/6oDkMEbX.js\",\"size\":1241555,\"etag\":\"a3gzeRYOcP9gkdzT__UOXN-qgZmN9MwV5qeKzXFHEA0\",\"gz\":368569,\"br\":304895}],[\"/_app/immutable/chunks/85w20NVU.js\",{\"file\":\"_app/immutable/chunks/85w20NVU.js\",\"size\":515,\"etag\":\"EE9Xra7r1X-LlBEE4zwdps9uuP_Wb-j-6UpzxflvHlM\",\"gz\":326,\"br\":317}],[\"/_app/immutable/chunks/B187F-XR.js\",{\"file\":\"_app/immutable/chunks/B187F-XR.js\",\"size\":285,\"etag\":\"_q_B43mMIQhj9mwDrSQYRSPiBp9zR6mkFH5qmVPL4zE\",\"gz\":237,\"br\":207}],[\"/_app/immutable/chunks/B7VqKSCZ.js\",{\"file\":\"_app/immutable/chunks/B7VqKSCZ.js\",\"size\":285,\"etag\":\"5jcB_TdvooY1sMzhsWFpt8BlQTuw5IRjT0BvUnSHI2g\",\"gz\":231,\"br\":204}],[\"/_app/immutable/chunks/B8LXiPqe.js\",{\"file\":\"_app/immutable/chunks/B8LXiPqe.js\",\"size\":1039,\"etag\":\"4APp0l2RaHOhpqq3e-VMNfG5fZY2LGQzVRbEGJnE7wA\",\"gz\":545,\"br\":475}],[\"/_app/immutable/chunks/B9-uqzXO.js\",{\"file\":\"_app/immutable/chunks/B9-uqzXO.js\",\"size\":283,\"etag\":\"qmEtdraNGMhC32xeq9dNSB_PR41nprBHwi4Y3DfK2hs\",\"gz\":236,\"br\":208}],[\"/_app/immutable/chunks/B9IvNrzX.js\",{\"file\":\"_app/immutable/chunks/B9IvNrzX.js\",\"size\":49,\"etag\":\"D_IOIKC-2UYlKFCv_PDIwUehUTyGLN4XDLG68xWcIB8\",\"gz\":66,\"br\":53}],[\"/_app/immutable/chunks/BCgmDXNw.js\",{\"file\":\"_app/immutable/chunks/BCgmDXNw.js\",\"size\":1710,\"etag\":\"LtDo3KR40aoJ3Wc4yJpXPwy77EJsHcWcsHxH_Fzug1A\",\"gz\":915,\"br\":823}],[\"/_app/immutable/chunks/BFJ8iwO4.js\",{\"file\":\"_app/immutable/chunks/BFJ8iwO4.js\",\"size\":1603,\"etag\":\"z1M8RULwtO6Zj0_fPkmUks9spA-Kq3dsPfjQi_0qoDA\",\"gz\":700,\"br\":607}],[\"/_app/immutable/chunks/BFtd89gK.js\",{\"file\":\"_app/immutable/chunks/BFtd89gK.js\",\"size\":488,\"etag\":\"tufgEZkUWfVOIkUvtbmoji0Fg0DpyGMKDE21-EmUMIE\",\"gz\":361,\"br\":306}],[\"/_app/immutable/chunks/BHnRUwtv.js\",{\"file\":\"_app/immutable/chunks/BHnRUwtv.js\",\"size\":22,\"etag\":\"f8Fx2ToFfkLaJggw8GHv6584lIriyWj8IzLWyoo2riA\",\"gz\":42,\"br\":26}],[\"/_app/immutable/chunks/BJGlbpZ0.js\",{\"file\":\"_app/immutable/chunks/BJGlbpZ0.js\",\"size\":4234,\"etag\":\"Qp2wACSIUn8EFG-lAzdWn3mbAPgD4AdwubfpDbym9lw\",\"gz\":1450,\"br\":1324}],[\"/_app/immutable/chunks/BLG35vEW.js\",{\"file\":\"_app/immutable/chunks/BLG35vEW.js\",\"size\":236,\"etag\":\"8LgRpZV9wVHebgI9Uotagr4Wo2hDYUQFbsUYqDPyT8g\",\"gz\":205,\"br\":155}],[\"/_app/immutable/chunks/BPWrsj_h.js\",{\"file\":\"_app/immutable/chunks/BPWrsj_h.js\",\"size\":449,\"etag\":\"CvY5qAYVvP3GHZDpLFG7ZVTrdu7ZJ7mXjx-ji4XbmEY\",\"gz\":297,\"br\":296}],[\"/_app/immutable/chunks/BQmUk61d.js\",{\"file\":\"_app/immutable/chunks/BQmUk61d.js\",\"size\":3930,\"etag\":\"oV25Pm8Ph_YNURUeTUTYBNoJnF7DgizN6qRHS3IwPsc\",\"gz\":1434,\"br\":1306}],[\"/_app/immutable/chunks/BRA_lgsI.js\",{\"file\":\"_app/immutable/chunks/BRA_lgsI.js\",\"size\":45663,\"etag\":\"DmdG2BlrkH5RT5YVfaRvLcKWhrxY-NJzhR82YTqYQR4\",\"gz\":16509,\"br\":15028}],[\"/_app/immutable/chunks/BVVRTJCQ.js\",{\"file\":\"_app/immutable/chunks/BVVRTJCQ.js\",\"size\":277,\"etag\":\"Vwod-d0LKIT90QUdvWMUD3Gudn7DUj3vU9RuLXqcjnA\",\"gz\":166,\"br\":123}],[\"/_app/immutable/chunks/BbFMtSJ8.js\",{\"file\":\"_app/immutable/chunks/BbFMtSJ8.js\",\"size\":2553,\"etag\":\"DlkFOV5giCS-Lt8XZL7e97xfCRf1-ktrdjAqXAnIhO8\",\"gz\":1080,\"br\":958}],[\"/_app/immutable/chunks/Bct5vmEM.js\",{\"file\":\"_app/immutable/chunks/Bct5vmEM.js\",\"size\":447,\"etag\":\"Ue2-45h03THZAzzKO0SXdJ-NEMmkm03pCMYT9ltZmW8\",\"gz\":317,\"br\":289}],[\"/_app/immutable/chunks/Bga9Qxze.js\",{\"file\":\"_app/immutable/chunks/Bga9Qxze.js\",\"size\":78573,\"etag\":\"uMbCKwJckC9oThqbYTytEMHKHztgIgt8z-8CrJ5EZj8\",\"gz\":22420,\"br\":20000}],[\"/_app/immutable/chunks/Bjy-W4x2.js\",{\"file\":\"_app/immutable/chunks/Bjy-W4x2.js\",\"size\":1365,\"etag\":\"8HQkdYMY3WtfMrD-jenS_7jZehfIQXWGJtGLoPqgRWo\",\"gz\":654,\"br\":499}],[\"/_app/immutable/chunks/BkTC9VdY.js\",{\"file\":\"_app/immutable/chunks/BkTC9VdY.js\",\"size\":313,\"etag\":\"9WdXzgjx2mcRCL8LouQ1274XbfJvZAsZ7mC84Xjaoj4\",\"gz\":248,\"br\":222}],[\"/_app/immutable/chunks/BmbAoXqr.js\",{\"file\":\"_app/immutable/chunks/BmbAoXqr.js\",\"size\":316,\"etag\":\"M0VikCWnNYmrqAadJ_biVIHwmnaLnS_5x8C2k69Qh80\",\"gz\":250,\"br\":223}],[\"/_app/immutable/chunks/BrpXEGl0.js\",{\"file\":\"_app/immutable/chunks/BrpXEGl0.js\",\"size\":380,\"etag\":\"TXhqiFJapbG-ig4Kjb3NgSKbtxka1SPjhct7atQS5Ig\",\"gz\":282,\"br\":248}],[\"/_app/immutable/chunks/BuCeXb-q.js\",{\"file\":\"_app/immutable/chunks/BuCeXb-q.js\",\"size\":9706,\"etag\":\"iNfKo_BhOG8V9_66VjqGd3KFLQZ1QAtEXoRaEWVvDeU\",\"gz\":2231,\"br\":1975}],[\"/_app/immutable/chunks/BvRGv1MX.js\",{\"file\":\"_app/immutable/chunks/BvRGv1MX.js\",\"size\":285,\"etag\":\"1bIWPfP_oBTZ4luTtpMvSOy7qjfge_Fl3J01DnjdU6I\",\"gz\":239,\"br\":210}],[\"/_app/immutable/chunks/BvRk9kiK.js\",{\"file\":\"_app/immutable/chunks/BvRk9kiK.js\",\"size\":0,\"etag\":\"47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU\",\"gz\":20,\"br\":1}],[\"/_app/immutable/chunks/Bx2qumU5.js\",{\"file\":\"_app/immutable/chunks/Bx2qumU5.js\",\"size\":554,\"etag\":\"-g3407I9Yqx4Cj7Fz2eDP-OK5Up8EDSB5pxQUEc48Q8\",\"gz\":394,\"br\":346}],[\"/_app/immutable/chunks/ByPYmSUR.js\",{\"file\":\"_app/immutable/chunks/ByPYmSUR.js\",\"size\":501,\"etag\":\"eturIkYszlDgAjoM7ujaNf77JV4nlltVRd_GGwauQA8\",\"gz\":355,\"br\":317}],[\"/_app/immutable/chunks/C0bsOHz0.js\",{\"file\":\"_app/immutable/chunks/C0bsOHz0.js\",\"size\":389,\"etag\":\"HEyrrc5IyCXFuWWHXScDzO-kQV9JZJ034k0WHYb1x0Y\",\"gz\":297,\"br\":268}],[\"/_app/immutable/chunks/C1xbQMZF.js\",{\"file\":\"_app/immutable/chunks/C1xbQMZF.js\",\"size\":11524,\"etag\":\"VZbA7PaJRCRCyiIDCTRI-NPdg_MSBs8U__iNOx4SnVY\",\"gz\":4068,\"br\":3573}],[\"/_app/immutable/chunks/C6Y_BUwr.js\",{\"file\":\"_app/immutable/chunks/C6Y_BUwr.js\",\"size\":6747,\"etag\":\"SpW3gkbKhN1qLkXQwNnZo-mq61CfE5fVbunvRtS9pJ8\",\"gz\":2454,\"br\":2156}],[\"/_app/immutable/chunks/C9yuuH4J.js\",{\"file\":\"_app/immutable/chunks/C9yuuH4J.js\",\"size\":629,\"etag\":\"dSKJvkfpuPdccG89wYSP7FpYGHmdhC4KX8Eohi7PDxc\",\"gz\":347,\"br\":315}],[\"/_app/immutable/chunks/CBWE8gpj.js\",{\"file\":\"_app/immutable/chunks/CBWE8gpj.js\",\"size\":4010,\"etag\":\"ATcp1r0hYKnbIuQ-JyjHPRrIqMKoH2dUVGR9BFv2KqU\",\"gz\":1616,\"br\":1434}],[\"/_app/immutable/chunks/CK2nnbJa.js\",{\"file\":\"_app/immutable/chunks/CK2nnbJa.js\",\"size\":9357,\"etag\":\"EmD_6VJjs5D6S2cEd-tZVAJQI9Sc-cF_rdSKxm5LFvw\",\"gz\":2748,\"br\":2418}],[\"/_app/immutable/chunks/CNij7yXO.js\",{\"file\":\"_app/immutable/chunks/CNij7yXO.js\",\"size\":54,\"etag\":\"Qn7V20Hv0T6_COdc33CpSPgMtE4nSIx3LociBF31Avc\",\"gz\":74,\"br\":52}],[\"/_app/immutable/chunks/CNkLk5_8.js\",{\"file\":\"_app/immutable/chunks/CNkLk5_8.js\",\"size\":437,\"etag\":\"zIh702Bb8_cqJeww-jC4SNDLW2evNCj-4ux9I1KJ-uA\",\"gz\":300,\"br\":277}],[\"/_app/immutable/chunks/CRzLMJPS.js\",{\"file\":\"_app/immutable/chunks/CRzLMJPS.js\",\"size\":1534,\"etag\":\"vMRl4-Ydw4eKaf-pXMtTy4LZWxY5raIjQgsoHr0VAEg\",\"gz\":798,\"br\":682}],[\"/_app/immutable/chunks/CUaHcctM.js\",{\"file\":\"_app/immutable/chunks/CUaHcctM.js\",\"size\":1710,\"etag\":\"VTCPerjnWFGeq78-yLisTRVAwhoFkJfdVuswSeH0Qfc\",\"gz\":677,\"br\":624}],[\"/_app/immutable/chunks/CVl4suwo.js\",{\"file\":\"_app/immutable/chunks/CVl4suwo.js\",\"size\":35125,\"etag\":\"iF0Wj78PMToUrG33tHysNvWV_hEHSXVwuKy6vHpMJHw\",\"gz\":8770,\"br\":7863}],[\"/_app/immutable/chunks/CXFC38jr.js\",{\"file\":\"_app/immutable/chunks/CXFC38jr.js\",\"size\":423,\"etag\":\"jffXYtavHyTVY_Xg9xwkcxS8u1DwRoqhh4E2vw8oZJk\",\"gz\":299,\"br\":292}],[\"/_app/immutable/chunks/Ca-1xMUo.js\",{\"file\":\"_app/immutable/chunks/Ca-1xMUo.js\",\"size\":70334,\"etag\":\"HEMV1Er65So0aDjUNaox5P8CiAQv59OIBxIVgW91uD8\",\"gz\":22048,\"br\":14247}],[\"/_app/immutable/chunks/CcWwBvi8.js\",{\"file\":\"_app/immutable/chunks/CcWwBvi8.js\",\"size\":199,\"etag\":\"BFQwVHx5SSYHA7YmxagbM3Qgc32LhP2jhiWalfRY7kM\",\"gz\":155,\"br\":120}],[\"/_app/immutable/chunks/CdTxvcQ4.js\",{\"file\":\"_app/immutable/chunks/CdTxvcQ4.js\",\"size\":7663,\"etag\":\"Z69he7h35-sr6kBwoFRyCFVgPK1XF6O4rLH3BaS8BSM\",\"gz\":2322,\"br\":2021}],[\"/_app/immutable/chunks/ChEklEBB.js\",{\"file\":\"_app/immutable/chunks/ChEklEBB.js\",\"size\":371,\"etag\":\"EipkBnD2Q5xdCt_ESx2GfI09NjAAFCuDkkzUuzwmOrU\",\"gz\":287,\"br\":254}],[\"/_app/immutable/chunks/CivEAG-M.js\",{\"file\":\"_app/immutable/chunks/CivEAG-M.js\",\"size\":1771,\"etag\":\"zbRC8fb5G2lAvwkgAXl2bStGny63Y-FWisSQDsndX3o\",\"gz\":690,\"br\":608}],[\"/_app/immutable/chunks/Cj9-pF71.js\",{\"file\":\"_app/immutable/chunks/Cj9-pF71.js\",\"size\":886,\"etag\":\"yspZ-RHQyCbn3-10_vRHYtYulo04WJsRRw9FqNe4B_w\",\"gz\":531,\"br\":460}],[\"/_app/immutable/chunks/Cms9vBTq.js\",{\"file\":\"_app/immutable/chunks/Cms9vBTq.js\",\"size\":18235,\"etag\":\"ug3DfeB7khvJ9Ys7pvORNMJT5AoSZOHk-702aFkiCU8\",\"gz\":5383,\"br\":4833}],[\"/_app/immutable/chunks/CoB4qHba.js\",{\"file\":\"_app/immutable/chunks/CoB4qHba.js\",\"size\":627,\"etag\":\"WVEfvd2kWGSAPXhi70mBJ48uniWItWRTdpoUnvGpGE8\",\"gz\":397,\"br\":362}],[\"/_app/immutable/chunks/CoLPPvYz.js\",{\"file\":\"_app/immutable/chunks/CoLPPvYz.js\",\"size\":463,\"etag\":\"-HZVBPGh0jJdAqT7BMCE-8ft-tF4wfTxI67ZG3X_8T8\",\"gz\":314,\"br\":288}],[\"/_app/immutable/chunks/CoRMsLUN.js\",{\"file\":\"_app/immutable/chunks/CoRMsLUN.js\",\"size\":7920,\"etag\":\"7KprsHQEzTcAElwroZVkRWL9DyCrcDwFxm7RZ1NQGbE\",\"gz\":3227,\"br\":2903}],[\"/_app/immutable/chunks/Cv8bPnPc.js\",{\"file\":\"_app/immutable/chunks/Cv8bPnPc.js\",\"size\":4100,\"etag\":\"ySRs8FmJllIMPKcd3o_jvpPO6TUgimOUnHdPNormys4\",\"gz\":1806,\"br\":1558}],[\"/_app/immutable/chunks/Cyt8LZpN.js\",{\"file\":\"_app/immutable/chunks/Cyt8LZpN.js\",\"size\":3804,\"etag\":\"iBhwLWGoai_F9w3Q5DxgUaJtNaVRls4WFHHa9xjPB94\",\"gz\":1696,\"br\":1515}],[\"/_app/immutable/chunks/CzfnuBzq.js\",{\"file\":\"_app/immutable/chunks/CzfnuBzq.js\",\"size\":2318,\"etag\":\"nhqLNEjdzzedifsJ9VxI6rWlyDQDAO1mGZqhDWRCpX8\",\"gz\":1137,\"br\":1017}],[\"/_app/immutable/chunks/D-1_v2Lf.js\",{\"file\":\"_app/immutable/chunks/D-1_v2Lf.js\",\"size\":497,\"etag\":\"Jl_ydZUYiYu8Hx9k14ZxgzBzAJlC42clZEsoRmy1CSw\",\"gz\":346,\"br\":341}],[\"/_app/immutable/chunks/D6SQx3MR.js\",{\"file\":\"_app/immutable/chunks/D6SQx3MR.js\",\"size\":307,\"etag\":\"suuIPriyzjRFaGKQP2FOBvnK7ChJD24Rw4-J_5QIU6g\",\"gz\":251,\"br\":224}],[\"/_app/immutable/chunks/D6cAtf8B.js\",{\"file\":\"_app/immutable/chunks/D6cAtf8B.js\",\"size\":1139,\"etag\":\"lbWO1IsLGq-BbywQ4jkZf3BzMlHT9hM3R_r9q_NGYlE\",\"gz\":609,\"br\":573}],[\"/_app/immutable/chunks/DBMBAz5L.js\",{\"file\":\"_app/immutable/chunks/DBMBAz5L.js\",\"size\":342,\"etag\":\"MJOx8vmBrmBXSB5d-cCHFqmEMrAUKY90Foo-HchIjWQ\",\"gz\":274,\"br\":251}],[\"/_app/immutable/chunks/DG4fF26P.js\",{\"file\":\"_app/immutable/chunks/DG4fF26P.js\",\"size\":9818,\"etag\":\"Riq752L7JXSP-t-riCJc7EUwKdYuwTpHP1cs7Rr47tY\",\"gz\":3022,\"br\":2724}],[\"/_app/immutable/chunks/DIYaLgLs.js\",{\"file\":\"_app/immutable/chunks/DIYaLgLs.js\",\"size\":1661,\"etag\":\"ZmUoXk7DhQgTY_w5GsfpMXv-X75N5d3wcXB1tkWBTKc\",\"gz\":933,\"br\":833}],[\"/_app/immutable/chunks/DNFu5yLd.js\",{\"file\":\"_app/immutable/chunks/DNFu5yLd.js\",\"size\":37668,\"etag\":\"sG-oxPYZLYfeM-ImpAX1y1Ac91rxC4dw1FnUHx1m3W8\",\"gz\":12251,\"br\":10931}],[\"/_app/immutable/chunks/DQsP4nZb.js\",{\"file\":\"_app/immutable/chunks/DQsP4nZb.js\",\"size\":15253,\"etag\":\"dHJsYwAuhYyvAGJcgZ4Uu3v3Uldv_2_XybUhxa1t9io\",\"gz\":5195,\"br\":4560}],[\"/_app/immutable/chunks/DR4HRB4w.js\",{\"file\":\"_app/immutable/chunks/DR4HRB4w.js\",\"size\":2178,\"etag\":\"DlXs98EsywVWODZC5Z0PJSe42XzhkFQ50YMAH04CnsM\",\"gz\":1108,\"br\":976}],[\"/_app/immutable/chunks/DUooINX6.js\",{\"file\":\"_app/immutable/chunks/DUooINX6.js\",\"size\":52,\"etag\":\"zeHdF7qvCaUwq7OoniDLHI4YOGboQj2m_5rng-BRt3g\",\"gz\":69,\"br\":56}],[\"/_app/immutable/chunks/DVcao28H.js\",{\"file\":\"_app/immutable/chunks/DVcao28H.js\",\"size\":5362,\"etag\":\"qE7gqCCwhmAEFFL3Utzky9An36pBP0nayX946hyN6XI\",\"gz\":2286,\"br\":2030}],[\"/_app/immutable/chunks/D_-42ATH.js\",{\"file\":\"_app/immutable/chunks/D_-42ATH.js\",\"size\":2329,\"etag\":\"M8Zot-niaI6Kd3XjrKAVlcs00fEUueYmoqVyhxgIbk0\",\"gz\":1046,\"br\":940}],[\"/_app/immutable/chunks/DbTdXFSI.js\",{\"file\":\"_app/immutable/chunks/DbTdXFSI.js\",\"size\":49630,\"etag\":\"6i_lIyLAINekpq0fBaKd3SLWhpsZG5K5PWnu_zVrpJk\",\"gz\":14893,\"br\":13027}],[\"/_app/immutable/chunks/DcS7V4T3.js\",{\"file\":\"_app/immutable/chunks/DcS7V4T3.js\",\"size\":693,\"etag\":\"aBLDVLjNC9PAaUxOykXrU73jSWZ59wrrJsOO1diJhuo\",\"gz\":443,\"br\":391}],[\"/_app/immutable/chunks/Djv8qD_2.js\",{\"file\":\"_app/immutable/chunks/Djv8qD_2.js\",\"size\":462,\"etag\":\"U9mUzG6j8jpbFkJOa0G22N7dCmMBWrKWPg1kAuQMXQY\",\"gz\":343,\"br\":338}],[\"/_app/immutable/chunks/DmlEI0uK.js\",{\"file\":\"_app/immutable/chunks/DmlEI0uK.js\",\"size\":295,\"etag\":\"a37t9f8MP0gpBp9sS1Bc0Q51hbTPfZwIlfJxNy_ERvw\",\"gz\":238,\"br\":208}],[\"/_app/immutable/chunks/DnJObvmm.js\",{\"file\":\"_app/immutable/chunks/DnJObvmm.js\",\"size\":172,\"etag\":\"Vs6jUBe5qhMrT0nvLhkVrBkp4r2M7foQiaMItPvZcwY\",\"gz\":151,\"br\":128}],[\"/_app/immutable/chunks/DqBxcKN2.js\",{\"file\":\"_app/immutable/chunks/DqBxcKN2.js\",\"size\":465,\"etag\":\"Je5SexgFzRJmuIDf2p3tD0cRGNGO6FhxchxGg-jV66o\",\"gz\":322,\"br\":286}],[\"/_app/immutable/chunks/DqR8kuM6.js\",{\"file\":\"_app/immutable/chunks/DqR8kuM6.js\",\"size\":527,\"etag\":\"owmAdqIFkZWrlYWOHlmJpBU88jpa3TbcHaGZy7uyaQI\",\"gz\":315,\"br\":269}],[\"/_app/immutable/chunks/Dqc45la5.js\",{\"file\":\"_app/immutable/chunks/Dqc45la5.js\",\"size\":283,\"etag\":\"M7pernINi5XnWpUJ06BVtrslXSWJ8xD2fX8_J_UO6vU\",\"gz\":237,\"br\":208}],[\"/_app/immutable/chunks/DtmJiR65.js\",{\"file\":\"_app/immutable/chunks/DtmJiR65.js\",\"size\":296,\"etag\":\"aVoFNV8luBdaeCgSNZZVpUIljRP-Jtr_q7viM-7vrSg\",\"gz\":240,\"br\":210}],[\"/_app/immutable/chunks/DyqtDkQe.js\",{\"file\":\"_app/immutable/chunks/DyqtDkQe.js\",\"size\":4312,\"etag\":\"xe8JYlajTQnvippCdM0Lqevu4moAd-9gjPPt2fQNkpY\",\"gz\":1816,\"br\":1587}],[\"/_app/immutable/chunks/DzeQucGI.js\",{\"file\":\"_app/immutable/chunks/DzeQucGI.js\",\"size\":8051,\"etag\":\"LOxtDZ5WGkbzIVvm83Ran4zz8JzPbuuRTz8rW7F9vuw\",\"gz\":3260,\"br\":2843}],[\"/_app/immutable/chunks/I4bYfY0F.js\",{\"file\":\"_app/immutable/chunks/I4bYfY0F.js\",\"size\":833,\"etag\":\"sAYbXbEDH4aE_JHZdUWMzS15dgSAs7vEyAfmCYARCFQ\",\"gz\":490,\"br\":401}],[\"/_app/immutable/chunks/Jlr_WNWs.js\",{\"file\":\"_app/immutable/chunks/Jlr_WNWs.js\",\"size\":427,\"etag\":\"yqg6Wb5M_PuxkVoobbKRPsA2D9dCpGvJEVLgGZfxZrA\",\"gz\":324,\"br\":299}],[\"/_app/immutable/chunks/LbAo7oFZ.js\",{\"file\":\"_app/immutable/chunks/LbAo7oFZ.js\",\"size\":2465,\"etag\":\"qz7db-Z0i37IkUYlyAQWfh82tzR96ZQpbANZFl2oHR8\",\"gz\":1150,\"br\":1007}],[\"/_app/immutable/chunks/OznVWGiS.js\",{\"file\":\"_app/immutable/chunks/OznVWGiS.js\",\"size\":28970,\"etag\":\"gHHab117vzQGHQTFfkp7au7c0LIDF2Og5tuSy9dRA-E\",\"gz\":9816,\"br\":8865}],[\"/_app/immutable/chunks/Rbl3OsBf.js\",{\"file\":\"_app/immutable/chunks/Rbl3OsBf.js\",\"size\":2436,\"etag\":\"aVFgWyy4BV9MNN2mOk5SPYCHVAUROzPC-8B47KhKyX4\",\"gz\":983,\"br\":885}],[\"/_app/immutable/chunks/TZzCN567.js\",{\"file\":\"_app/immutable/chunks/TZzCN567.js\",\"size\":28682,\"etag\":\"hzbRxGVATa9Me8J-WgFp1hhOGqliCn8_YhdgcGT5BYA\",\"gz\":8610,\"br\":7674}],[\"/_app/immutable/chunks/Uzaejkud.js\",{\"file\":\"_app/immutable/chunks/Uzaejkud.js\",\"size\":1593,\"etag\":\"D8OTweBfyeL4ibUzGGbSX3n2cw-FtMSLN8bZXEP7uYs\",\"gz\":673,\"br\":576}],[\"/_app/immutable/chunks/ZGbF6Eux.js\",{\"file\":\"_app/immutable/chunks/ZGbF6Eux.js\",\"size\":1404,\"etag\":\"OKj3arX6hY3xKosYJqZDNA0DxvSgKhD9lBGHK0X_9UI\",\"gz\":716,\"br\":635}],[\"/_app/immutable/chunks/ag4k__EW.js\",{\"file\":\"_app/immutable/chunks/ag4k__EW.js\",\"size\":1061,\"etag\":\"pUfzHHB3S4IEXQUe7f8ScRDZTFluZvtUqk8-2n3ox6U\",\"gz\":608,\"br\":521}],[\"/_app/immutable/chunks/fJvE1weH.js\",{\"file\":\"_app/immutable/chunks/fJvE1weH.js\",\"size\":496,\"etag\":\"eYkt4T9TybBWPlsfeF0mPsuX_RKCCc7175iYGOBrzbg\",\"gz\":352,\"br\":315}],[\"/_app/immutable/chunks/gNgZDPHs.js\",{\"file\":\"_app/immutable/chunks/gNgZDPHs.js\",\"size\":378,\"etag\":\"0EPtovcRNzqT_HuCI8bg_KkBob6KfveYC7OSTVPhZ8I\",\"gz\":295,\"br\":257}],[\"/_app/immutable/chunks/hvudoNyJ.js\",{\"file\":\"_app/immutable/chunks/hvudoNyJ.js\",\"size\":355,\"etag\":\"a3N6E98WfVl-Qu4t8v50S-RjRdTwXIbsEnPEFvh_bME\",\"gz\":287,\"br\":255}],[\"/_app/immutable/chunks/lMQbJOeE.js\",{\"file\":\"_app/immutable/chunks/lMQbJOeE.js\",\"size\":307,\"etag\":\"m1iGxMnsEo0Pu7fK5eEIc-BmrKTszVV3GX5WQQuNKoA\",\"gz\":250,\"br\":224}],[\"/_app/immutable/chunks/nJUe9gXb.js\",{\"file\":\"_app/immutable/chunks/nJUe9gXb.js\",\"size\":272,\"etag\":\"EWztI178C31l-awpkx76mFg9lGwL9aiFChwlEwN4S9Y\",\"gz\":228,\"br\":201}],[\"/_app/immutable/chunks/rIQJtl5L.js\",{\"file\":\"_app/immutable/chunks/rIQJtl5L.js\",\"size\":318,\"etag\":\"OCV6uyiMwPV6hSDZI_lXgf32YNSzQCVhm669kbwBIgo\",\"gz\":257,\"br\":234}],[\"/_app/immutable/chunks/sphvlIzg.js\",{\"file\":\"_app/immutable/chunks/sphvlIzg.js\",\"size\":57773,\"etag\":\"W0rwsH1e71wclQMzxDeW03MpVCCmXPR47rEUEY4QDvc\",\"gz\":21841,\"br\":19754}],[\"/_app/immutable/chunks/v0PYjZZ5.js\",{\"file\":\"_app/immutable/chunks/v0PYjZZ5.js\",\"size\":427,\"etag\":\"lx3MngxzmKnmvw9EGWmpWLFBbgn-evQDcVLrUgSu0NY\",\"gz\":307,\"br\":272}],[\"/_app/immutable/entry/app.CN37JsEV.js\",{\"file\":\"_app/immutable/entry/app.CN37JsEV.js\",\"size\":10049,\"etag\":\"jv6hZ6w1JgIEq-DgLPUeu7wdo7PGPXVhb-1kGgXj6S0\",\"gz\":2961,\"br\":2583}],[\"/_app/immutable/entry/payload.DSmR2FwN.js\",{\"file\":\"_app/immutable/entry/payload.DSmR2FwN.js\",\"size\":65,\"etag\":\"t8untEsjl8fSj320o07HNKmF5k_yfXTd-NlkXPgU8J8\",\"gz\":77,\"br\":60}],[\"/_app/immutable/entry/start.BW9gOvFV.js\",{\"file\":\"_app/immutable/entry/start.BW9gOvFV.js\",\"size\":574,\"etag\":\"uCYPOoOqk4AF0JHfus0ADPFWhOh02nKVmbD6UoEYDFM\",\"gz\":329,\"br\":310}],[\"/_app/immutable/nodes/0.CC0wt5QB.js\",{\"file\":\"_app/immutable/nodes/0.CC0wt5QB.js\",\"size\":23394,\"etag\":\"mKwbFr05yGQITl4IoPkXoDjjtmbHv_uaPkQbzp5dUd8\",\"gz\":8321,\"br\":7304}],[\"/_app/immutable/nodes/1.D3kiiIk_.js\",{\"file\":\"_app/immutable/nodes/1.D3kiiIk_.js\",\"size\":326,\"etag\":\"hjcLc2RL-ZdYs3ctFd_PCRqUv7owqkpSoBbv_X3T2x4\",\"gz\":225,\"br\":194}],[\"/_app/immutable/nodes/10.B3aBLsAq.js\",{\"file\":\"_app/immutable/nodes/10.B3aBLsAq.js\",\"size\":10781,\"etag\":\"E-ym-t_6EMI14rh6o288eFMl1PfwXI_jVXROOJSlJSQ\",\"gz\":3832,\"br\":3323}],[\"/_app/immutable/nodes/11.DS0azG6Y.js\",{\"file\":\"_app/immutable/nodes/11.DS0azG6Y.js\",\"size\":26805,\"etag\":\"dzh2lreCB9aaCG35WIbU7BU3uF45NsgvTgmiv4a4vB0\",\"gz\":9081,\"br\":7950}],[\"/_app/immutable/nodes/12.B7-VLcK9.js\",{\"file\":\"_app/immutable/nodes/12.B7-VLcK9.js\",\"size\":1994,\"etag\":\"Ih9zMNSUUw5rjBHD1nmrPO-e4UkxeH_OFE2jZZSAkB4\",\"gz\":1010,\"br\":882}],[\"/_app/immutable/nodes/13.BQ0cOim-.js\",{\"file\":\"_app/immutable/nodes/13.BQ0cOim-.js\",\"size\":4892,\"etag\":\"h_z7WedbqV9AQbNQ8Dlvei8M3CvSgbF1yux0tWHLYM0\",\"gz\":2183,\"br\":1856}],[\"/_app/immutable/nodes/14.BsbXlPTK.js\",{\"file\":\"_app/immutable/nodes/14.BsbXlPTK.js\",\"size\":12604,\"etag\":\"YmC79Epis6aK4JMel0K5dRpuWGsfgiKFDJYQB2T4aYA\",\"gz\":4124,\"br\":3542}],[\"/_app/immutable/nodes/15.BXIV1QfS.js\",{\"file\":\"_app/immutable/nodes/15.BXIV1QfS.js\",\"size\":56577,\"etag\":\"cGE3oayf5umujeVJv3YynjAWDHcozl6P1gu3nFt0PnE\",\"gz\":18162,\"br\":15799}],[\"/_app/immutable/nodes/16.D7-QOesS.js\",{\"file\":\"_app/immutable/nodes/16.D7-QOesS.js\",\"size\":16716,\"etag\":\"eRsF1fm08T6SJ6GPTgHDH2mIIkwiLphOQtdJrIcW2Dk\",\"gz\":6014,\"br\":5197}],[\"/_app/immutable/nodes/17.0cv7e5IP.js\",{\"file\":\"_app/immutable/nodes/17.0cv7e5IP.js\",\"size\":1346,\"etag\":\"G-J2IN8lPz7fTuC1J5m9TDsSbse1adhpNxwWu1bG6z4\",\"gz\":763,\"br\":637}],[\"/_app/immutable/nodes/18.PJQUQ85Q.js\",{\"file\":\"_app/immutable/nodes/18.PJQUQ85Q.js\",\"size\":146,\"etag\":\"LpKtuSgu88CrOCGfWrmgEZjPAcsD7lJTzDEKZ_HWEXY\",\"gz\":145,\"br\":113}],[\"/_app/immutable/nodes/19.DRxrJE9N.js\",{\"file\":\"_app/immutable/nodes/19.DRxrJE9N.js\",\"size\":4615,\"etag\":\"qdrWCkaeIHw-ILOHLwoYVUgLwr5uhXZKCwpQ1vR5s3g\",\"gz\":2086,\"br\":1764}],[\"/_app/immutable/nodes/2.c6X0ddnS.js\",{\"file\":\"_app/immutable/nodes/2.c6X0ddnS.js\",\"size\":1633,\"etag\":\"qd_5fOgzSWSCrktyxbNVyWMgsYsb2KRP-HYY8AeRbQc\",\"gz\":680,\"br\":577}],[\"/_app/immutable/nodes/20.CyrNl6i7.js\",{\"file\":\"_app/immutable/nodes/20.CyrNl6i7.js\",\"size\":11935,\"etag\":\"vnOoVevmC2_T7eqdQuZI9jAhw6dX831wjheP6CqFv3Y\",\"gz\":4470,\"br\":3912}],[\"/_app/immutable/nodes/21._AcAMXtP.js\",{\"file\":\"_app/immutable/nodes/21._AcAMXtP.js\",\"size\":50,\"etag\":\"yTxNURaS5N3Twalmo-mwCBP9zKy3UedaIvZcvmxZGgI\",\"gz\":70,\"br\":53}],[\"/_app/immutable/nodes/22.q4pJo1Ec.js\",{\"file\":\"_app/immutable/nodes/22.q4pJo1Ec.js\",\"size\":6898,\"etag\":\"VkppbyQMYPRjQ1ckBekULcgnchEoKOILFcxpIrXAMc0\",\"gz\":2743,\"br\":2352}],[\"/_app/immutable/nodes/24.CPSunfJJ.js\",{\"file\":\"_app/immutable/nodes/24.CPSunfJJ.js\",\"size\":4807,\"etag\":\"ofj-9I1fwDKJ81gWXQOh5Sjcku-ggZjTQ2edsJORirE\",\"gz\":2107,\"br\":1832}],[\"/_app/immutable/nodes/25.DW1_vMxq.js\",{\"file\":\"_app/immutable/nodes/25.DW1_vMxq.js\",\"size\":90058,\"etag\":\"vV9k3zGCiwiYFl_xI3jymLxEYj4fq510YhNZz32qNqo\",\"gz\":24195,\"br\":20241}],[\"/_app/immutable/nodes/26.CqaMEm_t.js\",{\"file\":\"_app/immutable/nodes/26.CqaMEm_t.js\",\"size\":6187,\"etag\":\"qBOkJZ99eahm9cmjmQnw1AnUzj4uhQ7tst4kd_4OWxo\",\"gz\":2241,\"br\":1867}],[\"/_app/immutable/nodes/27.BZljPb4_.js\",{\"file\":\"_app/immutable/nodes/27.BZljPb4_.js\",\"size\":2673,\"etag\":\"VzylVQR9hJwuJ5nVZQ_4s6aQDuxlc-Fs467Pl3fYOQo\",\"gz\":1195,\"br\":1049}],[\"/_app/immutable/nodes/28.BUnWplt-.js\",{\"file\":\"_app/immutable/nodes/28.BUnWplt-.js\",\"size\":2795,\"etag\":\"2GcjoaPOWYPetFAmRhkTdCEoEBozdbOXc30hVIe8FhU\",\"gz\":1174,\"br\":977}],[\"/_app/immutable/nodes/29.PsrL6xdd.js\",{\"file\":\"_app/immutable/nodes/29.PsrL6xdd.js\",\"size\":11298,\"etag\":\"JTGEYgp1C90MTYPXMRso4z5CgqVdE0KXnw2vsFiqeH4\",\"gz\":4070,\"br\":3550}],[\"/_app/immutable/nodes/3.3Z4QUsQQ.js\",{\"file\":\"_app/immutable/nodes/3.3Z4QUsQQ.js\",\"size\":429,\"etag\":\"PpGg5snhbmlf6EYRWbODo9SmVX1gY4COA2IpQoEX95M\",\"gz\":292,\"br\":249}],[\"/_app/immutable/nodes/30.Bz0cB9UL.js\",{\"file\":\"_app/immutable/nodes/30.Bz0cB9UL.js\",\"size\":18378,\"etag\":\"_CnrYFUY2racnWfoV-EJ2hI1IUjxvCSevKB3Du7i33Q\",\"gz\":6495,\"br\":5598}],[\"/_app/immutable/nodes/31.CFCkC-P2.js\",{\"file\":\"_app/immutable/nodes/31.CFCkC-P2.js\",\"size\":7034,\"etag\":\"evks87s_yk4KEeK6XBUTfKQ_Bp3BHKjtxWF690tfPtU\",\"gz\":2842,\"br\":2446}],[\"/_app/immutable/nodes/32.DWY9hRHg.js\",{\"file\":\"_app/immutable/nodes/32.DWY9hRHg.js\",\"size\":4452,\"etag\":\"MjAx03w5FBTS0nKXe2Uak9S4aQXypSXssfAsSr-hl7U\",\"gz\":1992,\"br\":1737}],[\"/_app/immutable/nodes/33.CswdDR11.js\",{\"file\":\"_app/immutable/nodes/33.CswdDR11.js\",\"size\":5588,\"etag\":\"YI06eHVZqMnfzP9Qzxgx-WgdRIotrcAUIxdUJIpKzVs\",\"gz\":1845,\"br\":1581}],[\"/_app/immutable/nodes/34.ZQaLUUXZ.js\",{\"file\":\"_app/immutable/nodes/34.ZQaLUUXZ.js\",\"size\":6246,\"etag\":\"zvtQ8DX07iEE6T_oGU8DM13CIf-awZ6Rcp__E3Rpc-E\",\"gz\":2590,\"br\":2237}],[\"/_app/immutable/nodes/35.DFkalFgm.js\",{\"file\":\"_app/immutable/nodes/35.DFkalFgm.js\",\"size\":17653,\"etag\":\"elASGVWrVV6GRmZ1Oa_x-r4W88LKktqYPgfbLbp0eQA\",\"gz\":6041,\"br\":5239}],[\"/_app/immutable/nodes/4.DPB_nXDo.js\",{\"file\":\"_app/immutable/nodes/4.DPB_nXDo.js\",\"size\":158,\"etag\":\"-9Z8ixcEVjr3Ui1AtpRXLRAQITJGsfqJeBCIp2fA1T0\",\"gz\":152,\"br\":119}],[\"/_app/immutable/nodes/5.Ck6I7GRI.js\",{\"file\":\"_app/immutable/nodes/5.Ck6I7GRI.js\",\"size\":259,\"etag\":\"YYlHnbf3KwARNq5FpLXJJUrk8GJezV9Shhq-Ms5B0eg\",\"gz\":209,\"br\":170}],[\"/_app/immutable/nodes/6.BiSiWLjz.js\",{\"file\":\"_app/immutable/nodes/6.BiSiWLjz.js\",\"size\":3261,\"etag\":\"_kivbQryhMD-Yh2_GXKueZM3kbe8KBmPP1-b-Jp0FlM\",\"gz\":1460,\"br\":1266}],[\"/_app/immutable/nodes/7.OTA16TkX.js\",{\"file\":\"_app/immutable/nodes/7.OTA16TkX.js\",\"size\":3493,\"etag\":\"OmfDr9JCBhDNEU8dL82EXTHSmeV8FTUKOJ6gcxJdEKw\",\"gz\":1760,\"br\":1581}],[\"/_app/immutable/nodes/8.CeF7Yj23.js\",{\"file\":\"_app/immutable/nodes/8.CeF7Yj23.js\",\"size\":3809,\"etag\":\"xpgB4c8MwaVuELgKCtmfmNnpRPc2zp91fmQ0DUKJjVk\",\"gz\":1597,\"br\":1322}],[\"/_app/immutable/nodes/9.Bxpo8jgd.js\",{\"file\":\"_app/immutable/nodes/9.Bxpo8jgd.js\",\"size\":7577,\"etag\":\"mvARGvuhz0hA2_s8qYpGsSKvieiu1jx4e4QJOMthVdw\",\"gz\":3171,\"br\":2755}],[\"/_app/version.json\",{\"file\":\"_app/version.json\",\"size\":27,\"etag\":\"h3J7e57Co3YuXEka5Jn0Pg2wUV_5xVCyONYJviGAsbM\",\"gz\":47,\"br\":30}],[\"/baseHDR.hdr\",{\"file\":\"baseHDR.hdr\",\"size\":1508872,\"etag\":\"9qmJ-JQy607uMZE2Spwc7tGVxOw1RBc6PAT9lsuR0Lo\"}],[\"/favicon/apple-touch-icon.png\",{\"file\":\"favicon/apple-touch-icon.png\",\"size\":7135,\"etag\":\"C0s9bHzE-hjbyHwnF65paHQz08gttJgVpzRVaItKx_c\"}],[\"/favicon/favicon-96x96.png\",{\"file\":\"favicon/favicon-96x96.png\",\"size\":3960,\"etag\":\"fDf3u3Wdg-dlRHqfGKs15V4E6KtNTG9KyX3ct3BS6Sw\"}],[\"/favicon/favicon.ico\",{\"file\":\"favicon/favicon.ico\",\"size\":15086,\"etag\":\"8mnzuylcXVvCjPOawpQxriKLjD4fe-KHgKtUTFXgMY4\"}],[\"/favicon/favicon.svg\",{\"file\":\"favicon/favicon.svg\",\"size\":4203,\"etag\":\"JCjFSDM_HOoHjHeHutI62nXVNPzad__uxKbk83nFLMM\",\"gz\":1114,\"br\":948}],[\"/favicon/site.webmanifest\",{\"file\":\"favicon/site.webmanifest\",\"size\":409,\"etag\":\"9jvbqGyIMgUxJNL1qoUjhtfLMS1KxRHuJn1yc9Ci3oY\"}],[\"/favicon/web-app-manifest-192x192.png\",{\"file\":\"favicon/web-app-manifest-192x192.png\",\"size\":7728,\"etag\":\"QsrMtIx6pcBeTRlqhj71DW86T-DyGR7MGXgglCg_r7E\"}],[\"/favicon/web-app-manifest-512x512.png\",{\"file\":\"favicon/web-app-manifest-512x512.png\",\"size\":23760,\"etag\":\"G7IO7KarAmcIZa1tdpLxdxWHapuZmB9hzPKBTUp8LHs\"}],[\"/robots.txt\",{\"file\":\"robots.txt\",\"size\":63,\"etag\":\"sDMkMme8vauEywHpQIEdbXeolNePBHD6rw60P45O_Mk\",\"gz\":77,\"br\":67}]],\"aliases\":[]}");
|
|
11
11
|
export const prerendered_assets = JSON.parse("{\"entries\":[],\"aliases\":[]}");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CC0wt5QB.js","../chunks/sphvlIzg.js","../chunks/C1xbQMZF.js","../chunks/BJGlbpZ0.js","../chunks/BFJ8iwO4.js","./payload.DSmR2FwN.js","../chunks/Cyt8LZpN.js","../chunks/BHnRUwtv.js","../chunks/BQmUk61d.js","../assets/0.DwB0QWdx.css","../nodes/1.D3kiiIk_.js","../chunks/CzfnuBzq.js","../chunks/Ca-1xMUo.js","../chunks/BbFMtSJ8.js","../chunks/DQsP4nZb.js","../chunks/CivEAG-M.js","../chunks/B8LXiPqe.js","../chunks/Bx2qumU5.js","../chunks/DIYaLgLs.js","../nodes/2.c6X0ddnS.js","../chunks/85w20NVU.js","../chunks/CoLPPvYz.js","../chunks/rIQJtl5L.js","../chunks/DVcao28H.js","../chunks/DbTdXFSI.js","../chunks/CoRMsLUN.js","../chunks/DNFu5yLd.js","../chunks/OznVWGiS.js","../chunks/C9yuuH4J.js","../chunks/Jlr_WNWs.js","../chunks/CXFC38jr.js","../chunks/D_-42ATH.js","../chunks/BuCeXb-q.js","../chunks/Rbl3OsBf.js","../chunks/C6Y_BUwr.js","../chunks/DtmJiR65.js","../chunks/I4bYfY0F.js","../chunks/Bga9Qxze.js","../chunks/CcWwBvi8.js","../chunks/LbAo7oFZ.js","../chunks/BRA_lgsI.js","../chunks/34Sd6e9o.js","../chunks/1VJx1aVI.js","../chunks/BkTC9VdY.js","../chunks/DyqtDkQe.js","../chunks/BmbAoXqr.js","../nodes/3.3Z4QUsQQ.js","../nodes/4.DPB_nXDo.js","../nodes/5.Ck6I7GRI.js","../nodes/6.BiSiWLjz.js","../chunks/C0bsOHz0.js","../chunks/DqBxcKN2.js","../chunks/D-1_v2Lf.js","../chunks/ChEklEBB.js","../chunks/DBMBAz5L.js","../nodes/7.OTA16TkX.js","../chunks/lMQbJOeE.js","../assets/7.T1zeJ20D.css","../nodes/8.CeF7Yj23.js","../chunks/BCgmDXNw.js","../chunks/CUaHcctM.js","../nodes/9.Bxpo8jgd.js","../chunks/BPWrsj_h.js","../chunks/1AvDtYi1.js","../chunks/ByPYmSUR.js","../chunks/fJvE1weH.js","../chunks/Uzaejkud.js","../chunks/CdTxvcQ4.js","../chunks/CNij7yXO.js","../chunks/ag4k__EW.js","../nodes/10.B3aBLsAq.js","../chunks/B9-uqzXO.js","../chunks/B187F-XR.js","../chunks/Djv8qD_2.js","../chunks/CVl4suwo.js","../chunks/Dqc45la5.js","../chunks/DcS7V4T3.js","../chunks/BLG35vEW.js","../assets/select.CV-KWLNP.css","../chunks/ZGbF6Eux.js","../nodes/11.DS0azG6Y.js","../chunks/B7VqKSCZ.js","../chunks/DmlEI0uK.js","../chunks/CNkLk5_8.js","../chunks/CoB4qHba.js","../chunks/D6cAtf8B.js","../chunks/DqR8kuM6.js","../nodes/12.B7-VLcK9.js","../chunks/-MlIqmcL.js","../assets/DataTable.BjgXtTHK.css","../nodes/13.BQ0cOim-.js","../chunks/TZzCN567.js","../chunks/Cms9vBTq.js","../nodes/14.BsbXlPTK.js","../chunks/D6SQx3MR.js","../chunks/CK2nnbJa.js","../chunks/Cj9-pF71.js","../chunks/BVVRTJCQ.js","../nodes/15.
|
|
2
|
-
import{t as e}from"../chunks/CRzLMJPS.js";var t={},n=[()=>e(()=>import(`../nodes/0.CC0wt5QB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>e(()=>import(`../nodes/1.D3kiiIk_.js`),__vite__mapDeps([10,1,4,5,6,7,11,12,13,14,15,16,17,18]),import.meta.url),()=>e(()=>import(`../nodes/2.c6X0ddnS.js`),__vite__mapDeps([19,1,20,12,21,22,23,2,3,4,5,6,7,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]),import.meta.url),()=>e(()=>import(`../nodes/3.3Z4QUsQQ.js`),__vite__mapDeps([46,1,4,5,6,7,11,12,13,14,15,16,17,18]),import.meta.url),()=>e(()=>import(`../nodes/4.DPB_nXDo.js`),__vite__mapDeps([47,1]),import.meta.url),()=>e(()=>import(`../nodes/5.Ck6I7GRI.js`),__vite__mapDeps([48,1,23,2,3,4,5,6,7,12,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40]),import.meta.url),()=>e(()=>import(`../nodes/6.BiSiWLjz.js`),__vite__mapDeps([49,1,4,5,6,7,12,50,51,22,52,53,23,2,3,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,54,42,43,44,45]),import.meta.url),()=>e(()=>import(`../nodes/7.OTA16TkX.js`),__vite__mapDeps([55,1,4,5,6,7,13,12,56,23,2,3,24,25,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,57]),import.meta.url),()=>e(()=>import(`../nodes/8.CeF7Yj23.js`),__vite__mapDeps([58,1,4,5,6,7,13,12,59,25,60,18,15]),import.meta.url),()=>e(()=>import(`../nodes/9.Bxpo8jgd.js`),__vite__mapDeps([61,1,40,5,6,4,7,12,13,20,42,62,30,63,16,64,17,65,8,66,67,25,27,3,68,32,69,56]),import.meta.url),()=>e(()=>import(`../nodes/10.B3aBLsAq.js`),__vite__mapDeps([70,1,13,12,71,72,41,73,35,74,3,25,26,27,75,33,76,77,78,59,63,79,60,16,17,65]),import.meta.url),()=>e(()=>import(`../nodes/11.DS0azG6Y.js`),__vite__mapDeps([80,1,3,40,5,6,4,12,13,71,75,81,82,83,42,84,62,63,85,60,16,8,66,67,25,27,68,32,86]),import.meta.url),()=>e(()=>import(`../nodes/12.B7-VLcK9.js`),__vite__mapDeps([87,1,20,12,63,85,16,88,89]),import.meta.url),()=>e(()=>import(`../nodes/13.BQ0cOim-.js`),__vite__mapDeps([90,1,40,5,6,4,13,12,21,82,91,25,26,27,3,71,92,60,77,68,59,63,85,16,8,88,89]),import.meta.url),()=>e(()=>import(`../nodes/14.BsbXlPTK.js`),__vite__mapDeps([93,1,40,5,6,4,12,13,94,82,28,29,62,35,91,25,26,27,3,71,92,60,77,68,59,95,31,63,85,96,16,8,88,89,66,67,32,97]),import.meta.url),()=>e(()=>import(`../nodes/15.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CC0wt5QB.js","../chunks/sphvlIzg.js","../chunks/C1xbQMZF.js","../chunks/BJGlbpZ0.js","../chunks/BFJ8iwO4.js","./payload.DSmR2FwN.js","../chunks/Cyt8LZpN.js","../chunks/BHnRUwtv.js","../chunks/BQmUk61d.js","../assets/0.DwB0QWdx.css","../nodes/1.D3kiiIk_.js","../chunks/CzfnuBzq.js","../chunks/Ca-1xMUo.js","../chunks/BbFMtSJ8.js","../chunks/DQsP4nZb.js","../chunks/CivEAG-M.js","../chunks/B8LXiPqe.js","../chunks/Bx2qumU5.js","../chunks/DIYaLgLs.js","../nodes/2.c6X0ddnS.js","../chunks/85w20NVU.js","../chunks/CoLPPvYz.js","../chunks/rIQJtl5L.js","../chunks/DVcao28H.js","../chunks/DbTdXFSI.js","../chunks/CoRMsLUN.js","../chunks/DNFu5yLd.js","../chunks/OznVWGiS.js","../chunks/C9yuuH4J.js","../chunks/Jlr_WNWs.js","../chunks/CXFC38jr.js","../chunks/D_-42ATH.js","../chunks/BuCeXb-q.js","../chunks/Rbl3OsBf.js","../chunks/C6Y_BUwr.js","../chunks/DtmJiR65.js","../chunks/I4bYfY0F.js","../chunks/Bga9Qxze.js","../chunks/CcWwBvi8.js","../chunks/LbAo7oFZ.js","../chunks/BRA_lgsI.js","../chunks/34Sd6e9o.js","../chunks/1VJx1aVI.js","../chunks/BkTC9VdY.js","../chunks/DyqtDkQe.js","../chunks/BmbAoXqr.js","../nodes/3.3Z4QUsQQ.js","../nodes/4.DPB_nXDo.js","../nodes/5.Ck6I7GRI.js","../nodes/6.BiSiWLjz.js","../chunks/C0bsOHz0.js","../chunks/DqBxcKN2.js","../chunks/D-1_v2Lf.js","../chunks/ChEklEBB.js","../chunks/DBMBAz5L.js","../nodes/7.OTA16TkX.js","../chunks/lMQbJOeE.js","../assets/7.T1zeJ20D.css","../nodes/8.CeF7Yj23.js","../chunks/BCgmDXNw.js","../chunks/CUaHcctM.js","../nodes/9.Bxpo8jgd.js","../chunks/BPWrsj_h.js","../chunks/1AvDtYi1.js","../chunks/ByPYmSUR.js","../chunks/fJvE1weH.js","../chunks/Uzaejkud.js","../chunks/CdTxvcQ4.js","../chunks/CNij7yXO.js","../chunks/ag4k__EW.js","../nodes/10.B3aBLsAq.js","../chunks/B9-uqzXO.js","../chunks/B187F-XR.js","../chunks/Djv8qD_2.js","../chunks/CVl4suwo.js","../chunks/Dqc45la5.js","../chunks/DcS7V4T3.js","../chunks/BLG35vEW.js","../assets/select.CV-KWLNP.css","../chunks/ZGbF6Eux.js","../nodes/11.DS0azG6Y.js","../chunks/B7VqKSCZ.js","../chunks/DmlEI0uK.js","../chunks/CNkLk5_8.js","../chunks/CoB4qHba.js","../chunks/D6cAtf8B.js","../chunks/DqR8kuM6.js","../nodes/12.B7-VLcK9.js","../chunks/-MlIqmcL.js","../assets/DataTable.BjgXtTHK.css","../nodes/13.BQ0cOim-.js","../chunks/TZzCN567.js","../chunks/Cms9vBTq.js","../nodes/14.BsbXlPTK.js","../chunks/D6SQx3MR.js","../chunks/CK2nnbJa.js","../chunks/Cj9-pF71.js","../chunks/BVVRTJCQ.js","../nodes/15.BXIV1QfS.js","../chunks/gNgZDPHs.js","../chunks/nJUe9gXb.js","../chunks/DR4HRB4w.js","../nodes/16.D7-QOesS.js","../chunks/Cv8bPnPc.js","../chunks/BvRGv1MX.js","../chunks/BFtd89gK.js","../nodes/17.0cv7e5IP.js","../chunks/hvudoNyJ.js","../nodes/18.PJQUQ85Q.js","../nodes/19.DRxrJE9N.js","../nodes/20.CyrNl6i7.js","../chunks/DzeQucGI.js","../chunks/DG4fF26P.js","../nodes/21._AcAMXtP.js","../chunks/6oDkMEbX.js","../chunks/CRzLMJPS.js","../chunks/CBWE8gpj.js","../chunks/Bct5vmEM.js","../chunks/DnJObvmm.js","../assets/21.CZQvs3vE.css","../nodes/22.q4pJo1Ec.js","../nodes/24.CPSunfJJ.js","../nodes/25.DW1_vMxq.js","../chunks/v0PYjZZ5.js","../nodes/26.CqaMEm_t.js","../nodes/27.BZljPb4_.js","../nodes/28.BUnWplt-.js","../nodes/29.PsrL6xdd.js","../nodes/30.Bz0cB9UL.js","../nodes/31.CFCkC-P2.js","../chunks/BrpXEGl0.js","../nodes/32.DWY9hRHg.js","../nodes/33.CswdDR11.js","../nodes/34.ZQaLUUXZ.js","../nodes/35.DFkalFgm.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"../chunks/CRzLMJPS.js";var t={},n=[()=>e(()=>import(`../nodes/0.CC0wt5QB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>e(()=>import(`../nodes/1.D3kiiIk_.js`),__vite__mapDeps([10,1,4,5,6,7,11,12,13,14,15,16,17,18]),import.meta.url),()=>e(()=>import(`../nodes/2.c6X0ddnS.js`),__vite__mapDeps([19,1,20,12,21,22,23,2,3,4,5,6,7,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]),import.meta.url),()=>e(()=>import(`../nodes/3.3Z4QUsQQ.js`),__vite__mapDeps([46,1,4,5,6,7,11,12,13,14,15,16,17,18]),import.meta.url),()=>e(()=>import(`../nodes/4.DPB_nXDo.js`),__vite__mapDeps([47,1]),import.meta.url),()=>e(()=>import(`../nodes/5.Ck6I7GRI.js`),__vite__mapDeps([48,1,23,2,3,4,5,6,7,12,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40]),import.meta.url),()=>e(()=>import(`../nodes/6.BiSiWLjz.js`),__vite__mapDeps([49,1,4,5,6,7,12,50,51,22,52,53,23,2,3,24,25,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,54,42,43,44,45]),import.meta.url),()=>e(()=>import(`../nodes/7.OTA16TkX.js`),__vite__mapDeps([55,1,4,5,6,7,13,12,56,23,2,3,24,25,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,57]),import.meta.url),()=>e(()=>import(`../nodes/8.CeF7Yj23.js`),__vite__mapDeps([58,1,4,5,6,7,13,12,59,25,60,18,15]),import.meta.url),()=>e(()=>import(`../nodes/9.Bxpo8jgd.js`),__vite__mapDeps([61,1,40,5,6,4,7,12,13,20,42,62,30,63,16,64,17,65,8,66,67,25,27,3,68,32,69,56]),import.meta.url),()=>e(()=>import(`../nodes/10.B3aBLsAq.js`),__vite__mapDeps([70,1,13,12,71,72,41,73,35,74,3,25,26,27,75,33,76,77,78,59,63,79,60,16,17,65]),import.meta.url),()=>e(()=>import(`../nodes/11.DS0azG6Y.js`),__vite__mapDeps([80,1,3,40,5,6,4,12,13,71,75,81,82,83,42,84,62,63,85,60,16,8,66,67,25,27,68,32,86]),import.meta.url),()=>e(()=>import(`../nodes/12.B7-VLcK9.js`),__vite__mapDeps([87,1,20,12,63,85,16,88,89]),import.meta.url),()=>e(()=>import(`../nodes/13.BQ0cOim-.js`),__vite__mapDeps([90,1,40,5,6,4,13,12,21,82,91,25,26,27,3,71,92,60,77,68,59,63,85,16,8,88,89]),import.meta.url),()=>e(()=>import(`../nodes/14.BsbXlPTK.js`),__vite__mapDeps([93,1,40,5,6,4,12,13,94,82,28,29,62,35,91,25,26,27,3,71,92,60,77,68,59,95,31,63,85,96,16,8,88,89,66,67,32,97]),import.meta.url),()=>e(()=>import(`../nodes/15.BXIV1QfS.js`),__vite__mapDeps([98,1,25,40,5,6,4,7,12,13,26,27,3,72,15,99,22,100,83,73,67,68,32,76,77,91,71,92,60,95,31,63,101,35,16,64,17,65,18,39]),import.meta.url),()=>e(()=>import(`../nodes/16.D7-QOesS.js`),__vite__mapDeps([102,1,40,5,6,4,12,13,71,72,82,92,3,25,26,27,60,73,62,30,35,91,77,68,63,85,16,8,18,15,66,67,32,103,104,97,105,38,37]),import.meta.url),()=>e(()=>import(`../nodes/17.0cv7e5IP.js`),__vite__mapDeps([106,1,4,5,6,7,107,12,18,15]),import.meta.url),()=>e(()=>import(`../nodes/18.PJQUQ85Q.js`),__vite__mapDeps([108,1]),import.meta.url),()=>e(()=>import(`../nodes/19.DRxrJE9N.js`),__vite__mapDeps([109,1,6,5,43]),import.meta.url),()=>e(()=>import(`../nodes/20.CyrNl6i7.js`),__vite__mapDeps([110,1,40,5,6,4,12,56,111,42,84,112,25,31,27,3,23,2,7,24,13,14,26,15,28,29,30,32,33,34,35,36,37,38,39,91,71,92,60,77,68,43,63,85,101,8]),import.meta.url),()=>e(()=>import(`../nodes/21._AcAMXtP.js`),__vite__mapDeps([113,114,115,1,2,3,25,4,5,6,7,12,24,13,14,26,27,15,28,29,30,31,32,33,34,35,36,37,38,39,40,71,104,75,72,45,116,117,100,92,60,42,74,76,77,78,59,95,112,96,8,18,118,86,119]),import.meta.url),()=>e(()=>import(`../nodes/22.q4pJo1Ec.js`),__vite__mapDeps([120,1,4,5,6,7,13,12,59,25,60,18,15,118]),import.meta.url),()=>e(()=>import(`../chunks/BvRk9kiK.js`),[],import.meta.url),()=>e(()=>import(`../nodes/24.CPSunfJJ.js`),__vite__mapDeps([121,1,4,5,6,7,13,12,91,25,26,27,3,71,92,60,77,68,79,18,15]),import.meta.url),()=>e(()=>import(`../nodes/25.DW1_vMxq.js`),__vite__mapDeps([122,1,3,40,5,6,4,7,12,13,94,26,25,27,15,81,99,116,117,111,56,42,84,112,31,53,82,92,60,28,62,123,30,35,67,68,32,91,71,77,34,14,59,95,43,63,85,79,101,96,8,18,66,97,105]),import.meta.url),()=>e(()=>import(`../nodes/26.CqaMEm_t.js`),__vite__mapDeps([124,1,4,5,6,7,13,12,59,25,60,18,15]),import.meta.url),()=>e(()=>import(`../nodes/27.BZljPb4_.js`),__vite__mapDeps([125,1,20,12,51,30,63,16,17,65,69,56]),import.meta.url),()=>e(()=>import(`../nodes/28.BUnWplt-.js`),__vite__mapDeps([126,1,50,12,73,63,16,17,65]),import.meta.url),()=>e(()=>import(`../nodes/29.PsrL6xdd.js`),__vite__mapDeps([127,1,40,5,6,4,7,13,12,82,42,84,62,91,25,26,27,3,71,92,60,77,68,63,85,79,16,64,17,65,8,66,67,32,86]),import.meta.url),()=>e(()=>import(`../nodes/30.Bz0cB9UL.js`),__vite__mapDeps([128,1,40,5,6,4,12,13,99,107,92,3,25,26,27,60,62,123,35,91,71,77,68,63,85,16,64,17,65,8,66,67,32,103,104,72,97,105,36,37]),import.meta.url),()=>e(()=>import(`../nodes/31.CFCkC-P2.js`),__vite__mapDeps([129,1,40,5,6,4,13,12,130,51,82,62,67,25,27,3,68,32,91,26,71,92,60,77,63,85,16,8,88,89]),import.meta.url),()=>e(()=>import(`../nodes/32.DWY9hRHg.js`),__vite__mapDeps([131,1,40,5,6,4,13,12,117,54,67,25,27,3,68,32,63,85,16,8,88,89]),import.meta.url),()=>e(()=>import(`../nodes/33.CswdDR11.js`),__vite__mapDeps([132,1,12,62,63,16,64,17,65]),import.meta.url),()=>e(()=>import(`../nodes/34.ZQaLUUXZ.js`),__vite__mapDeps([133,1,40,5,6,4,13,12,130,53,62,67,25,27,3,68,32,63,85,60,16,8,88,89]),import.meta.url),()=>e(()=>import(`../nodes/35.DFkalFgm.js`),__vite__mapDeps([134,1,40,5,6,4,7,13,12,26,25,27,3,99,52,62,74,71,75,33,76,77,78,67,68,32,59,95,31,63,85,79,60,16,64,17,65,8,18,15,88,89,37]),import.meta.url)],r=[0,2,5,6],i={"/":[-8],"/accept-invite":[-9],"/admin":[-10,[2],[3]],"/admin/audit":[-11,[2],[3]],"/admin/compute":[-12,[2],[3]],"/admin/organizations":[-13,[2],[3]],"/admin/projects":[-14,[2],[3]],"/admin/projects/[id]":[-15,[2],[3]],"/admin/system":[-16,[2],[3]],"/admin/users":[-17,[2],[3]],"/auth/email/sent":[17],"/auth/email/start":[-19],"/docs/api":[-20],"/library":[-21,[4]],"/library/[guid]":[-22,[4]],"/login":[-23],"/logout":[23],"/oauth/authorize":[-25],"/projects":[-26,[5]],"/setup":[-27],"/team":[-28,[6]],"/team/activity":[28,[6]],"/team/compute":[-30,[6]],"/team/members":[-31,[6]],"/team/projects":[-32,[6]],"/team/reclaim":[-33,[6]],"/team/settings":[-34,[6]],"/team/shares":[-35,[6]],"/team/tokens":[-36,[6]]},a={handleError:(({kind:e,error:t})=>{e===`unknown`&&console.error(t)}),reroute:(()=>{}),transport:{}},o=Object.fromEntries(Object.entries(a.transport).map(([e,t])=>[e,t.decode])),s=Object.fromEntries(Object.entries(a.transport).map(([e,t])=>[e,t.encode])),c=!1,l=(e,t)=>o[e](t),u=()=>e(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{l as decode,o as decoders,i as dictionary,s as encoders,u as get_error_template,c as hash,a as hooks,t as matchers,n as nodes,r as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,D as t,Ft as n,G as r,H as i,J as a,K as o,L as s,Lt as c,Ot as l,P as u,Pt as d,Q as f,Rt as p,S as m,St as h,T as g,U as _,V as v,_t as y,a as b,dt as x,f as S,ft as C,ht as w,i as T,it as E,k as D,kt as O,l as k,lt as A,m as j,mt as M,n as N,ot as P,p as F,pt as I,q as L,r as R,st as z,t as B,tt as V,u as ee,v as H,x as U,yt as W}from"../chunks/sphvlIzg.js";import{a as te,c as G,d as K,f as q,n as J,o as Y,r as ne,s as re,t as ie,y as X}from"../chunks/CoRMsLUN.js";import{s as ae}from"../chunks/BRA_lgsI.js";import{n as oe}from"../chunks/BFJ8iwO4.js";import"../chunks/BHnRUwtv.js";import{n as se,r as Z}from"../chunks/Ca-1xMUo.js";import{t as ce}from"../chunks/BbFMtSJ8.js";import{o as le}from"../chunks/DNFu5yLd.js";import{t as ue}from"../chunks/B187F-XR.js";import{a as de,i as fe,r as pe}from"../chunks/CivEAG-M.js";import{t as me}from"../chunks/gNgZDPHs.js";import{t as he}from"../chunks/rIQJtl5L.js";import{t as ge}from"../chunks/nJUe9gXb.js";import{t as _e}from"../chunks/CNkLk5_8.js";import{t as ve}from"../chunks/Djv8qD_2.js";import{p as ye,q as be}from"../chunks/OznVWGiS.js";import{a as xe,c as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"../chunks/CdTxvcQ4.js";import{t as ke}from"../chunks/DcS7V4T3.js";import{t as Ae}from"../chunks/TZzCN567.js";import{i as je,n as Me,r as Ne,t as Pe}from"../chunks/CK2nnbJa.js";import{t as Fe}from"../chunks/1AvDtYi1.js";import{t as Ie}from"../chunks/DR4HRB4w.js";import{n as Le,t as Re}from"../chunks/B8LXiPqe.js";import{t as ze}from"../chunks/ByPYmSUR.js";import{t as Be}from"../chunks/Bx2qumU5.js";import{t as Ve}from"../chunks/fJvE1weH.js";import{t as He}from"../chunks/DIYaLgLs.js";import{t as Ue}from"../chunks/LbAo7oFZ.js";var We={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]]};We.node;var Ge=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ke(e,t){let n=N(t,Ge);Z(e,R(()=>n,{get icon(){return We}}))}var qe={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]]};qe.node;var Je=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ye(e,t){let n=N(t,Je);Z(e,R(()=>n,{get icon(){return qe}}))}var Xe={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16 12-4-4-4 4`}],[`path`,{d:`M12 16V8`}]],aliases:[`arrow-up-circle`]};Xe.node;var Ze=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qe(e,t){let n=N(t,Ze);Z(e,R(()=>n,{get icon(){return Xe}}))}var $e={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],aliases:[`x-circle`]};$e.node;var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=N(t,et);Z(e,R(()=>n,{get icon(){return $e}}))}var nt={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`}],[`path`,{d:`M6.453 15h11.094`}],[`path`,{d:`M8.5 2h7`}]]};nt.node;var rt=new Set([`$$slots`,`$$events`,`$$legacy`]);function it(e,t){let n=N(t,rt);Z(e,R(()=>n,{get icon(){return nt}}))}var at={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`}],[`path`,{d:`M5 2v2`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`}],[`circle`,{cx:`20`,cy:`10`,r:`2`}]]};at.node;var ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function st(e,t){let n=N(t,ot);Z(e,R(()=>n,{get icon(){return at}}))}var ct=Y({component:`switch`,parts:[`root`,`thumb`]}),lt=new be(`Switch.Root`),ut=class e{static create(t){return lt.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=K(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){e.key!==`Enter`&&e.key!==` `||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=h(()=>({"data-disabled":J(this.opts.disabled.current),"data-state":G(this.opts.checked.current),"data-required":J(this.opts.required.current)}));get sharedProps(){return f(this.#t)}set sharedProps(e){y(this.#t,e)}#n=h(()=>({checked:this.opts.checked.current}));get snippetProps(){return f(this.#n)}set snippetProps(e){y(this.#n,e)}#r=h(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:te(this.opts.disabled.current),"aria-checked":re(this.opts.checked.current,!1),"aria-required":ne(this.opts.required.current),[ct.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#r)}set props(e){y(this.#r,e)}},dt=class e{static create(){return new e(lt.get())}root;#e=h(()=>this.root.opts.name.current!==void 0);get shouldRender(){return f(this.#e)}set shouldRender(e){y(this.#e,e)}constructor(e){this.root=e}#t=h(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return f(this.#t)}set props(e){y(this.#t,e)}},ft=class e{static create(t){return new e(t,lt.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#e=h(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){y(this.#e,e)}#t=h(()=>({...this.root.sharedProps,id:this.opts.id.current,[ct.thumb]:``,...this.attachment}));get props(){return f(this.#t)}set props(e){y(this.#t,e)}};function pt(t,n){O(n,!0);let r=dt.create();var a=i(),o=C(a),s=e=>{ke(e,R(()=>r.props))};e(o,e=>{r.shouldRender&&e(s)}),v(t,a),l()}var mt=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),ht=_(`<button><!></button>`),gt=_(`<!> <!>`,1);function _t(t,a){let o=r();O(a,!0);let s=B(a,`ref`,15,null),d=B(a,`id`,19,()=>ie(o)),p=B(a,`disabled`,3,!1),m=B(a,`required`,3,!1),g=B(a,`checked`,15,!1),_=B(a,`value`,3,`on`),y=B(a,`name`,3,void 0),b=B(a,`type`,3,`button`),w=B(a,`onCheckedChange`,3,ye),T=N(a,mt),E=ut.create({checked:X(()=>g(),e=>{g(e),w()?.(e)}),disabled:X(()=>p()??!1),required:X(()=>m()),value:X(()=>_()),name:X(()=>y()),id:X(()=>d()),ref:X(()=>s(),e=>s(e))}),D=h(()=>q(T,E.props,{type:b()}));var k=gt(),A=C(k),j=e=>{var t=i(),n=C(t);{let e=h(()=>({props:f(D),...E.snippetProps}));u(n,()=>a.child,()=>f(e))}v(e,t)},P=e=>{var t=ht();S(t,()=>({...f(D)}));var r=x(t);u(r,()=>a.children??c,()=>E.snippetProps),n(t),v(e,t)};e(A,e=>{a.child?e(j):e(P,-1)}),pt(M(A,2),{}),v(t,k),l()}var vt=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),yt=_(`<span><!></span>`);function bt(t,a){let o=r();O(a,!0);let s=B(a,`ref`,15,null),d=B(a,`id`,19,()=>ie(o)),p=N(a,vt),m=ft.create({id:X(()=>d()),ref:X(()=>s(),e=>s(e))}),g=h(()=>q(p,m.props));var _=i(),y=C(_),b=e=>{var t=i(),n=C(t);{let e=h(()=>({props:f(g),...m.snippetProps}));u(n,()=>a.child,()=>f(e))}v(e,t)},w=e=>{var t=yt();S(t,()=>({...f(g)}));var r=x(t);u(r,()=>a.children??c,()=>m.snippetProps),n(t),v(e,t)};e(y,e=>{a.child?e(b):e(w,-1)}),v(t,_),l()}var xt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`]);function St(e,t){O(t,!0);let n=B(t,`ref`,15,null),r=B(t,`checked`,15,!1),a=N(t,xt);var o=i(),s=C(o);{let e=h(()=>se(`peer w-8 shadow-xs h-4.5 inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,t.class));g(s,()=>_t,(t,o)=>{o(t,R({"data-slot":`switch`,get class(){return f(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=i(),r=C(n);{let e=h(()=>se(`size-4 data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-3.5 pointer-events-none block rounded-full bg-background ring-0 transition-transform dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`));g(r,()=>bt,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return f(e)}})})}v(e,n)},$$slots:{default:!0}}))})}v(e,o),l()}function Q(e,t){let n=t.exec(e);return n?n[1]:void 0}function Ct(e){let t=String.raw`\d+\.\d+\.\d+[^\s]*`,n=new RegExp(String.raw`(?:Target \([^)]*\)|Available):\s*(${t})\s*(?:→|->)\s*(${t})`).exec(e);return{from:Q(e,/Current @selvajs\/selva:\s*v?(\d+\.\d+\.\d+[^\s]*)/)??n?.[1],to:Q(e,/New @selvajs\/selva:\s*v?(\d+\.\d+\.\d+[^\s]*)/)??n?.[2]}}function $(e,t){return e.includes(t)}function wt(e,t){let{from:n,to:r}=Ct(t);if(e===null)return{severity:`pending`,title:`Update in progress…`};if(e===6||$(t,`Manual recovery required`)||$(t,`manual intervention required`))return{severity:`critical`,title:`Update failed AND rollback failed — the app may be OFFLINE`,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.",from:n,to:r};if(e===-2)return{severity:`critical`,title:`App did not come back online within 15 minutes`,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.",from:n,to:r};if(e===4)return{severity:`critical`,title:`Update failed and the rollback could not reinstall — the app may be OFFLINE`,detail:"The previous version could not be restored from npm. SSH into the server and run `pm2 logs selva-compute`; if the app is down, reinstall explicitly with `npm install --prefer-online @selvajs/cli@<version> @selvajs/selva@<version>` from the deployment directory.",from:n,to:r};if(e===3)return{severity:`critical`,title:`Update failed its health check and could not be rolled back automatically`,detail:"No prior version was recorded, so the previous build could not be restored. Check `pm2 logs selva-compute` to confirm whether the app came back online.",from:n,to:r};if(e===143||e===130||e===129||$(t,`KILLED`))return{severity:`critical`,title:`Update was killed before it finished — nothing was installed`,detail:"The runner was terminated mid-update, most often by a systemd-supervised PM2 restarting its whole control group. The version on disk is unchanged. Check `pm2 logs selva-compute` and confirm the app is online before retrying; if a global pm2 owns the daemon, reconcile that first.",from:n,to:r};if(e===9||$(t,`SYSTEMD_PM2`))return{severity:`warning`,title:`Update cancelled — PM2 needs a resync that only a shell can do safely. The app is untouched.`,detail:"This deployment's PM2 runs under systemd, where `pm2 update` restarts the unit and kills the update mid-run. Nothing was installed and the app is still serving. SSH in and run `./node_modules/.bin/pm2 update` from the deployment directory, then retry the update here.",from:n,to:r};if(e===8||$(t,`PM2_SKEW`)){let e=Q(t,/daemon \(v(\d+\.\d+\.\d+)\)/),i=Q(t,/deployment's pm2 \(v(\d+\.\d+\.\d+)\)/);return{severity:`warning`,title:e&&i?`Update cancelled — a global PM2 (v${e}) owns the daemon, not this deployment's (v${i}). The app is untouched.`:`Update cancelled — a conflicting global PM2 owns the daemon. The app is untouched.`,detail:"Resyncing would have downgraded the daemon and dropped its process table, so the update stopped before taking the app down. On the server: `which -a pm2`, `pm2 -v`, `pm2 ping` — remove or align the global pm2, then retry.",from:n,to:r}}if($(t,`SCHEMA_SKEW`)){let e=Q(t,/expects database migration head (\S+?),/),i=Q(t,/this database is at (\S+?)\./),a=e&&i?` The database is at ${i}; ${r??`it`} needs ${e}.`:``,o=Q(t,/@selvajs\/supabase-provider@([\w.-]+)/)??($(t,`channel: beta`)?`beta`:`latest`);return{severity:`warning`,title:`Update rolled back — the database migrations for ${r??`the new version`} have not been applied.${a} The app is online${n?` on ${n}`:``}.`,detail:`Nothing is wrong with the new version. Selva does not apply migrations during an update, because they cannot be rolled back — auto-migrating and then rolling the code back would leave the app and database on different heads. Apply them on the server, then re-run this update: \`npm install --prefer-online @selvajs/supabase-provider@${o}\`, then \`npx selva-supabase\`, then \`npx supabase db push\`. The provider install is not optional — the migration SQL ships inside that package, and the update only moves @selvajs/cli and @selvajs/selva, so a sync without it copies nothing and the push reports "up to date" having done nothing. Retrying without this will fail in exactly the same way.`,from:n,to:r}}if($(t,`AT_REST_SECRETS`))return{severity:`warning`,title:`Update rolled back — stored compute server keys do not decrypt under this host's SELVA_AT_REST_KEY. The app is online${n?` on ${n}`:``}.`,detail:`This is a configuration problem on the server, not a fault in the new version, so retrying alone will fail identically. Re-enter the affected keys at /admin/compute, or restore the SELVA_AT_REST_KEY the values were encrypted with, then re-run the update.`,from:n,to:r};if(e===5||$(t,`Rolled back`))return{severity:`warning`,title:`Update failed — safely rolled back${n?` to ${n}`:``}. The app is online.`,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.`,from:n,to:r};if($(t,`ENGINE_MISMATCH`)||$(t,`EBADENGINE`)){let e=Q(t,/requires Node ([^\s]+(?:\s*[<>=]+\s*[\d.]+)*)/),i=Q(t,/this host runs v?(\d+\.\d+\.\d+)/);return{severity:`warning`,title:i?`Updated${r?` to ${r}`:``}, but this release needs Node ${e??`(newer)`} — the host runs v${i}. Expect runtime failures.`:`Updated${r?` to ${r}`:``}, but this release requires a newer Node than the host provides. Expect runtime failures.`,detail:`npm installed it anyway (engine-strict is off) and the health check passed, but it does not exercise the newer APIs — routes that do will throw at request time. Upgrade Node on the server, then re-run the update.`,from:n,to:r}}return $(t,`npm cache may be stale`)||$(t,`No version change`)?{severity:`warning`,title:`No version change — npm installed the same version.`,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`.",from:n,to:r}:e===0?$(t,`Already on the`)||$(t,`Nothing to do`)?{severity:`info`,title:`Already up to date${n?` (${n})`:``} — nothing to install.`,detail:`No changes were made and the app was not restarted.`,from:n,to:r}:n&&r&&n!==r?{severity:`success`,title:`Updated ${n} → ${r}. The app is back online.`,from:n,to:r}:r?{severity:`success`,title:`Update complete — now on ${r}. The app is back online.`,from:n,to:r}:{severity:`success`,title:`Update completed and the app is back online.`,from:n,to:r}:{severity:`critical`,title:`Update failed (exit code ${e}).`,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.",from:n,to:r}}var Tt=_(`<span title="Currently installed @selvajs/selva version"> </span>`),Et=_(`Update @selvajs/* to the latest <span class="font-medium"> </span> release and restart`,1),Dt=_(`<div class="flex items-start justify-between gap-3"><!> <!></div> <!>`,1),Ot=_(`<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"><!> <span> <span class="font-mono"> </span> → <span class="font-mono"> </span></span></div>`),kt=_(`<p class="text-muted-foreground text-sm"> <span class="font-mono"> </span>).</p>`),At=_(`<button type="button" class="text-muted-foreground hover:text-foreground text-xs underline underline-offset-2">Override anyway (advanced)</button>`),jt=_(`<div class="space-y-2"><label class="text-muted-foreground block text-xs" for="node-override">Type <span class="text-foreground font-mono"> </span> to confirm you accept
|
|
1
|
+
import{A as e,D as t,Ft as n,G as r,H as i,J as a,K as o,L as s,Lt as c,Ot as l,P as u,Pt as d,Q as f,Rt as p,S as m,St as h,T as g,U as _,V as v,_t as y,a as b,dt as x,f as S,ft as C,ht as w,i as T,it as E,k as D,kt as O,l as k,lt as A,m as j,mt as M,n as N,ot as P,p as F,pt as I,q as L,r as R,st as z,t as B,tt as V,u as ee,v as H,x as U,yt as W}from"../chunks/sphvlIzg.js";import{a as te,c as G,d as K,f as q,n as J,o as Y,r as ne,s as re,t as ie,y as X}from"../chunks/CoRMsLUN.js";import{s as ae}from"../chunks/BRA_lgsI.js";import{n as oe}from"../chunks/BFJ8iwO4.js";import"../chunks/BHnRUwtv.js";import{n as se,r as Z}from"../chunks/Ca-1xMUo.js";import{t as ce}from"../chunks/BbFMtSJ8.js";import{o as le}from"../chunks/DNFu5yLd.js";import{t as ue}from"../chunks/B187F-XR.js";import{a as de,i as fe,r as pe}from"../chunks/CivEAG-M.js";import{t as me}from"../chunks/gNgZDPHs.js";import{t as he}from"../chunks/rIQJtl5L.js";import{t as ge}from"../chunks/nJUe9gXb.js";import{t as _e}from"../chunks/CNkLk5_8.js";import{t as ve}from"../chunks/Djv8qD_2.js";import{p as ye,q as be}from"../chunks/OznVWGiS.js";import{a as xe,c as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"../chunks/CdTxvcQ4.js";import{t as ke}from"../chunks/DcS7V4T3.js";import{t as Ae}from"../chunks/TZzCN567.js";import{i as je,n as Me,r as Ne,t as Pe}from"../chunks/CK2nnbJa.js";import{t as Fe}from"../chunks/1AvDtYi1.js";import{t as Ie}from"../chunks/DR4HRB4w.js";import{n as Le,t as Re}from"../chunks/B8LXiPqe.js";import{t as ze}from"../chunks/ByPYmSUR.js";import{t as Be}from"../chunks/Bx2qumU5.js";import{t as Ve}from"../chunks/fJvE1weH.js";import{t as He}from"../chunks/DIYaLgLs.js";import{t as Ue}from"../chunks/LbAo7oFZ.js";var We={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]]};We.node;var Ge=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ke(e,t){let n=N(t,Ge);Z(e,R(()=>n,{get icon(){return We}}))}var qe={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]]};qe.node;var Je=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ye(e,t){let n=N(t,Je);Z(e,R(()=>n,{get icon(){return qe}}))}var Xe={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16 12-4-4-4 4`}],[`path`,{d:`M12 16V8`}]],aliases:[`arrow-up-circle`]};Xe.node;var Ze=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qe(e,t){let n=N(t,Ze);Z(e,R(()=>n,{get icon(){return Xe}}))}var $e={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],aliases:[`x-circle`]};$e.node;var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=N(t,et);Z(e,R(()=>n,{get icon(){return $e}}))}var nt={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`}],[`path`,{d:`M6.453 15h11.094`}],[`path`,{d:`M8.5 2h7`}]]};nt.node;var rt=new Set([`$$slots`,`$$events`,`$$legacy`]);function it(e,t){let n=N(t,rt);Z(e,R(()=>n,{get icon(){return nt}}))}var at={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`}],[`path`,{d:`M5 2v2`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`}],[`circle`,{cx:`20`,cy:`10`,r:`2`}]]};at.node;var ot=new Set([`$$slots`,`$$events`,`$$legacy`]);function st(e,t){let n=N(t,ot);Z(e,R(()=>n,{get icon(){return at}}))}var ct=Y({component:`switch`,parts:[`root`,`thumb`]}),lt=new be(`Switch.Root`),ut=class e{static create(t){return lt.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=K(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){e.key!==`Enter`&&e.key!==` `||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=h(()=>({"data-disabled":J(this.opts.disabled.current),"data-state":G(this.opts.checked.current),"data-required":J(this.opts.required.current)}));get sharedProps(){return f(this.#t)}set sharedProps(e){y(this.#t,e)}#n=h(()=>({checked:this.opts.checked.current}));get snippetProps(){return f(this.#n)}set snippetProps(e){y(this.#n,e)}#r=h(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:te(this.opts.disabled.current),"aria-checked":re(this.opts.checked.current,!1),"aria-required":ne(this.opts.required.current),[ct.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return f(this.#r)}set props(e){y(this.#r,e)}},dt=class e{static create(){return new e(lt.get())}root;#e=h(()=>this.root.opts.name.current!==void 0);get shouldRender(){return f(this.#e)}set shouldRender(e){y(this.#e,e)}constructor(e){this.root=e}#t=h(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return f(this.#t)}set props(e){y(this.#t,e)}},ft=class e{static create(t){return new e(t,lt.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#e=h(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return f(this.#e)}set snippetProps(e){y(this.#e,e)}#t=h(()=>({...this.root.sharedProps,id:this.opts.id.current,[ct.thumb]:``,...this.attachment}));get props(){return f(this.#t)}set props(e){y(this.#t,e)}};function pt(t,n){O(n,!0);let r=dt.create();var a=i(),o=C(a),s=e=>{ke(e,R(()=>r.props))};e(o,e=>{r.shouldRender&&e(s)}),v(t,a),l()}var mt=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),ht=_(`<button><!></button>`),gt=_(`<!> <!>`,1);function _t(t,a){let o=r();O(a,!0);let s=B(a,`ref`,15,null),d=B(a,`id`,19,()=>ie(o)),p=B(a,`disabled`,3,!1),m=B(a,`required`,3,!1),g=B(a,`checked`,15,!1),_=B(a,`value`,3,`on`),y=B(a,`name`,3,void 0),b=B(a,`type`,3,`button`),w=B(a,`onCheckedChange`,3,ye),T=N(a,mt),E=ut.create({checked:X(()=>g(),e=>{g(e),w()?.(e)}),disabled:X(()=>p()??!1),required:X(()=>m()),value:X(()=>_()),name:X(()=>y()),id:X(()=>d()),ref:X(()=>s(),e=>s(e))}),D=h(()=>q(T,E.props,{type:b()}));var k=gt(),A=C(k),j=e=>{var t=i(),n=C(t);{let e=h(()=>({props:f(D),...E.snippetProps}));u(n,()=>a.child,()=>f(e))}v(e,t)},P=e=>{var t=ht();S(t,()=>({...f(D)}));var r=x(t);u(r,()=>a.children??c,()=>E.snippetProps),n(t),v(e,t)};e(A,e=>{a.child?e(j):e(P,-1)}),pt(M(A,2),{}),v(t,k),l()}var vt=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),yt=_(`<span><!></span>`);function bt(t,a){let o=r();O(a,!0);let s=B(a,`ref`,15,null),d=B(a,`id`,19,()=>ie(o)),p=N(a,vt),m=ft.create({id:X(()=>d()),ref:X(()=>s(),e=>s(e))}),g=h(()=>q(p,m.props));var _=i(),y=C(_),b=e=>{var t=i(),n=C(t);{let e=h(()=>({props:f(g),...m.snippetProps}));u(n,()=>a.child,()=>f(e))}v(e,t)},w=e=>{var t=yt();S(t,()=>({...f(g)}));var r=x(t);u(r,()=>a.children??c,()=>m.snippetProps),n(t),v(e,t)};e(y,e=>{a.child?e(b):e(w,-1)}),v(t,_),l()}var xt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`]);function St(e,t){O(t,!0);let n=B(t,`ref`,15,null),r=B(t,`checked`,15,!1),a=N(t,xt);var o=i(),s=C(o);{let e=h(()=>se(`peer w-8 shadow-xs h-4.5 inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,t.class));g(s,()=>_t,(t,o)=>{o(t,R({"data-slot":`switch`,get class(){return f(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=i(),r=C(n);{let e=h(()=>se(`size-4 data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-3.5 pointer-events-none block rounded-full bg-background ring-0 transition-transform dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`));g(r,()=>bt,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return f(e)}})})}v(e,n)},$$slots:{default:!0}}))})}v(e,o),l()}function Q(e,t){let n=t.exec(e);return n?n[1]:void 0}function Ct(e){let t=String.raw`\d+\.\d+\.\d+[^\s]*`,n=new RegExp(String.raw`(?:Target \([^)]*\)|Available):\s*(${t})\s*(?:→|->)\s*(${t})`).exec(e);return{from:Q(e,/Current @selvajs\/selva:\s*v?(\d+\.\d+\.\d+[^\s]*)/)??n?.[1],to:Q(e,/New @selvajs\/selva:\s*v?(\d+\.\d+\.\d+[^\s]*)/)??n?.[2]}}function $(e,t){return e.includes(t)}function wt(e,t){let{from:n,to:r}=Ct(t);if(e===null)return{severity:`pending`,title:`Update in progress…`};if(e===6||$(t,`Manual recovery required`)||$(t,`manual intervention required`))return{severity:`critical`,title:`Update failed AND rollback failed — the app may be OFFLINE`,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.",from:n,to:r};if(e===-2)return{severity:`critical`,title:`App did not come back online within 15 minutes`,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.",from:n,to:r};if(e===4)return{severity:`critical`,title:`Update failed and the rollback could not reinstall — the app may be OFFLINE`,detail:"The previous version could not be restored from npm. SSH into the server and run `pm2 logs selva-compute`; if the app is down, reinstall explicitly with `npm install --prefer-online @selvajs/cli@<version> @selvajs/selva@<version>` from the deployment directory.",from:n,to:r};if(e===3)return{severity:`critical`,title:`Update failed its health check and could not be rolled back automatically`,detail:"No prior version was recorded, so the previous build could not be restored. Check `pm2 logs selva-compute` to confirm whether the app came back online.",from:n,to:r};if(e===143||e===130||e===129||$(t,`KILLED`))return{severity:`critical`,title:`Update was killed before it finished — nothing was installed`,detail:"The runner was terminated mid-update, most often by a systemd-supervised PM2 restarting its whole control group. The version on disk is unchanged. Check `pm2 logs selva-compute` and confirm the app is online before retrying; if a global pm2 owns the daemon, reconcile that first.",from:n,to:r};if(e===9||$(t,`SYSTEMD_PM2`))return{severity:`warning`,title:`Update cancelled — PM2 needs a resync that only a shell can do safely. The app is untouched.`,detail:"This deployment's PM2 runs under systemd, where `pm2 update` restarts the unit and kills the update mid-run. Nothing was installed and the app is still serving. SSH in and run `./node_modules/.bin/pm2 update` from the deployment directory, then retry the update here.",from:n,to:r};if(e===8||$(t,`PM2_SKEW`)){let e=Q(t,/daemon \(v(\d+\.\d+\.\d+)\)/),i=Q(t,/deployment's pm2 \(v(\d+\.\d+\.\d+)\)/);return{severity:`warning`,title:e&&i?`Update cancelled — a global PM2 (v${e}) owns the daemon, not this deployment's (v${i}). The app is untouched.`:`Update cancelled — a conflicting global PM2 owns the daemon. The app is untouched.`,detail:"Resyncing would have downgraded the daemon and dropped its process table, so the update stopped before taking the app down. On the server: `which -a pm2`, `pm2 -v`, `pm2 ping` — remove or align the global pm2, then retry.",from:n,to:r}}if($(t,`SCHEMA_SKEW`)){let e=Q(t,/expects database migration head (\S+?),/),i=Q(t,/this database is at (\S+?)\./),a=e&&i?` The database is at ${i}; ${r??`it`} needs ${e}.`:``,o=Q(t,/@selvajs\/supabase-provider@([\w.-]+)/)??($(t,`channel: beta`)?`beta`:`latest`);return{severity:`warning`,title:`Update rolled back — the database migrations for ${r??`the new version`} have not been applied.${a} The app is online${n?` on ${n}`:``}.`,detail:`Nothing is wrong with the new version. Selva does not apply migrations during an update, because they cannot be rolled back — auto-migrating and then rolling the code back would leave the app and database on different heads. Apply them on the server, then re-run this update: \`npm install --prefer-online @selvajs/supabase-provider@${o}\`, then \`npx selva-supabase\`, then \`npx supabase db push\`. The provider install is not optional — the migration SQL ships inside that package, and the update only moves @selvajs/cli and @selvajs/selva, so a sync without it copies nothing and the push reports "up to date" having done nothing. Retrying without this will fail in exactly the same way.`,from:n,to:r}}if($(t,`AT_REST_SECRETS`))return{severity:`warning`,title:`Update rolled back — stored compute server keys do not decrypt under this host's SELVA_AT_REST_KEY. The app is online${n?` on ${n}`:``}.`,detail:`This is a configuration problem on the server, not a fault in the new version, so retrying alone will fail identically. Re-enter the affected keys at /admin/compute, or restore the SELVA_AT_REST_KEY the values were encrypted with, then re-run the update.`,from:n,to:r};if(e===5||$(t,`Rolled back`))return{severity:`warning`,title:`Update failed — safely rolled back${n?` to ${n}`:``}. The app is online.`,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.`,from:n,to:r};if($(t,`ENGINE_MISMATCH`)||$(t,`EBADENGINE`)){let e=Q(t,/requires Node ([^\s]+(?:\s*[<>=]+\s*[\d.]+)*)/),i=Q(t,/this host runs v?(\d+\.\d+\.\d+)/);return{severity:`warning`,title:i?`Updated${r?` to ${r}`:``}, but this release needs Node ${e??`(newer)`} — the host runs v${i}. Expect runtime failures.`:`Updated${r?` to ${r}`:``}, but this release requires a newer Node than the host provides. Expect runtime failures.`,detail:`npm installed it anyway (engine-strict is off) and the health check passed, but it does not exercise the newer APIs — routes that do will throw at request time. Upgrade Node on the server, then re-run the update.`,from:n,to:r}}return $(t,`PM2_RESYNC_NEEDED`)?{severity:`warning`,title:`Updated${r?` to ${r}`:``}, but the pm2 daemon still runs the old pm2.`,detail:"The app is online. On the server, run `npx pm2 update` in the deployment directory, let it finish, then check `npx pm2 list` shows selva-compute online.",from:n,to:r}:$(t,`PM2_PIN_FAILED`)?{severity:`warning`,title:`Updated${r?` to ${r}`:``}, but pm2 stayed on the previous version.`,detail:"The app is online on the old pm2. On the server, run `npx selva migrate` in the deployment directory to move it to the pinned version.",from:n,to:r}:$(t,`npm cache may be stale`)||$(t,`No version change`)?{severity:`warning`,title:`No version change — npm installed the same version.`,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`.",from:n,to:r}:e===0?$(t,`Already on the`)||$(t,`Nothing to do`)?{severity:`info`,title:`Already up to date${n?` (${n})`:``} — nothing to install.`,detail:`No changes were made and the app was not restarted.`,from:n,to:r}:n&&r&&n!==r?{severity:`success`,title:`Updated ${n} → ${r}. The app is back online.`,from:n,to:r}:r?{severity:`success`,title:`Update complete — now on ${r}. The app is back online.`,from:n,to:r}:{severity:`success`,title:`Update completed and the app is back online.`,from:n,to:r}:{severity:`critical`,title:`Update failed (exit code ${e}).`,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.",from:n,to:r}}var Tt=_(`<span title="Currently installed @selvajs/selva version"> </span>`),Et=_(`Update @selvajs/* to the latest <span class="font-medium"> </span> release and restart`,1),Dt=_(`<div class="flex items-start justify-between gap-3"><!> <!></div> <!>`,1),Ot=_(`<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"><!> <span> <span class="font-mono"> </span> → <span class="font-mono"> </span></span></div>`),kt=_(`<p class="text-muted-foreground text-sm"> <span class="font-mono"> </span>).</p>`),At=_(`<button type="button" class="text-muted-foreground hover:text-foreground text-xs underline underline-offset-2">Override anyway (advanced)</button>`),jt=_(`<div class="space-y-2"><label class="text-muted-foreground block text-xs" for="node-override">Type <span class="text-foreground font-mono"> </span> to confirm you accept
|
|
2
2
|
a deployment that may fail under real traffic:</label> <input id="node-override" class="border-input bg-background w-full rounded-md border px-2 py-1 font-mono text-xs" autocomplete="off" spellcheck="false"/></div>`),Mt=_(`<div class="border-destructive/40 bg-destructive/10 space-y-3 rounded-md border px-3 py-3 text-sm" role="alert"><div class="text-destructive flex items-start gap-2"><!> <div class="space-y-1"><p class="font-medium">Update blocked — this release needs a newer Node</p> <p class="text-muted-foreground text-xs"><span class="font-mono"> </span> requires Node <span class="font-mono"> </span>, but this host runs <span class="font-mono"> </span>. npm installs it anyway
|
|
3
3
|
and the health check still passes, so a failed update would <span class="font-medium">not</span> roll back automatically. Upgrade Node on the server
|
|
4
4
|
first.</p></div></div> <!></div>`),Nt=_(`<div class="border-border bg-muted text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm"><!> <span>PM2 is restarting the app — waiting for the new process to come online…</span></div>`),Pt=_(`<p class="text-muted-foreground font-mono text-xs"> </p>`),Ft=_(`<p class="text-muted-foreground text-xs whitespace-pre-line"> </p>`),It=_(`<div><!> <div class="min-w-0 space-y-1"><p> </p> <!> <!></div></div>`),Lt=_(`<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"> </pre></div>`),Rt=_(`<!> <!> <!> <!> <!> <!>`,1),zt=_(`<!> <!>`,1),Bt=_(`<!> <!> <!>`,1);function Vt(t,r){O(r,!0);let c=B(r,`latestVersion`,3,null),u=B(r,`updateAvailable`,3,!1),p=B(r,`channel`,3,`stable`),m=B(r,`isRunning`,3,!1),_=B(r,`isRestarting`,3,!1),S=B(r,`logs`,3,``),w=B(r,`exitCode`,3,null),T=B(r,`nodeCompatibility`,19,()=>({compatible:null,required:null,running:``})),E=h(()=>T().compatible===!1),D=W(``),k=W(!1),A=h(()=>f(k)&&!!c()&&f(D).trim()===c()),N=h(()=>m()||f(E)&&!f(A)),L=h(()=>p()===`beta`?`beta`:`stable`),R=W(void 0),V=W(!1),U=h(()=>w()===null?null:wt(w(),S())),te={success:{text:`text-success`,border:`border-success/40`,bg:`bg-success/10`,icon:de},info:{text:`text-foreground`,border:`border-border`,bg:`bg-muted`,icon:fe},warning:{text:`text-warning`,border:`border-warning/40`,bg:`bg-warning/10`,icon:pe},critical:{text:`text-destructive`,border:`border-destructive/40`,bg:`bg-destructive/10`,icon:tt},pending:{text:`text-muted-foreground`,border:`border-border`,bg:`bg-muted`,icon:_e}};z(()=>{S()&&f(R)&&(f(R).scrollTop=f(R).scrollHeight)});function G(){return _()?`Restarting & verifying…`:m()?`Running…`:`Run Update`}function K(){y(V,!0)}function q(){y(V,!1),r.onRun?.()}var J=zt(),Y=C(J);g(Y,()=>Le,(t,i)=>{i(t,{children:(t,i)=>{var l=zt(),p=C(l);g(p,()=>Be,(t,i)=>{i(t,{children:(t,i)=>{var a=Dt(),c=C(a),l=x(c);g(l,()=>Ve,(e,t)=>{t(e,{children:(e,t)=>{d();var n=o(`Application Update`);v(e,n)},$$slots:{default:!0}})});var p=M(l,2),m=e=>{var t=Tt(),n=I(t);P(()=>{H(t,1,`rounded-full border px-2 py-0.5 font-mono text-xs ${u()?`border-warning/40 bg-warning/10 text-warning`:`border-border bg-muted text-muted-foreground`}`),s(n,`v${r.currentVersion??``}`)}),v(e,t)};e(p,e=>{r.currentVersion&&e(m)}),n(c);var h=M(c,2);g(h,()=>ze,(e,t)=>{t(e,{children:(e,t)=>{d();var n=Et(),r=M(C(n)),i=I(r,!0);d(),P(()=>s(i,f(L))),v(e,n)},$$slots:{default:!0}})}),v(t,a)},$$slots:{default:!0}})});var m=M(p,2);g(m,()=>Re,(t,i)=>{i(t,{class:`space-y-4`,children:(t,i)=>{var l=Rt(),p=C(l),m=e=>{var t=Ot(),i=x(t);Qe(i,{class:`h-4 w-4 shrink-0`});var a=M(i,2),o=x(a),l=M(o),u=I(l),d=M(l,2),p=I(d);n(a),n(t),P(()=>{s(o,`${f(L)??``} release available — `),s(u,`v${r.currentVersion??``}`),s(p,`v${c()??``}`)}),v(e,t)},O=e=>{var t=kt(),i=x(t),a=M(i),o=I(a);d(),n(t),P(()=>{s(i,`You're on the latest ${f(L)??``} release (`),s(o,`v${r.currentVersion??``}`)}),v(e,t)};e(p,e=>{u()&&c()?e(m):r.currentVersion&&c()&&e(O,1)});var A=M(p,2),z=t=>{var r=Mt(),i=x(r),o=x(i);pe(o,{class:`mt-0.5 h-4 w-4 shrink-0`});var l=M(o,2),u=M(x(l),2),p=x(u),m=I(p),h=M(p,2),g=I(h,!0),_=M(h,2),b=I(_);d(3),n(u),n(l),n(i);var S=M(i,2),C=e=>{var t=At();a(`click`,t,()=>y(k,!0)),v(e,t)},w=e=>{var t=jt(),r=x(t),i=M(x(r)),a=I(i,!0);d(),n(r);var o=M(r,2);F(o),n(t),P(()=>{s(a,c()),j(o,`placeholder`,c()??``)}),ee(o,()=>f(D),e=>y(D,e)),v(e,t)};e(S,e=>{f(k)?e(w,-1):e(C)}),n(r),P(()=>{s(m,`v${c()??``}`),s(g,T().required),s(b,`v${T().running??``}`)}),v(t,r)};e(A,e=>{f(E)&&e(z)});var B=M(A,2);ce(B,{onclick:K,get disabled(){return f(N)},variant:`destructive`,children:(e,t)=>{d();var n=o();P(e=>s(n,e),[()=>G()]),v(e,n)},$$slots:{default:!0}});var V=M(B,2),W=e=>{var t=Nt(),r=x(t);_e(r,{class:`h-4 w-4 animate-spin`}),d(2),n(t),v(e,t)};e(V,e=>{_()&&w()===null&&e(W)});var q=M(V,2),J=t=>{let r=h(()=>te[f(U).severity]),i=h(()=>f(r).icon);var a=It(),o=x(a);g(o,()=>f(i),(e,t)=>{t(e,{get class(){return`mt-0.5 h-5 w-5 shrink-0 ${f(r).text??``}`}})});var c=M(o,2),l=x(c),u=I(l,!0),d=M(l,2),p=e=>{var t=Pt(),n=I(t);P(()=>s(n,`${f(U).from??``} → ${f(U).to??``}`)),v(e,t)};e(d,e=>{f(U).from&&f(U).to&&f(U).from!==f(U).to&&e(p)});var m=M(d,2),_=e=>{var t=Ft(),n=I(t,!0);P(()=>s(n,f(U).detail)),v(e,t)};e(m,e=>{f(U).detail&&e(_)}),n(c),n(a),P(()=>{H(a,1,`flex items-start gap-3 rounded-md border px-3 py-3 ${f(r).border??``} ${f(r).bg??``}`),j(a,`role`,f(U).severity===`critical`?`alert`:`status`),j(a,`aria-live`,f(U).severity===`critical`?`assertive`:`polite`),H(l,1,`text-sm font-medium ${f(r).text??``}`),s(u,f(U).title)}),v(t,a)};e(q,e=>{f(U)&&e(J)});var Y=M(q,2),ne=e=>{var t=Lt(),r=M(x(t),2),i=I(r,!0);b(r,e=>y(R,e),()=>f(R)),n(t),P(()=>s(i,S())),v(e,t)};e(Y,e=>{S()&&e(ne)}),v(t,l)},$$slots:{default:!0}})}),v(t,l)},$$slots:{default:!0}})});var ne=M(Y,2);g(ne,()=>Oe,(t,n)=>{n(t,{get open(){return f(V)},onOpenChange:e=>y(V,e,!0),children:(t,n)=>{var r=i(),a=C(r);g(a,()=>Ee,(t,n)=>{n(t,{children:(t,n)=>{var r=zt(),a=C(r);g(a,()=>Ce,(t,n)=>{n(t,{children:(t,n)=>{var r=Bt(),a=C(r);g(a,()=>Se,(e,t)=>{t(e,{children:(e,t)=>{d();var n=o();P(()=>s(n,f(E)?`Run Update despite the Node mismatch?`:`Run Update?`)),v(e,n)},$$slots:{default:!0}})});var c=M(a,2),l=e=>{var t=i(),n=C(t);g(n,()=>we,(e,t)=>{t(e,{class:`text-destructive`,children:(e,t)=>{d();var n=o();P(()=>s(n,`This release requires Node ${T().required??``} and the host runs v${T().running??``}.
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1793890484356"}
|
|
Binary file
|
|
Binary file
|
|
@@ -213,7 +213,7 @@ function server_data_serializer(event, state) {
|
|
|
213
213
|
let promise_id = 1;
|
|
214
214
|
let max_nodes = -1;
|
|
215
215
|
const iterator = create_async_iterator();
|
|
216
|
-
const global = "
|
|
216
|
+
const global = "__sveltekit_oq9gcw";
|
|
217
217
|
/** @param {number} index */
|
|
218
218
|
function get_replacer(index) {
|
|
219
219
|
/** @param {any} thing */
|
|
@@ -1443,7 +1443,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
|
|
|
1443
1443
|
"crossorigin"
|
|
1444
1444
|
]);
|
|
1445
1445
|
}
|
|
1446
|
-
const global = "
|
|
1446
|
+
const global = "__sveltekit_oq9gcw";
|
|
1447
1447
|
const { data, chunks } = data_serializer.get_data(csp);
|
|
1448
1448
|
if (page_config.ssr && page_config.csr) body += `\n\t\t\t${fetched.map((item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!(state.prerendering || state.prerender_default === true))).join("\n ")}`;
|
|
1449
1449
|
if (page_config.csr && client) {
|
|
@@ -1467,7 +1467,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
|
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
1469
|
const blocks = [];
|
|
1470
|
-
const properties = [`base: ${base_expression}`, `version: ${s("
|
|
1470
|
+
const properties = [`base: ${base_expression}`, `version: ${s("1793890484356")}`];
|
|
1471
1471
|
if (assets) properties.push(`assets: ${s(assets)}`);
|
|
1472
1472
|
if (client.uses_env_dynamic_public) properties.push(`env: ${load_env_eagerly ? "null" : uneval$1(rendered_env)}`);
|
|
1473
1473
|
if (chunks) {
|
|
@@ -2363,7 +2363,7 @@ function redirect_response(status, location) {
|
|
|
2363
2363
|
* @param {Response} response
|
|
2364
2364
|
*/
|
|
2365
2365
|
function with_version_header(response) {
|
|
2366
|
-
response.headers.set("x-sveltekit-version", "
|
|
2366
|
+
response.headers.set("x-sveltekit-version", "1793890484356");
|
|
2367
2367
|
return response;
|
|
2368
2368
|
}
|
|
2369
2369
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../../../package.json"],"sourcesContent":["{\n\t\"name\": \"@selvajs/selva\",\n\t\"version\": \"4.20.0-beta.
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../../../package.json"],"sourcesContent":["{\n\t\"name\": \"@selvajs/selva\",\n\t\"version\": \"4.20.0-beta.30\",\n\t\"description\": \"Selva — self-contained Grasshopper-driven web app. Install, configure via .env, deploy.\",\n\t\"license\": \"MIT\",\n\t\"author\": \"VektorNode\",\n\t\"homepage\": \"https://selva.dev\",\n\t\"bugs\": \"https://github.com/VektorNode/selva/issues\",\n\t\"keywords\": [\n\t\t\"grasshopper\",\n\t\t\"rhino\",\n\t\t\"rhino-compute\",\n\t\t\"parametric-design\",\n\t\t\"web-app\",\n\t\t\"sveltekit\"\n\t],\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/VektorNode/selva.git\",\n\t\t\"directory\": \"packages/selva\"\n\t},\n\t\"type\": \"module\",\n\t\"main\": \"./build/index.js\",\n\t\"files\": [\n\t\t\"build\",\n\t\t\"templates\"\n\t],\n\t\"engines\": {\n\t\t\"node\": \">=24.0.0\"\n\t},\n\t\"scripts\": {\n\t\t\"dev\": \"vite dev\",\n\t\t\"dev:lan\": \"vite dev --host\",\n\t\t\"build\": \"rimraf build && vite build && node ./scripts/generate-templates.js && node ./scripts/write-runtime-meta.js\",\n\t\t\"preview\": \"vite preview\",\n\t\t\"start\": \"node build/index.js\",\n\t\t\"clean\": \"rimraf build templates\",\n\t\t\"prepare\": \"svelte-kit sync || echo ''\",\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n\t\t\"test\": \"vitest run\",\n\t\t\"test:watch\": \"vitest\",\n\t\t\"openapi:generate\": \"node scripts/generate-openapi.js\",\n\t\t\"test:e2e\": \"playwright test\",\n\t\t\"lint\": \"eslint .\",\n\t\t\"lint:types\": \"eslint . --config eslint.typed.config.js\",\n\t\t\"generate:cli-config\": \"node scripts/generate-cli-config.js\"\n\t},\n\t\"dependencies\": {\n\t\t\"@lucide/svelte\": \"catalog:\",\n\t\t\"@supabase/supabase-js\": \"catalog:\",\n\t\t\"@sveltejs/kit\": \"catalog:\",\n\t\t\"bits-ui\": \"catalog:\",\n\t\t\"clsx\": \"catalog:\",\n\t\t\"mode-watcher\": \"catalog:\",\n\t\t\"nodemailer\": \"catalog:\",\n\t\t\"pino\": \"^10.4.0\",\n\t\t\"rhino3dm\": \"catalog:\",\n\t\t\"sharp\": \"catalog:\",\n\t\t\"tailwind-merge\": \"catalog:\",\n\t\t\"tailwind-variants\": \"catalog:\",\n\t\t\"three\": \"catalog:\",\n\t\t\"zod\": \"catalog:\"\n\t},\n\t\"optionalDependencies\": {\n\t\t\"@sentry/node\": \"^11.10.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@playwright/test\": \"catalog:\",\n\t\t\"@selvajs/compute\": \"workspace:*\",\n\t\t\"@selvajs/config\": \"workspace:*\",\n\t\t\"@selvajs/header-auth-provider\": \"workspace:*\",\n\t\t\"@selvajs/local-provider\": \"workspace:*\",\n\t\t\"@selvajs/mcp\": \"workspace:*\",\n\t\t\"@selvajs/notifications\": \"workspace:*\",\n\t\t\"@selvajs/platform\": \"workspace:*\",\n\t\t\"@selvajs/schemas\": \"workspace:*\",\n\t\t\"@selvajs/server\": \"workspace:*\",\n\t\t\"@selvajs/solve\": \"workspace:*\",\n\t\t\"@selvajs/supabase-provider\": \"workspace:*\",\n\t\t\"@selvajs/ui\": \"workspace:*\",\n\t\t\"@selvajs/visualization\": \"workspace:*\",\n\t\t\"@sveltejs/adapter-node\": \"catalog:\",\n\t\t\"@types/nodemailer\": \"catalog:\",\n\t\t\"@types/three\": \"catalog:\",\n\t\t\"rimraf\": \"catalog:\",\n\t\t\"tw-animate-css\": \"catalog:\",\n\t\t\"vitest\": \"catalog:\"\n\t},\n\t\"imports\": {\n\t\t\"#lib/*\": \"./src/lib/*\"\n\t}\n}\n"],"mappings":""}
|
|
@@ -110,6 +110,20 @@ function deriveOutcome(exitCode, logs) {
|
|
|
110
110
|
to
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
if (has(logs, "PM2_RESYNC_NEEDED")) return {
|
|
114
|
+
severity: "warning",
|
|
115
|
+
title: `Updated${to ? ` to ${to}` : ""}, but the pm2 daemon still runs the old pm2.`,
|
|
116
|
+
detail: "The app is online. On the server, run `npx pm2 update` in the deployment directory, let it finish, then check `npx pm2 list` shows selva-compute online.",
|
|
117
|
+
from,
|
|
118
|
+
to
|
|
119
|
+
};
|
|
120
|
+
if (has(logs, "PM2_PIN_FAILED")) return {
|
|
121
|
+
severity: "warning",
|
|
122
|
+
title: `Updated${to ? ` to ${to}` : ""}, but pm2 stayed on the previous version.`,
|
|
123
|
+
detail: "The app is online on the old pm2. On the server, run `npx selva migrate` in the deployment directory to move it to the pinned version.",
|
|
124
|
+
from,
|
|
125
|
+
to
|
|
126
|
+
};
|
|
113
127
|
if (has(logs, "npm cache may be stale") || has(logs, "No version change")) return {
|
|
114
128
|
severity: "warning",
|
|
115
129
|
title: "No version change — npm installed the same version.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-outcome.js","names":[],"sources":["../../../src/lib/update-outcome.ts"],"sourcesContent":["// ============================================================================\n// Update-outcome derivation\n// ============================================================================\n//\n// The update runner (admin/api/system/update/+server.ts) emits structured log\n// lines and a small set of meaningful exit codes; `deriveOutcome` turns those\n// into a severity an operator can act on without reading the log. Ranking:\n// anything that leaves the app DOWN is `critical`; a safe rollback is\n// `warning`, not an error, because the site is still serving.\n\nexport type OutcomeSeverity = 'success' | 'info' | 'warning' | 'critical' | 'pending';\n\n/**\n * Synthetic exit code for a run that never reported one — the SSE handler's\n * 15-minute group-kill, or the reconciler giving up on a missing [EXIT] marker.\n * Outside the 0-255 range a real process can produce, so it can't collide.\n */\nexport const TIMED_OUT = -2;\n\nexport interface UpdateOutcome {\n\tseverity: OutcomeSeverity;\n\t/** Must be unambiguous about app up/down state. */\n\ttitle: string;\n\t/** What to do next when something is off. */\n\tdetail?: string;\n\tfrom?: string;\n\tto?: string;\n}\n\nfunction firstMatch(logs: string, re: RegExp): string | undefined {\n\tconst m = re.exec(logs);\n\treturn m ? m[1] : undefined;\n}\n\nfunction parseVersions(logs: string): { from?: string; to?: string } {\n\t// Pre-flight transition line, printed before npm runs — the only source of a\n\t// target version when the update fails early or is a no-op, e.g.\n\t// \"[INFO] Target (beta): 4.2.0 → 4.2.1-beta.1\". `Available:` is the\n\t// pre-channel spelling, kept so logs from an older runner still parse.\n\tconst version = String.raw`\\d+\\.\\d+\\.\\d+[^\\s]*`;\n\tconst transition = new RegExp(\n\t\tString.raw`(?:Target \\([^)]*\\)|Available):\\s*(${version})\\s*(?:→|->)\\s*(${version})`\n\t);\n\tconst arrow = transition.exec(logs);\n\n\t// The post-install lines are authoritative for what actually landed — prefer\n\t// them over the pre-flight target, which is only ever an intent.\n\tconst from = firstMatch(logs, /Current @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/) ?? arrow?.[1];\n\tconst to = firstMatch(logs, /New @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/) ?? arrow?.[2];\n\treturn { from, to };\n}\n\nfunction has(logs: string, needle: string): boolean {\n\treturn logs.includes(needle);\n}\n\nexport function deriveOutcome(exitCode: number | null, logs: string): UpdateOutcome {\n\tconst { from, to } = parseVersions(logs);\n\n\tif (exitCode === null) {\n\t\treturn { severity: 'pending', title: 'Update in progress…' };\n\t}\n\n\t// --- Critical: app is or may be DOWN. Rank these first. -------------------\n\tif (\n\t\texitCode === 6 ||\n\t\thas(logs, 'Manual recovery required') ||\n\t\thas(logs, 'manual intervention required')\n\t) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed AND rollback failed — the app may be OFFLINE',\n\t\t\tdetail:\n\t\t\t\t'Both the new version and the rollback failed their health check. ' +\n\t\t\t\t'SSH into the server and run: `pm2 logs selva-compute`, then ' +\n\t\t\t\t'`pm2 start ecosystem.config.cjs` from the deployment directory.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// The SSE handler's 15-minute group-kill, and the reconciler's own poll cap.\n\t// Neither is an exit code the runner chose, so they carry no [EXIT] marker.\n\tif (exitCode === TIMED_OUT) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'App did not come back online within 15 minutes',\n\t\t\tdetail:\n\t\t\t\t'The update may still be finishing in the background, or the new ' +\n\t\t\t\t'process is crash-looping. Check `pm2 logs selva-compute`. Do not ' +\n\t\t\t\t're-run the update until you have confirmed the current state.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Exit 4: the rollback's own npm install failed, so node_modules is\n\t// half-written and the EXIT trap's restart is the only thing that may have\n\t// brought the app back. Same urgency as a failed rollback restart.\n\tif (exitCode === 4) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed and the rollback could not reinstall — the app may be OFFLINE',\n\t\t\tdetail:\n\t\t\t\t'The previous version could not be restored from npm. SSH into the ' +\n\t\t\t\t'server and run `pm2 logs selva-compute`; if the app is down, reinstall ' +\n\t\t\t\t'explicitly with `npm install --prefer-online @selvajs/cli@<version> ' +\n\t\t\t\t'@selvajs/selva@<version>` from the deployment directory.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Exit 3: unhealthy with no recorded prior version, so no rollback was even\n\t// attempted. The EXIT trap tried to restart whatever is on disk.\n\tif (exitCode === 3) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed its health check and could not be rolled back automatically',\n\t\t\tdetail:\n\t\t\t\t'No prior version was recorded, so the previous build could not be ' +\n\t\t\t\t'restored. Check `pm2 logs selva-compute` to confirm whether the app ' +\n\t\t\t\t'came back online.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// Killed mid-run (128+signal). Nothing was installed, and whether the app\n\t// came back depends on how far the EXIT trap got before it died too. Rank\n\t// with the criticals: an unattended half-update is worse than a clean\n\t// failure.\n\tif (exitCode === 143 || exitCode === 130 || exitCode === 129 || has(logs, 'KILLED')) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update was killed before it finished — nothing was installed',\n\t\t\tdetail:\n\t\t\t\t'The runner was terminated mid-update, most often by a systemd-supervised ' +\n\t\t\t\t'PM2 restarting its whole control group. The version on disk is unchanged. ' +\n\t\t\t\t'Check `pm2 logs selva-compute` and confirm the app is online before retrying; ' +\n\t\t\t\t'if a global pm2 owns the daemon, reconcile that first.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Warning: update did not fully succeed, but the app IS up. ------------\n\t// Aborted at the systemd guard, before `pm2 update` could recycle the\n\t// daemon and take this runner down with it.\n\tif (exitCode === 9 || has(logs, 'SYSTEMD_PM2')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle:\n\t\t\t\t'Update cancelled — PM2 needs a resync that only a shell can do safely. The app is untouched.',\n\t\t\tdetail:\n\t\t\t\t\"This deployment's PM2 runs under systemd, where `pm2 update` restarts the \" +\n\t\t\t\t'unit and kills the update mid-run. Nothing was installed and the app is ' +\n\t\t\t\t'still serving. SSH in and run `./node_modules/.bin/pm2 update` from the ' +\n\t\t\t\t'deployment directory, then retry the update here.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Aborted at the pm2 skew check, before anything was stopped — nothing was\n\t// installed and the app never went down.\n\tif (exitCode === 8 || has(logs, 'PM2_SKEW')) {\n\t\tconst daemon = firstMatch(logs, /daemon \\(v(\\d+\\.\\d+\\.\\d+)\\)/);\n\t\tconst local = firstMatch(logs, /deployment's pm2 \\(v(\\d+\\.\\d+\\.\\d+)\\)/);\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle:\n\t\t\t\tdaemon && local\n\t\t\t\t\t? `Update cancelled — a global PM2 (v${daemon}) owns the daemon, not this deployment's (v${local}). The app is untouched.`\n\t\t\t\t\t: 'Update cancelled — a conflicting global PM2 owns the daemon. The app is untouched.',\n\t\t\tdetail:\n\t\t\t\t'Resyncing would have downgraded the daemon and dropped its process ' +\n\t\t\t\t'table, so the update stopped before taking the app down. On the server: ' +\n\t\t\t\t'`which -a pm2`, `pm2 -v`, `pm2 ping` — remove or align the global pm2, then retry.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// A rollback whose cause is the DATABASE, not the release. Ranked ahead of\n\t// the generic rollback case: \"review the log before retrying\" is actively\n\t// misleading here, because the log holds nothing about the new version —\n\t// it is fine, and retrying without touching the database repeats verbatim.\n\tif (has(logs, 'SCHEMA_SKEW')) {\n\t\tconst expected = firstMatch(logs, /expects database migration head (\\S+?),/);\n\t\tconst actual = firstMatch(logs, /this database is at (\\S+?)\\./);\n\t\tconst skew =\n\t\t\texpected && actual ? ` The database is at ${actual}; ${to ?? 'it'} needs ${expected}.` : '';\n\t\t// `latest` is the stable line, which ships none of a beta's migrations.\n\t\tconst providerTag =\n\t\t\tfirstMatch(logs, /@selvajs\\/supabase-provider@([\\w.-]+)/) ??\n\t\t\t(has(logs, 'channel: beta') ? 'beta' : 'latest');\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update rolled back — the database migrations for ${to ?? 'the new version'} have not been applied.${skew} The app is online${from ? ` on ${from}` : ''}.`,\n\t\t\tdetail:\n\t\t\t\t'Nothing is wrong with the new version. Selva does not apply migrations ' +\n\t\t\t\t'during an update, because they cannot be rolled back — auto-migrating ' +\n\t\t\t\t'and then rolling the code back would leave the app and database on ' +\n\t\t\t\t'different heads. Apply them on the server, then re-run this update: ' +\n\t\t\t\t`\\`npm install --prefer-online @selvajs/supabase-provider@${providerTag}\\`, then ` +\n\t\t\t\t'`npx selva-supabase`, then `npx supabase db push`. The provider install ' +\n\t\t\t\t'is not optional — the migration SQL ships inside that package, and the ' +\n\t\t\t\t'update only moves @selvajs/cli and @selvajs/selva, so a sync without it ' +\n\t\t\t\t'copies nothing and the push reports \"up to date\" having done nothing. ' +\n\t\t\t\t'Retrying without this will fail in exactly the same way.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Same shape: the rollback was caused by host configuration, not the release.\n\tif (has(logs, 'AT_REST_SECRETS')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update rolled back — stored compute server keys do not decrypt under this host's SELVA_AT_REST_KEY. The app is online${from ? ` on ${from}` : ''}.`,\n\t\t\tdetail:\n\t\t\t\t'This is a configuration problem on the server, not a fault in the new ' +\n\t\t\t\t'version, so retrying alone will fail identically. Re-enter the affected ' +\n\t\t\t\t'keys at /admin/compute, or restore the SELVA_AT_REST_KEY the values were ' +\n\t\t\t\t'encrypted with, then re-run the update.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\tif (exitCode === 5 || has(logs, 'Rolled back')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update failed — safely rolled back${from ? ` to ${from}` : ''}. The app is online.`,\n\t\t\tdetail:\n\t\t\t\t'The new version failed its health check, so the previous version ' +\n\t\t\t\t'was restored and is serving normally. Review the log below for why ' +\n\t\t\t\t'the new version failed before retrying.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// The install completed and the app is up, but on a Node the release doesn't\n\t// support. The health probe passes (it exercises nothing version-specific),\n\t// so this would otherwise read as a clean success right up until a real\n\t// request hits a newer API and throws (issue #176).\n\tif (has(logs, 'ENGINE_MISMATCH') || has(logs, 'EBADENGINE')) {\n\t\tconst required = firstMatch(logs, /requires Node ([^\\s]+(?:\\s*[<>=]+\\s*[\\d.]+)*)/);\n\t\tconst running = firstMatch(logs, /this host runs v?(\\d+\\.\\d+\\.\\d+)/);\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: running\n\t\t\t\t? `Updated${to ? ` to ${to}` : ''}, but this release needs Node ${required ?? '(newer)'} — the host runs v${running}. Expect runtime failures.`\n\t\t\t\t: `Updated${to ? ` to ${to}` : ''}, but this release requires a newer Node than the host provides. Expect runtime failures.`,\n\t\t\tdetail:\n\t\t\t\t'npm installed it anyway (engine-strict is off) and the health check ' +\n\t\t\t\t'passed, but it does not exercise the newer APIs — routes that do will ' +\n\t\t\t\t'throw at request time. Upgrade Node on the server, then re-run the update.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\tif (has(logs, 'npm cache may be stale') || has(logs, 'No version change')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: 'No version change — npm installed the same version.',\n\t\t\tdetail:\n\t\t\t\t'Your npm cache may be stale. On the server: `npm cache clean --force`, ' +\n\t\t\t\t'remove node_modules + package-lock.json, then `npm install --prefer-online`.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Success variants -----------------------------------------------------\n\tif (exitCode === 0) {\n\t\t// \"Already on the 'beta' channel version (4.2.0)\" — the channel name is\n\t\t// interpolated, so match the stable prefix rather than a whole line.\n\t\tif (has(logs, 'Already on the') || has(logs, 'Nothing to do')) {\n\t\t\treturn {\n\t\t\t\tseverity: 'info',\n\t\t\t\ttitle: `Already up to date${from ? ` (${from})` : ''} — nothing to install.`,\n\t\t\t\tdetail: 'No changes were made and the app was not restarted.',\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\tif (from && to && from !== to) {\n\t\t\treturn {\n\t\t\t\tseverity: 'success',\n\t\t\t\ttitle: `Updated ${from} → ${to}. The app is back online.`,\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\tif (to) {\n\t\t\treturn {\n\t\t\t\tseverity: 'success',\n\t\t\t\ttitle: `Update complete — now on ${to}. The app is back online.`,\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tseverity: 'success',\n\t\t\ttitle: 'Update completed and the app is back online.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Anything else: a non-zero exit we don't have a named case for. -------\n\t// Be explicit that we couldn't classify it rather than implying success.\n\treturn {\n\t\tseverity: 'critical',\n\t\ttitle: `Update failed (exit code ${exitCode}).`,\n\t\tdetail:\n\t\t\t'The update did not complete cleanly. Review the log below, and check ' +\n\t\t\t'`pm2 logs selva-compute` to confirm whether the app is currently online.',\n\t\tfrom,\n\t\tto\n\t};\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"update-outcome.js","names":[],"sources":["../../../src/lib/update-outcome.ts"],"sourcesContent":["// ============================================================================\n// Update-outcome derivation\n// ============================================================================\n//\n// The update runner (admin/api/system/update/+server.ts) emits structured log\n// lines and a small set of meaningful exit codes; `deriveOutcome` turns those\n// into a severity an operator can act on without reading the log. Ranking:\n// anything that leaves the app DOWN is `critical`; a safe rollback is\n// `warning`, not an error, because the site is still serving.\n\nexport type OutcomeSeverity = 'success' | 'info' | 'warning' | 'critical' | 'pending';\n\n/**\n * Synthetic exit code for a run that never reported one — the SSE handler's\n * 15-minute group-kill, or the reconciler giving up on a missing [EXIT] marker.\n * Outside the 0-255 range a real process can produce, so it can't collide.\n */\nexport const TIMED_OUT = -2;\n\nexport interface UpdateOutcome {\n\tseverity: OutcomeSeverity;\n\t/** Must be unambiguous about app up/down state. */\n\ttitle: string;\n\t/** What to do next when something is off. */\n\tdetail?: string;\n\tfrom?: string;\n\tto?: string;\n}\n\nfunction firstMatch(logs: string, re: RegExp): string | undefined {\n\tconst m = re.exec(logs);\n\treturn m ? m[1] : undefined;\n}\n\nfunction parseVersions(logs: string): { from?: string; to?: string } {\n\t// Pre-flight transition line, printed before npm runs — the only source of a\n\t// target version when the update fails early or is a no-op, e.g.\n\t// \"[INFO] Target (beta): 4.2.0 → 4.2.1-beta.1\". `Available:` is the\n\t// pre-channel spelling, kept so logs from an older runner still parse.\n\tconst version = String.raw`\\d+\\.\\d+\\.\\d+[^\\s]*`;\n\tconst transition = new RegExp(\n\t\tString.raw`(?:Target \\([^)]*\\)|Available):\\s*(${version})\\s*(?:→|->)\\s*(${version})`\n\t);\n\tconst arrow = transition.exec(logs);\n\n\t// The post-install lines are authoritative for what actually landed — prefer\n\t// them over the pre-flight target, which is only ever an intent.\n\tconst from = firstMatch(logs, /Current @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/) ?? arrow?.[1];\n\tconst to = firstMatch(logs, /New @selvajs\\/selva:\\s*v?(\\d+\\.\\d+\\.\\d+[^\\s]*)/) ?? arrow?.[2];\n\treturn { from, to };\n}\n\nfunction has(logs: string, needle: string): boolean {\n\treturn logs.includes(needle);\n}\n\nexport function deriveOutcome(exitCode: number | null, logs: string): UpdateOutcome {\n\tconst { from, to } = parseVersions(logs);\n\n\tif (exitCode === null) {\n\t\treturn { severity: 'pending', title: 'Update in progress…' };\n\t}\n\n\t// --- Critical: app is or may be DOWN. Rank these first. -------------------\n\tif (\n\t\texitCode === 6 ||\n\t\thas(logs, 'Manual recovery required') ||\n\t\thas(logs, 'manual intervention required')\n\t) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed AND rollback failed — the app may be OFFLINE',\n\t\t\tdetail:\n\t\t\t\t'Both the new version and the rollback failed their health check. ' +\n\t\t\t\t'SSH into the server and run: `pm2 logs selva-compute`, then ' +\n\t\t\t\t'`pm2 start ecosystem.config.cjs` from the deployment directory.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// The SSE handler's 15-minute group-kill, and the reconciler's own poll cap.\n\t// Neither is an exit code the runner chose, so they carry no [EXIT] marker.\n\tif (exitCode === TIMED_OUT) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'App did not come back online within 15 minutes',\n\t\t\tdetail:\n\t\t\t\t'The update may still be finishing in the background, or the new ' +\n\t\t\t\t'process is crash-looping. Check `pm2 logs selva-compute`. Do not ' +\n\t\t\t\t're-run the update until you have confirmed the current state.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Exit 4: the rollback's own npm install failed, so node_modules is\n\t// half-written and the EXIT trap's restart is the only thing that may have\n\t// brought the app back. Same urgency as a failed rollback restart.\n\tif (exitCode === 4) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed and the rollback could not reinstall — the app may be OFFLINE',\n\t\t\tdetail:\n\t\t\t\t'The previous version could not be restored from npm. SSH into the ' +\n\t\t\t\t'server and run `pm2 logs selva-compute`; if the app is down, reinstall ' +\n\t\t\t\t'explicitly with `npm install --prefer-online @selvajs/cli@<version> ' +\n\t\t\t\t'@selvajs/selva@<version>` from the deployment directory.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Exit 3: unhealthy with no recorded prior version, so no rollback was even\n\t// attempted. The EXIT trap tried to restart whatever is on disk.\n\tif (exitCode === 3) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update failed its health check and could not be rolled back automatically',\n\t\t\tdetail:\n\t\t\t\t'No prior version was recorded, so the previous build could not be ' +\n\t\t\t\t'restored. Check `pm2 logs selva-compute` to confirm whether the app ' +\n\t\t\t\t'came back online.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// Killed mid-run (128+signal). Nothing was installed, and whether the app\n\t// came back depends on how far the EXIT trap got before it died too. Rank\n\t// with the criticals: an unattended half-update is worse than a clean\n\t// failure.\n\tif (exitCode === 143 || exitCode === 130 || exitCode === 129 || has(logs, 'KILLED')) {\n\t\treturn {\n\t\t\tseverity: 'critical',\n\t\t\ttitle: 'Update was killed before it finished — nothing was installed',\n\t\t\tdetail:\n\t\t\t\t'The runner was terminated mid-update, most often by a systemd-supervised ' +\n\t\t\t\t'PM2 restarting its whole control group. The version on disk is unchanged. ' +\n\t\t\t\t'Check `pm2 logs selva-compute` and confirm the app is online before retrying; ' +\n\t\t\t\t'if a global pm2 owns the daemon, reconcile that first.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Warning: update did not fully succeed, but the app IS up. ------------\n\t// Aborted at the systemd guard, before `pm2 update` could recycle the\n\t// daemon and take this runner down with it.\n\tif (exitCode === 9 || has(logs, 'SYSTEMD_PM2')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle:\n\t\t\t\t'Update cancelled — PM2 needs a resync that only a shell can do safely. The app is untouched.',\n\t\t\tdetail:\n\t\t\t\t\"This deployment's PM2 runs under systemd, where `pm2 update` restarts the \" +\n\t\t\t\t'unit and kills the update mid-run. Nothing was installed and the app is ' +\n\t\t\t\t'still serving. SSH in and run `./node_modules/.bin/pm2 update` from the ' +\n\t\t\t\t'deployment directory, then retry the update here.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Aborted at the pm2 skew check, before anything was stopped — nothing was\n\t// installed and the app never went down.\n\tif (exitCode === 8 || has(logs, 'PM2_SKEW')) {\n\t\tconst daemon = firstMatch(logs, /daemon \\(v(\\d+\\.\\d+\\.\\d+)\\)/);\n\t\tconst local = firstMatch(logs, /deployment's pm2 \\(v(\\d+\\.\\d+\\.\\d+)\\)/);\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle:\n\t\t\t\tdaemon && local\n\t\t\t\t\t? `Update cancelled — a global PM2 (v${daemon}) owns the daemon, not this deployment's (v${local}). The app is untouched.`\n\t\t\t\t\t: 'Update cancelled — a conflicting global PM2 owns the daemon. The app is untouched.',\n\t\t\tdetail:\n\t\t\t\t'Resyncing would have downgraded the daemon and dropped its process ' +\n\t\t\t\t'table, so the update stopped before taking the app down. On the server: ' +\n\t\t\t\t'`which -a pm2`, `pm2 -v`, `pm2 ping` — remove or align the global pm2, then retry.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// A rollback whose cause is the DATABASE, not the release. Ranked ahead of\n\t// the generic rollback case: \"review the log before retrying\" is actively\n\t// misleading here, because the log holds nothing about the new version —\n\t// it is fine, and retrying without touching the database repeats verbatim.\n\tif (has(logs, 'SCHEMA_SKEW')) {\n\t\tconst expected = firstMatch(logs, /expects database migration head (\\S+?),/);\n\t\tconst actual = firstMatch(logs, /this database is at (\\S+?)\\./);\n\t\tconst skew =\n\t\t\texpected && actual ? ` The database is at ${actual}; ${to ?? 'it'} needs ${expected}.` : '';\n\t\t// `latest` is the stable line, which ships none of a beta's migrations.\n\t\tconst providerTag =\n\t\t\tfirstMatch(logs, /@selvajs\\/supabase-provider@([\\w.-]+)/) ??\n\t\t\t(has(logs, 'channel: beta') ? 'beta' : 'latest');\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update rolled back — the database migrations for ${to ?? 'the new version'} have not been applied.${skew} The app is online${from ? ` on ${from}` : ''}.`,\n\t\t\tdetail:\n\t\t\t\t'Nothing is wrong with the new version. Selva does not apply migrations ' +\n\t\t\t\t'during an update, because they cannot be rolled back — auto-migrating ' +\n\t\t\t\t'and then rolling the code back would leave the app and database on ' +\n\t\t\t\t'different heads. Apply them on the server, then re-run this update: ' +\n\t\t\t\t`\\`npm install --prefer-online @selvajs/supabase-provider@${providerTag}\\`, then ` +\n\t\t\t\t'`npx selva-supabase`, then `npx supabase db push`. The provider install ' +\n\t\t\t\t'is not optional — the migration SQL ships inside that package, and the ' +\n\t\t\t\t'update only moves @selvajs/cli and @selvajs/selva, so a sync without it ' +\n\t\t\t\t'copies nothing and the push reports \"up to date\" having done nothing. ' +\n\t\t\t\t'Retrying without this will fail in exactly the same way.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// Same shape: the rollback was caused by host configuration, not the release.\n\tif (has(logs, 'AT_REST_SECRETS')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update rolled back — stored compute server keys do not decrypt under this host's SELVA_AT_REST_KEY. The app is online${from ? ` on ${from}` : ''}.`,\n\t\t\tdetail:\n\t\t\t\t'This is a configuration problem on the server, not a fault in the new ' +\n\t\t\t\t'version, so retrying alone will fail identically. Re-enter the affected ' +\n\t\t\t\t'keys at /admin/compute, or restore the SELVA_AT_REST_KEY the values were ' +\n\t\t\t\t'encrypted with, then re-run the update.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\tif (exitCode === 5 || has(logs, 'Rolled back')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Update failed — safely rolled back${from ? ` to ${from}` : ''}. The app is online.`,\n\t\t\tdetail:\n\t\t\t\t'The new version failed its health check, so the previous version ' +\n\t\t\t\t'was restored and is serving normally. Review the log below for why ' +\n\t\t\t\t'the new version failed before retrying.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// The install completed and the app is up, but on a Node the release doesn't\n\t// support. The health probe passes (it exercises nothing version-specific),\n\t// so this would otherwise read as a clean success right up until a real\n\t// request hits a newer API and throws (issue #176).\n\tif (has(logs, 'ENGINE_MISMATCH') || has(logs, 'EBADENGINE')) {\n\t\tconst required = firstMatch(logs, /requires Node ([^\\s]+(?:\\s*[<>=]+\\s*[\\d.]+)*)/);\n\t\tconst running = firstMatch(logs, /this host runs v?(\\d+\\.\\d+\\.\\d+)/);\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: running\n\t\t\t\t? `Updated${to ? ` to ${to}` : ''}, but this release needs Node ${required ?? '(newer)'} — the host runs v${running}. Expect runtime failures.`\n\t\t\t\t: `Updated${to ? ` to ${to}` : ''}, but this release requires a newer Node than the host provides. Expect runtime failures.`,\n\t\t\tdetail:\n\t\t\t\t'npm installed it anyway (engine-strict is off) and the health check ' +\n\t\t\t\t'passed, but it does not exercise the newer APIs — routes that do will ' +\n\t\t\t\t'throw at request time. Upgrade Node on the server, then re-run the update.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\t// The runner moved pm2 to the release's pin but could not swap the daemon\n\t// (refused under systemd, or `pm2 update` failed). The app runs; the next\n\t// pm2 command warns about the skew until someone runs the swap by hand.\n\tif (has(logs, 'PM2_RESYNC_NEEDED')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Updated${to ? ` to ${to}` : ''}, but the pm2 daemon still runs the old pm2.`,\n\t\t\tdetail:\n\t\t\t\t'The app is online. On the server, run `npx pm2 update` in the deployment ' +\n\t\t\t\t'directory, let it finish, then check `npx pm2 list` shows selva-compute online.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\tif (has(logs, 'PM2_PIN_FAILED')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: `Updated${to ? ` to ${to}` : ''}, but pm2 stayed on the previous version.`,\n\t\t\tdetail:\n\t\t\t\t'The app is online on the old pm2. On the server, run `npx selva migrate` in ' +\n\t\t\t\t'the deployment directory to move it to the pinned version.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\tif (has(logs, 'npm cache may be stale') || has(logs, 'No version change')) {\n\t\treturn {\n\t\t\tseverity: 'warning',\n\t\t\ttitle: 'No version change — npm installed the same version.',\n\t\t\tdetail:\n\t\t\t\t'Your npm cache may be stale. On the server: `npm cache clean --force`, ' +\n\t\t\t\t'remove node_modules + package-lock.json, then `npm install --prefer-online`.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Success variants -----------------------------------------------------\n\tif (exitCode === 0) {\n\t\t// \"Already on the 'beta' channel version (4.2.0)\" — the channel name is\n\t\t// interpolated, so match the stable prefix rather than a whole line.\n\t\tif (has(logs, 'Already on the') || has(logs, 'Nothing to do')) {\n\t\t\treturn {\n\t\t\t\tseverity: 'info',\n\t\t\t\ttitle: `Already up to date${from ? ` (${from})` : ''} — nothing to install.`,\n\t\t\t\tdetail: 'No changes were made and the app was not restarted.',\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\tif (from && to && from !== to) {\n\t\t\treturn {\n\t\t\t\tseverity: 'success',\n\t\t\t\ttitle: `Updated ${from} → ${to}. The app is back online.`,\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\tif (to) {\n\t\t\treturn {\n\t\t\t\tseverity: 'success',\n\t\t\t\ttitle: `Update complete — now on ${to}. The app is back online.`,\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tseverity: 'success',\n\t\t\ttitle: 'Update completed and the app is back online.',\n\t\t\tfrom,\n\t\t\tto\n\t\t};\n\t}\n\n\t// --- Anything else: a non-zero exit we don't have a named case for. -------\n\t// Be explicit that we couldn't classify it rather than implying success.\n\treturn {\n\t\tseverity: 'critical',\n\t\ttitle: `Update failed (exit code ${exitCode}).`,\n\t\tdetail:\n\t\t\t'The update did not complete cleanly. Review the log below, and check ' +\n\t\t\t'`pm2 logs selva-compute` to confirm whether the app is currently online.',\n\t\tfrom,\n\t\tto\n\t};\n}\n"],"mappings":"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"}
|
|
@@ -79,6 +79,15 @@ TAG=${shellQuote(tag)}
|
|
|
79
79
|
PM2="$(dirname "$ECOSYSTEM")/node_modules/.bin/pm2"
|
|
80
80
|
[ -x "$PM2" ] || PM2=pm2
|
|
81
81
|
|
|
82
|
+
# Under systemd, \`pm2 update\` kills and respawns the daemon. systemd sees its
|
|
83
|
+
# unit's main process die and, with the default KillMode=control-group,
|
|
84
|
+
# SIGTERMs everything in the cgroup — including this runner. setsid escapes
|
|
85
|
+
# PM2's tree-kill but NOT the cgroup, so the runner never runs \`pm2 update\`
|
|
86
|
+
# when this is true.
|
|
87
|
+
pm2_under_systemd() {
|
|
88
|
+
grep -qs 'pm2.*\\.service' /proc/self/cgroup 2>/dev/null
|
|
89
|
+
}
|
|
90
|
+
|
|
82
91
|
# Waits for selva-compute to leave the transitional 'stopping' state.
|
|
83
92
|
#
|
|
84
93
|
# \`pm2 stop\` sends SIGINT and returns without waiting for the process to die.
|
|
@@ -254,12 +263,7 @@ if echo "$PING_OUT" | grep -q "out-of-date"; then
|
|
|
254
263
|
exit 8
|
|
255
264
|
fi
|
|
256
265
|
|
|
257
|
-
|
|
258
|
-
# unit's main process die and, with the default KillMode=control-group,
|
|
259
|
-
# SIGTERMs everything in the cgroup — including this runner. setsid escapes
|
|
260
|
-
# PM2's tree-kill but NOT the cgroup, so there is no way to survive it from
|
|
261
|
-
# here; refuse the resync instead of being killed by it.
|
|
262
|
-
if grep -qs 'pm2.*\\.service' /proc/self/cgroup 2>/dev/null; then
|
|
266
|
+
if pm2_under_systemd; then
|
|
263
267
|
echo "[FATAL] SYSTEMD_PM2: this deployment's PM2 is supervised by systemd, and the daemon"
|
|
264
268
|
echo "[FATAL] needs a resync. Running 'pm2 update' here would restart the systemd unit and"
|
|
265
269
|
echo "[FATAL] kill this runner mid-update. Resync manually from a shell, then retry:"
|
|
@@ -318,6 +322,36 @@ if [ -n "$BEFORE" ] && [ "$BEFORE" = "$AFTER" ]; then
|
|
|
318
322
|
echo "[WARN] npm install --prefer-online"
|
|
319
323
|
fi
|
|
320
324
|
|
|
325
|
+
# ---------------------------------------------------------------------------
|
|
326
|
+
# 4b. Move pm2 onto the version the new CLI pins.
|
|
327
|
+
# ---------------------------------------------------------------------------
|
|
328
|
+
# Only \`selva migrate\` rewrites package.json, so without this a release that
|
|
329
|
+
# bumps pm2 needs a manual migrate on every host. The pin is read from the CLI
|
|
330
|
+
# just installed: its devDependencies.pm2 is what a fresh scaffold gets. The
|
|
331
|
+
# app is stopped, so swapping the daemon here adds no downtime. A failure
|
|
332
|
+
# leaves the old pm2 running the app: warn, never abort. A rollback below
|
|
333
|
+
# keeps the new pm2: reinstalling the old one would leave the daemon newer
|
|
334
|
+
# than the CLI, the one skew \`pm2 update\` cannot repair.
|
|
335
|
+
PM2_DECLARED=$(node -p "require('./package.json').dependencies?.pm2 ?? ''" 2>/dev/null)
|
|
336
|
+
PM2_PIN=$(node -p "require('./node_modules/@selvajs/cli/package.json').devDependencies?.pm2 ?? ''" 2>/dev/null)
|
|
337
|
+
if [ -n "$PM2_PIN" ] && [ "$PM2_PIN" != "$PM2_DECLARED" ]; then
|
|
338
|
+
echo "[STEP] Moving pm2 \${PM2_DECLARED:-(none)} → $PM2_PIN, the version this release pins"
|
|
339
|
+
if npm install --save --save-exact --prefer-online "pm2@$PM2_PIN"; then
|
|
340
|
+
if pm2_under_systemd; then
|
|
341
|
+
echo "[WARN] PM2_RESYNC_NEEDED: pm2 is now $PM2_PIN, but its daemon still runs the old version."
|
|
342
|
+
echo "[WARN] Swapping it here would restart the systemd unit and kill this runner. From a shell:"
|
|
343
|
+
echo "[WARN] cd $(dirname "$ECOSYSTEM") && npx pm2 update && npx pm2 list"
|
|
344
|
+
echo "[WARN] Let it finish: interrupting it leaves selva-compute unregistered."
|
|
345
|
+
elif ! "$PM2" update; then
|
|
346
|
+
echo "[WARN] PM2_RESYNC_NEEDED: 'pm2 update' failed — the daemon still runs the old pm2."
|
|
347
|
+
echo "[WARN] cd $(dirname "$ECOSYSTEM") && npx pm2 update && npx pm2 list"
|
|
348
|
+
fi
|
|
349
|
+
else
|
|
350
|
+
echo "[WARN] PM2_PIN_FAILED: could not install pm2@$PM2_PIN — the previous pm2 still runs the app."
|
|
351
|
+
echo "[WARN] Retry from a shell: cd $(dirname "$ECOSYSTEM") && npx selva migrate"
|
|
352
|
+
fi
|
|
353
|
+
fi
|
|
354
|
+
|
|
321
355
|
# ---------------------------------------------------------------------------
|
|
322
356
|
# 5. Start selva-compute with the new build.
|
|
323
357
|
# ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":["join","readFileSync"],"sources":["../../../../../../../../src/lib/server/updateRunner.server.ts","../../../../../../../../src/routes/api/admin/system/update/+server.ts"],"sourcesContent":["/**\n * Generates the bash the self-update POST route spawns: a tiny daemonizing\n * launcher plus the runner script that actually stops/updates/starts/health-\n * checks the deployment. Split out of the route file because SvelteKit's\n * route-file validator only allows HTTP-verb exports (and `_`-prefixed ones) —\n * these are plain functions the runner-script contract tests import directly.\n */\n\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { findDeploymentDir } from './selfUpdate.server.js';\nimport { channelTag, type ReleaseChannel } from './releaseChannel.server.js';\n\nexport function readRuntimeVersion(dir: string): string | undefined {\n\ttry {\n\t\tconst pkg = JSON.parse(\n\t\t\treadFileSync(join(dir, 'node_modules', '@selvajs', 'selva', 'package.json'), 'utf8')\n\t\t);\n\t\treturn typeof pkg.version === 'string' ? pkg.version : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n// No caller currently passes untrusted input (plan.cwd is from\n// process.cwd(), npm package names are hardcoded), but defensive quoting is\n// cheap.\nexport function shellQuote(s: string): string {\n\treturn `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\n\n// Wraps the actual update commands in a tiny \"launcher\" that daemonizes them.\n//\n// THE PROBLEM: `pm2 stop selva-compute` (which the runner has to call) uses\n// tree-kill, which walks /proc parent-child relationships from\n// selva-compute's PID and SIGKILLs every descendant. Node's\n// `{ detached: true }` + `child.unref()` puts the spawned bash in a new\n// session/process group but does NOT change the parent-child relationship —\n// so tree-kill still finds and kills it, and the app never restarts.\n//\n// THE FIX: write the update commands to a tempfile and launch them via\n// `setsid bash ... &`, then have the launcher exit. The runner's PPID becomes\n// 1 (init) the moment the launcher exits, so it's no longer a descendant of\n// selva-compute and tree-kill can't reach it.\n//\n// Output: the launcher's prelude lines are echoed via tee into\n// UPDATE_LOG_PATH and through stdout (visible to SSE while the connection is\n// still up); the runner appends its output to the same log file; the\n// frontend tolerates the SSE blackout by polling the log file.\nexport function buildLauncher(\n\trunnerScript: string,\n\tlogPath: string,\n\tprelude: string[] = []\n): string {\n\tconst echoes = prelude.map((line) => `echo ${shellQuote(line)}`).join('\\n');\n\t// Note: runner script is embedded via a QUOTED heredoc so no variable\n\t// expansion happens — the runner text is written verbatim.\n\treturn `\nLOGFILE=${shellQuote(logPath)}\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}\n\n// Bash script the daemonized runner executes. Flow:\n//\n// 1. pre-flight — query the registry; if already on latest, exit clean\n// WITHOUT touching the running app.\n// 2. pm2 sync — `pm2 update` if the daemon and CLI versions drifted.\n// 3. pm2 stop — stop selva-compute before npm overwrites build/, so\n// in-flight requests can't hit ERR_MODULE_NOT_FOUND\n// from chunk-hash churn under their feet.\n// 4. npm update — refresh @selvajs/* (--prefer-online bypasses the\n// packument cache, already baked into npmArgs).\n// 5. pm2 start — from ecosystem.config.cjs (not `pm2 start name`,\n// which requires the process to already be in pm2's\n// in-memory list — fragile after `pm2 update`).\n// 6. health probe — poll /api/health for up to 30s.\n// 7. rollback — on failure: npm install the prior version, restart.\n// 8. EXIT trap — last-resort: if anything above leaves the app\n// offline (crash, kill, network blip), unconditionally\n// try `pm2 start ecosystem.config.cjs` before exiting\n// so the customer's site doesn't stay dark.\n//\n// Embedded into the launcher via a quoted heredoc, so this whole string is\n// written verbatim — interpolated values must be shell-quoted at JS time.\nexport function buildNpmRunnerScript(\n\tnpmArgs: string[],\n\tversionBefore: string | undefined,\n\tecosystemPath: string,\n\ttag: string\n): string {\n\tconst npmCommand = ['npm', ...npmArgs].map(shellQuote).join(' ');\n\t// Empty string when versionBefore is undefined — bash sees `BEFORE=\"\"`\n\t// and skips the rollback path (you can't roll back to nothing).\n\tconst before = shellQuote(versionBefore ?? '');\n\tconst ecosystem = shellQuote(ecosystemPath);\n\t// The npm dist-tag the chosen channel resolves to (`latest` / `beta`). The\n\t// pre-flight and no-change warning query this tag, so they don't misfire on\n\t// a beta channel (where the channel's published version is a pre-release the\n\t// default `latest` query would never see) or on a revert (where the target\n\t// stable version is OLDER than the installed beta).\n\tconst distTag = shellQuote(tag);\n\n\treturn `#!/bin/bash\nset -o pipefail\nBEFORE=${before}\nECOSYSTEM=${ecosystem}\nTAG=${distTag}\n\n# Resolve the deployment-local pm2 explicitly instead of trusting PATH.\n# The runner is re-launched via \\`setsid bash\\` from a tempfile, so it inherits\n# whatever environment the spawning process had. When the update is triggered\n# from the admin UI that happens to include node_modules/.bin; from cron or a\n# bare shell it does not, and every pm2 call below — including the EXIT trap's\n# last-resort restart — fails with \"command not found\" and the app stays dark.\nPM2=\"$(dirname \"$ECOSYSTEM\")/node_modules/.bin/pm2\"\n[ -x \"$PM2\" ] || PM2=pm2\n\n# Waits for selva-compute to leave the transitional 'stopping' state.\n#\n# \\`pm2 stop\\` sends SIGINT and returns without waiting for the process to die.\n# The SvelteKit node adapter then drains in-flight requests before exiting, and\n# PM2 only escalates to SIGKILL after kill_timeout (10s in the scaffolded\n# ecosystem). For that whole window the process table entry has a name and an\n# id but no live pid — \\`pm2 start\\` resolves the name, converts to a restart,\n# finds nothing to restart, and pm2's own table printer crashes on\n# \\`undefined.pm2_env\\`. Polling here keeps the rest of the script out of that\n# window entirely.\n#\n# The drain reliably takes the full timeout when the update was triggered from\n# the admin UI: that page is fed by an SSE stream this very process serves, and\n# an open SSE stream never completes on its own.\n# Prints exactly one word. Callers compare it against 'online' / 'stopping', so\n# a probe that emits two tokens on failure (the inline catch AND a shell\n# fallback both firing) would silently never match either. Node's catch is the\n# single failure path; fd 0 rather than /dev/stdin because the latter isn't a\n# readable pipe everywhere.\napp_status() {\n \"$PM2\" jlist 2>/dev/null | node -e \"\n try {\n const list = JSON.parse(require('fs').readFileSync(0,'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\n}\n\nwait_until_stopped() {\n for i in $(seq 1 20); do\n STATUS=$(app_status)\n if [ \"$STATUS\" != \"stopping\" ]; then\n return 0\n fi\n echo \"[INFO] selva-compute still draining (attempt $i/20) — waiting for SIGKILL escalation\"\n sleep 1\n done\n echo \"[WARN] selva-compute stuck in 'stopping' after 20s — continuing anyway\"\n return 1\n}\n\n# \\`pm2 start <ecosystem>\\` converts to a restart-by-id when an entry of the same\n# name is already in the table. If that entry is stale the restart fails and no\n# amount of retrying the same command helps — the name has to be dropped first\n# so the start registers a fresh process. Deleting a stopped entry is safe: the\n# ecosystem file is the source of truth for how to bring it back.\nstart_app() {\n if \"$PM2\" start \"$ECOSYSTEM\" --update-env; then\n return 0\n fi\n echo \"[WARN] pm2 start failed — dropping the stale process entry and retrying\"\n \"$PM2\" delete selva-compute >/dev/null 2>&1 || true\n \"$PM2\" start \"$ECOSYSTEM\" --update-env\n}\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 exiting. Leaving the app\n# down is the worst possible outcome of an update.\non_exit() {\n CODE=$?\n STATUS=$(app_status)\n # A 'stopping' entry is mid-drain, not down. Restarting it now hits the same\n # dead-id window that brought us here; wait for the entry to settle first.\n if [ \"$STATUS\" = \"stopping\" ]; then\n wait_until_stopped\n STATUS=$(app_status)\n fi\n if [ \"$STATUS\" != \"online\" ]; then\n echo \"[RECOVER] selva-compute is '$STATUS' — starting from ecosystem.config.cjs\"\n start_app >/dev/null 2>&1 || \\\\\n echo \"[RECOVER] pm2 start failed — manual intervention required: cd $(dirname \"$ECOSYSTEM\") && ./node_modules/.bin/pm2 delete selva-compute; ./node_modules/.bin/pm2 start ecosystem.config.cjs\"\n fi\n # Terminal marker: the restarted app's outcome reconciler greps this to turn\n # the run into an audit event (selfUpdate.server.ts). Keep the format stable.\n echo \"[EXIT] code=$CODE\"\n}\ntrap on_exit EXIT\n\n# A killed runner must not look like a finished one.\n#\n# \\`$?\\` inside an EXIT trap reports the last completed command, NOT the signal.\n# When systemd SIGTERMs the whole cgroup, the EXIT trap still runs and records\n# \\`code=0\\` — so deriveOutcome takes the exit-0 success branch and tells the\n# operator \"Updated X → Y. The app is back online.\" while npm never ran and\n# the deployment is unchanged. Catching the signal makes the recorded code\n# truthful; 143/130 are the conventional 128+signal values.\non_signal() {\n SIG=$1\n echo \"[FATAL] KILLED: runner received SIG$SIG before finishing.\"\n echo \"[FATAL] Nothing was installed by this run. If the app is down, recover with:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\") && pm2 start ecosystem.config.cjs --update-env\"\n echo \"[FATAL] A systemd-supervised pm2 can do this when 'pm2 update' recycles the daemon.\"\n exit $2\n}\ntrap 'on_signal TERM 143' TERM\ntrap 'on_signal INT 130' INT\ntrap 'on_signal HUP 129' HUP\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 triggers a\n# full stop/install/start cycle and a downtime window for no reason.\necho \"[STEP] Checking npm registry for the '$TAG' channel version\"\nLATEST=$(npm view \"@selvajs/selva@$TAG\" 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 '$TAG' channel version ($BEFORE)\"\n echo \"[DONE] Nothing to do\"\n exit 0\nelse\n # May be a forward update OR a revert (target older than installed) — either\n # way the installed version differs from what this channel publishes.\n echo \"[INFO] Target ($TAG): $BEFORE → $LATEST\"\nfi\n\n# ---------------------------------------------------------------------------\n# 1b. Node engine pre-flight — BEFORE any downtime.\n# ---------------------------------------------------------------------------\n# npm only treats an engine mismatch as fatal under engine-strict=true, which\n# no deployment sets. So a release requiring a newer Node installs\n# \"successfully\", pm2 starts, and /api/health returns 200 (it touches nothing\n# Node-version specific) — a false green that skips rollback entirely. Warn\n# here so a CLI-driven run sees it too; the admin UI blocks earlier.\nREQUIRED_NODE=$(npm view \"@selvajs/selva@$TAG\" engines.node --silent 2>/dev/null | tr -d '\"' | tr -d \"'\")\nRUNNING_NODE=$(node -p 'process.versions.node' 2>/dev/null)\nif [ -n \"$REQUIRED_NODE\" ] && [ -n \"$RUNNING_NODE\" ]; then\n # Compare majors only — the ranges we publish are all \\`>=X\\` forms.\n REQ_MAJOR=$(echo \"$REQUIRED_NODE\" | grep -o '[0-9]\\\\+' | head -1)\n RUN_MAJOR=$(echo \"$RUNNING_NODE\" | cut -d. -f1)\n if [ -n \"$REQ_MAJOR\" ] && [ \"$RUN_MAJOR\" -lt \"$REQ_MAJOR\" ] 2>/dev/null; then\n echo \"[WARN] ENGINE_MISMATCH: @selvajs/selva@$LATEST requires Node $REQUIRED_NODE but this host runs v$RUNNING_NODE\"\n echo \"[WARN] npm will install it anyway (engine-strict is off) and the health probe will pass,\"\n echo \"[WARN] but routes using newer Node APIs will fail at request time. Upgrade Node on this host.\"\n fi\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\"\nPING_OUT=$(\"$PM2\" ping 2>&1)\nif echo \"$PING_OUT\" | grep -q \"out-of-date\"; then\n # pm2 prints both versions alongside the warning. Which is newer decides\n # whether \\`pm2 update\\` can help — see the direction check below.\n DAEMON_V=$(echo \"$PING_OUT\" | sed -e 's/\\\\x1b\\\\[[0-9;]*m//g' \\\\\n | grep -i \"In memory PM2 version\" | grep -o '[0-9]\\\\+\\\\.[0-9]\\\\+\\\\.[0-9]\\\\+' | head -1)\n LOCAL_V=$(echo \"$PING_OUT\" | sed -e 's/\\\\x1b\\\\[[0-9;]*m//g' \\\\\n | grep -i \"Local PM2 version\" | grep -o '[0-9]\\\\+\\\\.[0-9]\\\\+\\\\.[0-9]\\\\+' | head -1)\n DAEMON_MAJOR=\\${DAEMON_V%%.*}\n LOCAL_MAJOR=\\${LOCAL_V%%.*}\n\n # A daemon NEWER than the deployment-local CLI means a foreign global pm2 owns\n # it. \\`pm2 update\\` would DOWNGRADE the daemon and feed it a dump it can't read,\n # losing the process table — selva-compute never gets re-registered. That is an\n # operator problem, not something this script can repair, so stop before we\n # take the app down.\n if [ -n \"$DAEMON_MAJOR\" ] && [ -n \"$LOCAL_MAJOR\" ] && [ \"$DAEMON_MAJOR\" -gt \"$LOCAL_MAJOR\" ] 2>/dev/null; then\n echo \"[FATAL] PM2_SKEW: the running daemon (v$DAEMON_V) is NEWER than this deployment's pm2 (v$LOCAL_V).\"\n echo \"[FATAL] A global pm2 owns the daemon. Running 'pm2 update' would downgrade it and drop\"\n echo \"[FATAL] the process table. Resolve manually before updating:\"\n echo \"[FATAL] which -a pm2 && pm2 -v && pm2 ping\"\n echo \"[FATAL] Aborting WITHOUT stopping the app — it is still running.\"\n exit 8\n fi\n\n # Under systemd, \\`pm2 update\\` kills and respawns the daemon. systemd sees its\n # unit's main process die and, with the default KillMode=control-group,\n # SIGTERMs everything in the cgroup — including this runner. setsid escapes\n # PM2's tree-kill but NOT the cgroup, so there is no way to survive it from\n # here; refuse the resync instead of being killed by it.\n if grep -qs 'pm2.*\\\\.service' /proc/self/cgroup 2>/dev/null; then\n echo \"[FATAL] SYSTEMD_PM2: this deployment's PM2 is supervised by systemd, and the daemon\"\n echo \"[FATAL] needs a resync. Running 'pm2 update' here would restart the systemd unit and\"\n echo \"[FATAL] kill this runner mid-update. Resync manually from a shell, then retry:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\") && ./node_modules/.bin/pm2 update\"\n echo \"[FATAL] Aborting WITHOUT stopping the app — it is still running.\"\n exit 9\n fi\n\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 still\n# serves traffic means 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# pm2 stop returns before the process is actually gone. Everything below —\n# npm rewriting build/, then the restart — must happen outside the drain window.\nwait_until_stopped\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 latter\n# requires selva-compute to already be in pm2's in-memory process list, which\n# a \\`pm2 update\\` (step 2) isn't guaranteed to preserve.\necho \"[STEP] Starting selva-compute with new build\"\nif ! start_app; 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 BODY=$(cat /tmp/selva-health.$$)\n echo \"[FATAL] Last response body:\"\n echo \"$BODY\"\n\n # Name the cause before rolling back. /api/health reports WHY it is degraded\n # in a structured body, but a rollback that only prints raw JSON reads to an\n # operator as \"the update just failed\" — they retry, hit the identical\n # failure, and never learn the database is the thing that needs attention.\n # Each branch below emits a stable marker deriveOutcome keys on.\n # Match on the keys unique to each report rather than a bare \\`\"ok\":false\\`,\n # which appears in whichever sub-report failed and would misattribute one\n # cause to the other. \\`expected\\` only ever appears in schemaVersion;\n # \\`plaintextFound\\`/\\`failures\\` only in atRestSecrets.\n if echo \"$BODY\" | grep -q '\"expected\":'; then\n EXPECTED=$(echo \"$BODY\" | grep -o '\"expected\":\"[^\"]*\"' | head -1 | cut -d'\"' -f4)\n ACTUAL=$(echo \"$BODY\" | grep -o '\"actual\":\"[^\"]*\"' | head -1 | cut -d'\"' -f4)\n echo \"[FATAL] SCHEMA_SKEW: @selvajs/selva@\\${AFTER:-$LATEST} expects database migration head \\${EXPECTED:-(unknown)},\"\n echo \"[FATAL] but this database is at \\${ACTUAL:-(unavailable)}. The new version is fine — its migrations\"\n echo \"[FATAL] were never applied. Retrying the update WILL fail again in exactly the same way.\"\n echo \"[FATAL] The update does not apply migrations itself: they are not reversible, so an\"\n echo \"[FATAL] auto-migrate followed by a rollback would leave code and database on different heads.\"\n echo \"[FATAL] Apply them yourself, then re-run the update:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\")\"\n echo \"[FATAL] npm install --prefer-online @selvajs/supabase-provider@$TAG\"\n echo \"[FATAL] npx selva-supabase\"\n echo \"[FATAL] npx supabase db push\"\n echo \"[FATAL] The provider install is not optional: the migration SQL ships inside that\"\n echo \"[FATAL] package, and the update only moves @selvajs/cli and @selvajs/selva — so a sync\"\n echo \"[FATAL] without it copies 0 files and the push reports 'up to date' having done nothing.\"\n echo \"[FATAL] If db push asks for credentials, see docs/self-hosting/providers/supabase.md\"\n echo \"[FATAL] — it needs a Supabase ACCOUNT credential (supabase login, or SUPABASE_ACCESS_TOKEN),\"\n echo \"[FATAL] which is not any of the three keys in .env.\"\n elif echo \"$BODY\" | grep -qE '\"plaintextFound\":true|\"failures\":\\\\[[^]]'; then\n echo \"[FATAL] AT_REST_SECRETS: stored compute server API keys could not be decrypted under the\"\n echo \"[FATAL] current SELVA_AT_REST_KEY. This is a configuration problem on this host, not a\"\n echo \"[FATAL] fault in the new version — retrying the update will fail the same way.\"\n echo \"[FATAL] Re-enter the affected keys at /admin/compute, or restore the original\"\n echo \"[FATAL] SELVA_AT_REST_KEY, then re-run the update.\"\n else\n echo \"[FATAL] The health endpoint did not report a known cause. Inspect the body above and\"\n echo \"[FATAL] \\\\\\`pm2 logs selva-compute\\\\\\` for what the new version failed on.\"\n fi\n\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\"\n\"$PM2\" stop selva-compute >/dev/null 2>&1 || true\nwait_until_stopped >/dev/null 2>&1\n# Restore @selvajs/cli alongside the runtime: the forward step installs both at\n# the channel tag, so reverting only the runtime leaves a version pair that was\n# never released together.\nif ! npm install --save \"@selvajs/cli@$BEFORE\" \"@selvajs/selva@$BEFORE\"; then\n echo \"[FATAL] Rollback npm install failed — EXIT trap will retry restart.\"\n exit 4\nfi\n\nstart_app || 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}\n\n// Selva self-updates as a CLI-scaffolded npm deployment: the deployment dir\n// holds a package.json that depends on @selvajs/selva, and update means\n// `npm install @selvajs/*@<tag>` + pm2 restart. Deployment-dir detection\n// (cwd-upward probe, `INSTALL_DIR` override) lives in `selfUpdate.server.ts`,\n// shared with the outcome reconciler and the log path.\nexport type UpdatePlan = { cwd: string; args: string[] };\n\n// Only the CLI and the runtime move. Provider code is bundled into\n// @selvajs/selva; @selvajs/supabase-provider carries just the migration SQL,\n// which the operator installs and pushes before updating.\n//\n// `npm install` pins to the channel's dist-tag rather than using `npm\n// update`, because `update` only ever moves FORWARD within the installed\n// semver range — it can't switch dist-tags or DOWNGRADE. Pinning to @latest /\n// @beta makes one command serve every transition: forward stable bumps,\n// beta→newer-beta, and the revert case (beta→stable lands on an older version).\n//\n// --save persists the resolved version into package.json so the next plain\n// install is reproducible; --prefer-online forces npm to revalidate cached\n// packuments against the registry — without it, npm's packument cache (5+\n// min TTL) can silently no-op right after publish.\nexport function npmInstallArgs(channel: ReleaseChannel): string[] {\n\tconst tag = channelTag(channel);\n\treturn ['install', '--save', '--prefer-online', `@selvajs/cli@${tag}`, `@selvajs/selva@${tag}`];\n}\n\nexport function detectUpdatePlan(\n\tenv: Record<string, string | undefined>,\n\tchannel: ReleaseChannel\n): UpdatePlan | null {\n\tconst dir = findDeploymentDir(env);\n\treturn dir ? { cwd: dir, args: npmInstallArgs(channel) } : null;\n}\n","import { spawn } from 'child_process';\nimport { join } from 'path';\nimport { readFileSync, writeFileSync } from 'fs';\nimport { env } from '#lib/server/env.js';\nimport { json } from '@sveltejs/kit';\nimport { actorFrom } from '@selvajs/platform';\nimport type { RequestHandler } from './$types';\nimport { requirePermission } from '#lib/server/access.server.js';\nimport { renderThrown } from '@selvajs/server/logging';\nimport { checkForUpdate } from '#lib/server/updateCheck.server.js';\nimport { readChannel, channelTag } from '#lib/server/releaseChannel.server.js';\nimport { getEventSink, getErrorReporter } from '#lib/server/providers.server.js';\nimport {\n\tfindDeploymentDir,\n\tstartUpdateOutcomeReconciler,\n\tupdateLogPath,\n\tupdateStatePath,\n\ttype PendingUpdateState\n} from '#lib/server/selfUpdate.server.js';\nimport {\n\treadRuntimeVersion,\n\tbuildLauncher,\n\tbuildNpmRunnerScript,\n\tdetectUpdatePlan\n} from '#lib/server/updateRunner.server.js';\n\n// Where the bash wrapper mirrors all script output (`updateLogPath` — in the\n// deployment dir so it survives reboots, audit O2). The SSE stream dies the\n// moment `pm2 stop selva-compute` succeeds (selva-compute IS the SSE server),\n// so the frontend loses visibility into everything that happens after — npm\n// update output, pm2 start result, health-probe results, rollback decisions.\n// The script keeps writing to this file regardless. Once the new selva-compute\n// process is back up, the frontend polls GET on this same route to fetch the\n// full log and reveal what happened during the blackout. One log per update —\n// the wrapper truncates at start, so we never carry stale content forward.\n// The runner's `[EXIT] code=N` marker in the same log also drives the\n// post-restart audit-event reconciliation (`selfUpdate.server.ts`).\n\n// Strip ANSI escape codes from terminal output\nfunction stripAnsi(str: string): string {\n\t// eslint-disable-next-line no-control-regex\n\treturn str.replace(/\\x1B\\[[0-9;]*[mGKHF]/g, '');\n}\n\n// POST - Run update and stream output via Server-Sent Events.\n//\n// Runs `npm update @selvajs/*` then restarts via ecosystem.config.cjs. The\n// runner script handles stop / update / start / health-probe / rollback with\n// an EXIT trap that keeps the app online no matter how it exits.\nexport const POST: RequestHandler = async ({ locals }) => {\n\trequirePermission(locals, 'instance_admin');\n\n\tconst channel = readChannel();\n\tconst plan = detectUpdatePlan(env, channel);\n\tif (!plan) {\n\t\treturn new Response(\n\t\t\tJSON.stringify({\n\t\t\t\terror:\n\t\t\t\t\t\"Couldn't determine how to update this deployment. \" +\n\t\t\t\t\t'Expected node_modules/@selvajs/selva (CLI scaffold) in the cwd ' +\n\t\t\t\t\t'or a parent directory.'\n\t\t\t}),\n\t\t\t{ status: 500, headers: { 'Content-Type': 'application/json' } }\n\t\t);\n\t}\n\n\t// Capture the runtime version BEFORE we touch anything, so we can:\n\t// (a) detect a no-op update and warn, (b) roll back to the prior version\n\t// if the new process fails to come up healthy.\n\tconst versionBefore = readRuntimeVersion(plan.cwd);\n\tconst actorId = locals.ctx ? actorFrom(locals.ctx) : 'system';\n\n\t// Audit trail (O2): `started` now; the terminal event is emitted by the\n\t// outcome reconciler after the app restarts (this process is killed\n\t// mid-update). The state file is the reconciler's emission token.\n\tconst pending: PendingUpdateState = {\n\t\tstartedAt: new Date().toISOString(),\n\t\tactorId,\n\t\tchannel,\n\t\tfromVersion: versionBefore\n\t};\n\ttry {\n\t\twriteFileSync(updateStatePath(plan.cwd), JSON.stringify(pending, null, '\\t'));\n\t} catch (err) {\n\t\tlocals.log.error('Could not persist pending-update state', {\n\t\t\tcomponent: 'selfUpdate',\n\t\t\terr: renderThrown(err)\n\t\t});\n\t}\n\tawait getEventSink().emit({\n\t\ttype: 'system.update.started',\n\t\tchannel,\n\t\tfromVersion: versionBefore,\n\t\tactorId\n\t});\n\n\tconst stream = new ReadableStream({\n\t\tstart(controller) {\n\t\t\tconst encoder = new TextEncoder();\n\n\t\t\tfunction sendEvent(type: string, data: Record<string, unknown>) {\n\t\t\t\tconst message = `data: ${JSON.stringify({ type, ...data })}\\n\\n`;\n\t\t\t\tcontroller.enqueue(encoder.encode(message));\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Prelude lines are passed to the bash wrapper rather than\n\t\t\t\t// sendEvent'd directly so they end up in both the SSE stream\n\t\t\t\t// (via bash stdout) AND the log file (via tee). Without this,\n\t\t\t\t// the frontend's blackout-recovery file fetch would clobber\n\t\t\t\t// these lines when it replaces its buffer with the file content.\n\t\t\t\tconst prelude = [\n\t\t\t\t\t`[INFO] Updating deployment (cwd: ${plan.cwd}, channel: ${channel})`,\n\t\t\t\t\t...(versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : [])\n\t\t\t\t];\n\n\t\t\t\t// Spawn the launcher detached. The launcher writes the actual\n\t\t\t\t// runner script to disk, daemonizes it (setsid + & + exit),\n\t\t\t\t// and quits — leaving the runner with PPID=1 so PM2's tree-kill\n\t\t\t\t// of selva-compute can't reach it. See buildLauncher for the\n\t\t\t\t// full rationale.\n\t\t\t\t//\n\t\t\t\t// The runner is buildNpmRunnerScript — pre-flights the version\n\t\t\t\t// check, then stop / npm update / start / health probe /\n\t\t\t\t// rollback, with an EXIT trap that ensures the app is online no\n\t\t\t\t// matter how the script exits.\n\t\t\t\tconst runnerScript = buildNpmRunnerScript(\n\t\t\t\t\tplan.args,\n\t\t\t\t\tversionBefore,\n\t\t\t\t\tjoin(plan.cwd, 'ecosystem.config.cjs'),\n\t\t\t\t\tchannelTag(channel)\n\t\t\t\t);\n\t\t\t\tconst cmd = 'bash';\n\t\t\t\tconst args = ['-c', buildLauncher(runnerScript, updateLogPath(plan.cwd), prelude)];\n\n\t\t\t\t// Prepend the deployment's node_modules/.bin to PATH so the bash\n\t\t\t\t// script finds the project-local pm2 (and any other tooling\n\t\t\t\t// installed as a deployment dependency). Without this the script\n\t\t\t\t// inherits the SvelteKit process's PATH, which on most servers\n\t\t\t\t// doesn't include node_modules/.bin — so `pm2` resolves to\n\t\t\t\t// whatever's globally installed, or fails outright if no global\n\t\t\t\t// pm2 exists. Both are wrong: we want the project-local pm2 so\n\t\t\t\t// daemon and CLI stay aligned. Mirrors the local-only resolution\n\t\t\t\t// in @selvajs/cli's pm2Bin().\n\t\t\t\tconst localBin = join(plan.cwd, 'node_modules', '.bin');\n\t\t\t\tconst child = spawn(cmd, args, {\n\t\t\t\t\tcwd: plan.cwd,\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tPATH: `${localBin}:${process.env.PATH ?? ''}`,\n\n\t\t\t\t\t\tHOME: process.env.HOME,\n\t\t\t\t\t\tINSTALL_DIR: plan.cwd\n\t\t\t\t\t},\n\t\t\t\t\tdetached: true,\n\t\t\t\t\tstdio: ['ignore', 'pipe', 'pipe']\n\t\t\t\t});\n\t\t\t\tchild.unref();\n\n\t\t\t\t// Covers the outcomes that DON'T restart this process (pre-flight\n\t\t\t\t// \"already up to date\", early failures): this process is still\n\t\t\t\t// alive to reconcile them. A real update kills this process; the\n\t\t\t\t// restarted one re-arms the reconciler from hooks.server.ts.\n\t\t\t\tstartUpdateOutcomeReconciler({\n\t\t\t\t\tdeploymentDir: plan.cwd,\n\t\t\t\t\temit: (e) => getEventSink().emit(e),\n\t\t\t\t\treport: (err) => getErrorReporter().capture(err, { tags: { origin: 'selfUpdate' } })\n\t\t\t\t});\n\n\t\t\t\t// Kill the process if it runs longer than 15 minutes.\n\t\t\t\t// The child is detached (its own process group), so signal the\n\t\t\t\t// whole group via negative pid — otherwise descendants (pnpm,\n\t\t\t\t// node, pm2) outlive the bash wrapper.\n\t\t\t\tconst timeout = setTimeout(\n\t\t\t\t\t() => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (child.pid) process.kill(-child.pid, 'SIGTERM');\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// group already gone — nothing to do\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendEvent('log', { data: '[FATAL] Update timed out after 15 minutes' });\n\t\t\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t},\n\t\t\t\t\t15 * 60 * 1000\n\t\t\t\t);\n\n\t\t\t\t// Stream stdout\n\t\t\t\tlet restarting = false;\n\t\t\t\tchild.stdout.on('data', (data) => {\n\t\t\t\t\tconst lines = data.toString().split('\\n');\n\t\t\t\t\tfor (const line of lines) {\n\t\t\t\t\t\tconst clean = stripAnsi(line).trim();\n\t\t\t\t\t\tif (clean) {\n\t\t\t\t\t\t\t// Detect both stopProcessId (pm2 restart) and restartProcessId (pm2 reload)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!restarting &&\n\t\t\t\t\t\t\t\t(clean.includes('Applying action stopProcessId') ||\n\t\t\t\t\t\t\t\t\tclean.includes('Applying action restartProcessId'))\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\trestarting = true;\n\t\t\t\t\t\t\t\tsendEvent('restarting', { data: clean });\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsendEvent('log', { data: clean });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Stream stderr\n\t\t\t\tchild.stderr.on('data', (data) => {\n\t\t\t\t\tconst lines = data.toString().split('\\n');\n\t\t\t\t\tfor (const line of lines) {\n\t\t\t\t\t\tconst clean = stripAnsi(line).trim();\n\t\t\t\t\t\tif (clean) {\n\t\t\t\t\t\t\tsendEvent('log', { data: `[ERROR] ${clean}` });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Handle process exit\n\t\t\t\tchild.on('close', (code) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tsendEvent('exit', { code: code ?? -1 });\n\t\t\t\t\tcontroller.close();\n\t\t\t\t});\n\n\t\t\t\t// Handle errors\n\t\t\t\tchild.on('error', (err) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tsendEvent('log', { data: `[FATAL] ${err.message}` });\n\t\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\t\tcontroller.close();\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tsendEvent('log', { data: `[FATAL] Failed to spawn process: ${err}` });\n\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\tcontroller.close();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn new Response(stream, {\n\t\theaders: {\n\t\t\t'Content-Type': 'text/event-stream',\n\t\t\t'Cache-Control': 'no-cache',\n\t\t\tConnection: 'keep-alive'\n\t\t}\n\t});\n};\n\n// GET — two jobs, selected by query param:\n//\n// ?check=1 → query the npm registry and report whether a newer\n// @selvajs/selva is published. JSON: { current, latest,\n// updateAvailable }. The admin page calls this on load to show\n// an \"update available\" badge. Degrades gracefully: if the\n// registry is unreachable, latest is null and updateAvailable\n// is false (we never block the page on npm).\n//\n// (default) → read the tee'd update log so the frontend can recover the\n// chunk of output that happened during the SSE blackout (between\n// `pm2 stop` killing this process and the new selva-compute\n// coming back online). Empty body if no update has run yet.\n// Polled by the admin UI during the post-restart wait.\nexport const GET: RequestHandler = async ({ locals, url, fetch }) => {\n\trequirePermission(locals, 'instance_admin');\n\n\tif (url.searchParams.get('check') !== null) {\n\t\treturn json(await checkForUpdate(fetch, readChannel()), {\n\t\t\theaders: { 'Cache-Control': 'no-store' }\n\t\t});\n\t}\n\n\tlet body = '';\n\ttry {\n\t\tbody = readFileSync(updateLogPath(findDeploymentDir(env)), 'utf8');\n\t} catch {\n\t\t// Log doesn't exist (no update has run yet). Empty body is correct —\n\t\t// the frontend treats no content as \"nothing to show yet\".\n\t}\n\treturn new Response(body, {\n\t\theaders: {\n\t\t\t'Content-Type': 'text/plain; charset=utf-8',\n\t\t\t'Cache-Control': 'no-store'\n\t\t}\n\t});\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":["join","readFileSync"],"sources":["../../../../../../../../src/lib/server/updateRunner.server.ts","../../../../../../../../src/routes/api/admin/system/update/+server.ts"],"sourcesContent":["/**\n * Generates the bash the self-update POST route spawns: a tiny daemonizing\n * launcher plus the runner script that actually stops/updates/starts/health-\n * checks the deployment. Split out of the route file because SvelteKit's\n * route-file validator only allows HTTP-verb exports (and `_`-prefixed ones) —\n * these are plain functions the runner-script contract tests import directly.\n */\n\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { findDeploymentDir } from './selfUpdate.server.js';\nimport { channelTag, type ReleaseChannel } from './releaseChannel.server.js';\n\nexport function readRuntimeVersion(dir: string): string | undefined {\n\ttry {\n\t\tconst pkg = JSON.parse(\n\t\t\treadFileSync(join(dir, 'node_modules', '@selvajs', 'selva', 'package.json'), 'utf8')\n\t\t);\n\t\treturn typeof pkg.version === 'string' ? pkg.version : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n// No caller currently passes untrusted input (plan.cwd is from\n// process.cwd(), npm package names are hardcoded), but defensive quoting is\n// cheap.\nexport function shellQuote(s: string): string {\n\treturn `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\n\n// Wraps the actual update commands in a tiny \"launcher\" that daemonizes them.\n//\n// THE PROBLEM: `pm2 stop selva-compute` (which the runner has to call) uses\n// tree-kill, which walks /proc parent-child relationships from\n// selva-compute's PID and SIGKILLs every descendant. Node's\n// `{ detached: true }` + `child.unref()` puts the spawned bash in a new\n// session/process group but does NOT change the parent-child relationship —\n// so tree-kill still finds and kills it, and the app never restarts.\n//\n// THE FIX: write the update commands to a tempfile and launch them via\n// `setsid bash ... &`, then have the launcher exit. The runner's PPID becomes\n// 1 (init) the moment the launcher exits, so it's no longer a descendant of\n// selva-compute and tree-kill can't reach it.\n//\n// Output: the launcher's prelude lines are echoed via tee into\n// UPDATE_LOG_PATH and through stdout (visible to SSE while the connection is\n// still up); the runner appends its output to the same log file; the\n// frontend tolerates the SSE blackout by polling the log file.\nexport function buildLauncher(\n\trunnerScript: string,\n\tlogPath: string,\n\tprelude: string[] = []\n): string {\n\tconst echoes = prelude.map((line) => `echo ${shellQuote(line)}`).join('\\n');\n\t// Note: runner script is embedded via a QUOTED heredoc so no variable\n\t// expansion happens — the runner text is written verbatim.\n\treturn `\nLOGFILE=${shellQuote(logPath)}\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}\n\n// Bash script the daemonized runner executes. Flow:\n//\n// 1. pre-flight — query the registry; if already on latest, exit clean\n// WITHOUT touching the running app.\n// 2. pm2 sync — `pm2 update` if the daemon and CLI versions drifted.\n// 3. pm2 stop — stop selva-compute before npm overwrites build/, so\n// in-flight requests can't hit ERR_MODULE_NOT_FOUND\n// from chunk-hash churn under their feet.\n// 4. npm update — refresh @selvajs/* (--prefer-online bypasses the\n// packument cache, already baked into npmArgs).\n// 5. pm2 start — from ecosystem.config.cjs (not `pm2 start name`,\n// which requires the process to already be in pm2's\n// in-memory list — fragile after `pm2 update`).\n// 6. health probe — poll /api/health for up to 30s.\n// 7. rollback — on failure: npm install the prior version, restart.\n// 8. EXIT trap — last-resort: if anything above leaves the app\n// offline (crash, kill, network blip), unconditionally\n// try `pm2 start ecosystem.config.cjs` before exiting\n// so the customer's site doesn't stay dark.\n//\n// Embedded into the launcher via a quoted heredoc, so this whole string is\n// written verbatim — interpolated values must be shell-quoted at JS time.\nexport function buildNpmRunnerScript(\n\tnpmArgs: string[],\n\tversionBefore: string | undefined,\n\tecosystemPath: string,\n\ttag: string\n): string {\n\tconst npmCommand = ['npm', ...npmArgs].map(shellQuote).join(' ');\n\t// Empty string when versionBefore is undefined — bash sees `BEFORE=\"\"`\n\t// and skips the rollback path (you can't roll back to nothing).\n\tconst before = shellQuote(versionBefore ?? '');\n\tconst ecosystem = shellQuote(ecosystemPath);\n\t// The npm dist-tag the chosen channel resolves to (`latest` / `beta`). The\n\t// pre-flight and no-change warning query this tag, so they don't misfire on\n\t// a beta channel (where the channel's published version is a pre-release the\n\t// default `latest` query would never see) or on a revert (where the target\n\t// stable version is OLDER than the installed beta).\n\tconst distTag = shellQuote(tag);\n\n\treturn `#!/bin/bash\nset -o pipefail\nBEFORE=${before}\nECOSYSTEM=${ecosystem}\nTAG=${distTag}\n\n# Resolve the deployment-local pm2 explicitly instead of trusting PATH.\n# The runner is re-launched via \\`setsid bash\\` from a tempfile, so it inherits\n# whatever environment the spawning process had. When the update is triggered\n# from the admin UI that happens to include node_modules/.bin; from cron or a\n# bare shell it does not, and every pm2 call below — including the EXIT trap's\n# last-resort restart — fails with \"command not found\" and the app stays dark.\nPM2=\"$(dirname \"$ECOSYSTEM\")/node_modules/.bin/pm2\"\n[ -x \"$PM2\" ] || PM2=pm2\n\n# Under systemd, \\`pm2 update\\` kills and respawns the daemon. systemd sees its\n# unit's main process die and, with the default KillMode=control-group,\n# SIGTERMs everything in the cgroup — including this runner. setsid escapes\n# PM2's tree-kill but NOT the cgroup, so the runner never runs \\`pm2 update\\`\n# when this is true.\npm2_under_systemd() {\n grep -qs 'pm2.*\\\\.service' /proc/self/cgroup 2>/dev/null\n}\n\n# Waits for selva-compute to leave the transitional 'stopping' state.\n#\n# \\`pm2 stop\\` sends SIGINT and returns without waiting for the process to die.\n# The SvelteKit node adapter then drains in-flight requests before exiting, and\n# PM2 only escalates to SIGKILL after kill_timeout (10s in the scaffolded\n# ecosystem). For that whole window the process table entry has a name and an\n# id but no live pid — \\`pm2 start\\` resolves the name, converts to a restart,\n# finds nothing to restart, and pm2's own table printer crashes on\n# \\`undefined.pm2_env\\`. Polling here keeps the rest of the script out of that\n# window entirely.\n#\n# The drain reliably takes the full timeout when the update was triggered from\n# the admin UI: that page is fed by an SSE stream this very process serves, and\n# an open SSE stream never completes on its own.\n# Prints exactly one word. Callers compare it against 'online' / 'stopping', so\n# a probe that emits two tokens on failure (the inline catch AND a shell\n# fallback both firing) would silently never match either. Node's catch is the\n# single failure path; fd 0 rather than /dev/stdin because the latter isn't a\n# readable pipe everywhere.\napp_status() {\n \"$PM2\" jlist 2>/dev/null | node -e \"\n try {\n const list = JSON.parse(require('fs').readFileSync(0,'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\n}\n\nwait_until_stopped() {\n for i in $(seq 1 20); do\n STATUS=$(app_status)\n if [ \"$STATUS\" != \"stopping\" ]; then\n return 0\n fi\n echo \"[INFO] selva-compute still draining (attempt $i/20) — waiting for SIGKILL escalation\"\n sleep 1\n done\n echo \"[WARN] selva-compute stuck in 'stopping' after 20s — continuing anyway\"\n return 1\n}\n\n# \\`pm2 start <ecosystem>\\` converts to a restart-by-id when an entry of the same\n# name is already in the table. If that entry is stale the restart fails and no\n# amount of retrying the same command helps — the name has to be dropped first\n# so the start registers a fresh process. Deleting a stopped entry is safe: the\n# ecosystem file is the source of truth for how to bring it back.\nstart_app() {\n if \"$PM2\" start \"$ECOSYSTEM\" --update-env; then\n return 0\n fi\n echo \"[WARN] pm2 start failed — dropping the stale process entry and retrying\"\n \"$PM2\" delete selva-compute >/dev/null 2>&1 || true\n \"$PM2\" start \"$ECOSYSTEM\" --update-env\n}\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 exiting. Leaving the app\n# down is the worst possible outcome of an update.\non_exit() {\n CODE=$?\n STATUS=$(app_status)\n # A 'stopping' entry is mid-drain, not down. Restarting it now hits the same\n # dead-id window that brought us here; wait for the entry to settle first.\n if [ \"$STATUS\" = \"stopping\" ]; then\n wait_until_stopped\n STATUS=$(app_status)\n fi\n if [ \"$STATUS\" != \"online\" ]; then\n echo \"[RECOVER] selva-compute is '$STATUS' — starting from ecosystem.config.cjs\"\n start_app >/dev/null 2>&1 || \\\\\n echo \"[RECOVER] pm2 start failed — manual intervention required: cd $(dirname \"$ECOSYSTEM\") && ./node_modules/.bin/pm2 delete selva-compute; ./node_modules/.bin/pm2 start ecosystem.config.cjs\"\n fi\n # Terminal marker: the restarted app's outcome reconciler greps this to turn\n # the run into an audit event (selfUpdate.server.ts). Keep the format stable.\n echo \"[EXIT] code=$CODE\"\n}\ntrap on_exit EXIT\n\n# A killed runner must not look like a finished one.\n#\n# \\`$?\\` inside an EXIT trap reports the last completed command, NOT the signal.\n# When systemd SIGTERMs the whole cgroup, the EXIT trap still runs and records\n# \\`code=0\\` — so deriveOutcome takes the exit-0 success branch and tells the\n# operator \"Updated X → Y. The app is back online.\" while npm never ran and\n# the deployment is unchanged. Catching the signal makes the recorded code\n# truthful; 143/130 are the conventional 128+signal values.\non_signal() {\n SIG=$1\n echo \"[FATAL] KILLED: runner received SIG$SIG before finishing.\"\n echo \"[FATAL] Nothing was installed by this run. If the app is down, recover with:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\") && pm2 start ecosystem.config.cjs --update-env\"\n echo \"[FATAL] A systemd-supervised pm2 can do this when 'pm2 update' recycles the daemon.\"\n exit $2\n}\ntrap 'on_signal TERM 143' TERM\ntrap 'on_signal INT 130' INT\ntrap 'on_signal HUP 129' HUP\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 triggers a\n# full stop/install/start cycle and a downtime window for no reason.\necho \"[STEP] Checking npm registry for the '$TAG' channel version\"\nLATEST=$(npm view \"@selvajs/selva@$TAG\" 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 '$TAG' channel version ($BEFORE)\"\n echo \"[DONE] Nothing to do\"\n exit 0\nelse\n # May be a forward update OR a revert (target older than installed) — either\n # way the installed version differs from what this channel publishes.\n echo \"[INFO] Target ($TAG): $BEFORE → $LATEST\"\nfi\n\n# ---------------------------------------------------------------------------\n# 1b. Node engine pre-flight — BEFORE any downtime.\n# ---------------------------------------------------------------------------\n# npm only treats an engine mismatch as fatal under engine-strict=true, which\n# no deployment sets. So a release requiring a newer Node installs\n# \"successfully\", pm2 starts, and /api/health returns 200 (it touches nothing\n# Node-version specific) — a false green that skips rollback entirely. Warn\n# here so a CLI-driven run sees it too; the admin UI blocks earlier.\nREQUIRED_NODE=$(npm view \"@selvajs/selva@$TAG\" engines.node --silent 2>/dev/null | tr -d '\"' | tr -d \"'\")\nRUNNING_NODE=$(node -p 'process.versions.node' 2>/dev/null)\nif [ -n \"$REQUIRED_NODE\" ] && [ -n \"$RUNNING_NODE\" ]; then\n # Compare majors only — the ranges we publish are all \\`>=X\\` forms.\n REQ_MAJOR=$(echo \"$REQUIRED_NODE\" | grep -o '[0-9]\\\\+' | head -1)\n RUN_MAJOR=$(echo \"$RUNNING_NODE\" | cut -d. -f1)\n if [ -n \"$REQ_MAJOR\" ] && [ \"$RUN_MAJOR\" -lt \"$REQ_MAJOR\" ] 2>/dev/null; then\n echo \"[WARN] ENGINE_MISMATCH: @selvajs/selva@$LATEST requires Node $REQUIRED_NODE but this host runs v$RUNNING_NODE\"\n echo \"[WARN] npm will install it anyway (engine-strict is off) and the health probe will pass,\"\n echo \"[WARN] but routes using newer Node APIs will fail at request time. Upgrade Node on this host.\"\n fi\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\"\nPING_OUT=$(\"$PM2\" ping 2>&1)\nif echo \"$PING_OUT\" | grep -q \"out-of-date\"; then\n # pm2 prints both versions alongside the warning. Which is newer decides\n # whether \\`pm2 update\\` can help — see the direction check below.\n DAEMON_V=$(echo \"$PING_OUT\" | sed -e 's/\\\\x1b\\\\[[0-9;]*m//g' \\\\\n | grep -i \"In memory PM2 version\" | grep -o '[0-9]\\\\+\\\\.[0-9]\\\\+\\\\.[0-9]\\\\+' | head -1)\n LOCAL_V=$(echo \"$PING_OUT\" | sed -e 's/\\\\x1b\\\\[[0-9;]*m//g' \\\\\n | grep -i \"Local PM2 version\" | grep -o '[0-9]\\\\+\\\\.[0-9]\\\\+\\\\.[0-9]\\\\+' | head -1)\n DAEMON_MAJOR=\\${DAEMON_V%%.*}\n LOCAL_MAJOR=\\${LOCAL_V%%.*}\n\n # A daemon NEWER than the deployment-local CLI means a foreign global pm2 owns\n # it. \\`pm2 update\\` would DOWNGRADE the daemon and feed it a dump it can't read,\n # losing the process table — selva-compute never gets re-registered. That is an\n # operator problem, not something this script can repair, so stop before we\n # take the app down.\n if [ -n \"$DAEMON_MAJOR\" ] && [ -n \"$LOCAL_MAJOR\" ] && [ \"$DAEMON_MAJOR\" -gt \"$LOCAL_MAJOR\" ] 2>/dev/null; then\n echo \"[FATAL] PM2_SKEW: the running daemon (v$DAEMON_V) is NEWER than this deployment's pm2 (v$LOCAL_V).\"\n echo \"[FATAL] A global pm2 owns the daemon. Running 'pm2 update' would downgrade it and drop\"\n echo \"[FATAL] the process table. Resolve manually before updating:\"\n echo \"[FATAL] which -a pm2 && pm2 -v && pm2 ping\"\n echo \"[FATAL] Aborting WITHOUT stopping the app — it is still running.\"\n exit 8\n fi\n\n if pm2_under_systemd; then\n echo \"[FATAL] SYSTEMD_PM2: this deployment's PM2 is supervised by systemd, and the daemon\"\n echo \"[FATAL] needs a resync. Running 'pm2 update' here would restart the systemd unit and\"\n echo \"[FATAL] kill this runner mid-update. Resync manually from a shell, then retry:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\") && ./node_modules/.bin/pm2 update\"\n echo \"[FATAL] Aborting WITHOUT stopping the app — it is still running.\"\n exit 9\n fi\n\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 still\n# serves traffic means 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# pm2 stop returns before the process is actually gone. Everything below —\n# npm rewriting build/, then the restart — must happen outside the drain window.\nwait_until_stopped\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# 4b. Move pm2 onto the version the new CLI pins.\n# ---------------------------------------------------------------------------\n# Only \\`selva migrate\\` rewrites package.json, so without this a release that\n# bumps pm2 needs a manual migrate on every host. The pin is read from the CLI\n# just installed: its devDependencies.pm2 is what a fresh scaffold gets. The\n# app is stopped, so swapping the daemon here adds no downtime. A failure\n# leaves the old pm2 running the app: warn, never abort. A rollback below\n# keeps the new pm2: reinstalling the old one would leave the daemon newer\n# than the CLI, the one skew \\`pm2 update\\` cannot repair.\nPM2_DECLARED=$(node -p \"require('./package.json').dependencies?.pm2 ?? ''\" 2>/dev/null)\nPM2_PIN=$(node -p \"require('./node_modules/@selvajs/cli/package.json').devDependencies?.pm2 ?? ''\" 2>/dev/null)\nif [ -n \"$PM2_PIN\" ] && [ \"$PM2_PIN\" != \"$PM2_DECLARED\" ]; then\n echo \"[STEP] Moving pm2 \\${PM2_DECLARED:-(none)} → $PM2_PIN, the version this release pins\"\n if npm install --save --save-exact --prefer-online \"pm2@$PM2_PIN\"; then\n if pm2_under_systemd; then\n echo \"[WARN] PM2_RESYNC_NEEDED: pm2 is now $PM2_PIN, but its daemon still runs the old version.\"\n echo \"[WARN] Swapping it here would restart the systemd unit and kill this runner. From a shell:\"\n echo \"[WARN] cd $(dirname \"$ECOSYSTEM\") && npx pm2 update && npx pm2 list\"\n echo \"[WARN] Let it finish: interrupting it leaves selva-compute unregistered.\"\n elif ! \"$PM2\" update; then\n echo \"[WARN] PM2_RESYNC_NEEDED: 'pm2 update' failed — the daemon still runs the old pm2.\"\n echo \"[WARN] cd $(dirname \"$ECOSYSTEM\") && npx pm2 update && npx pm2 list\"\n fi\n else\n echo \"[WARN] PM2_PIN_FAILED: could not install pm2@$PM2_PIN — the previous pm2 still runs the app.\"\n echo \"[WARN] Retry from a shell: cd $(dirname \"$ECOSYSTEM\") && npx selva migrate\"\n fi\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 latter\n# requires selva-compute to already be in pm2's in-memory process list, which\n# a \\`pm2 update\\` (step 2) isn't guaranteed to preserve.\necho \"[STEP] Starting selva-compute with new build\"\nif ! start_app; 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 BODY=$(cat /tmp/selva-health.$$)\n echo \"[FATAL] Last response body:\"\n echo \"$BODY\"\n\n # Name the cause before rolling back. /api/health reports WHY it is degraded\n # in a structured body, but a rollback that only prints raw JSON reads to an\n # operator as \"the update just failed\" — they retry, hit the identical\n # failure, and never learn the database is the thing that needs attention.\n # Each branch below emits a stable marker deriveOutcome keys on.\n # Match on the keys unique to each report rather than a bare \\`\"ok\":false\\`,\n # which appears in whichever sub-report failed and would misattribute one\n # cause to the other. \\`expected\\` only ever appears in schemaVersion;\n # \\`plaintextFound\\`/\\`failures\\` only in atRestSecrets.\n if echo \"$BODY\" | grep -q '\"expected\":'; then\n EXPECTED=$(echo \"$BODY\" | grep -o '\"expected\":\"[^\"]*\"' | head -1 | cut -d'\"' -f4)\n ACTUAL=$(echo \"$BODY\" | grep -o '\"actual\":\"[^\"]*\"' | head -1 | cut -d'\"' -f4)\n echo \"[FATAL] SCHEMA_SKEW: @selvajs/selva@\\${AFTER:-$LATEST} expects database migration head \\${EXPECTED:-(unknown)},\"\n echo \"[FATAL] but this database is at \\${ACTUAL:-(unavailable)}. The new version is fine — its migrations\"\n echo \"[FATAL] were never applied. Retrying the update WILL fail again in exactly the same way.\"\n echo \"[FATAL] The update does not apply migrations itself: they are not reversible, so an\"\n echo \"[FATAL] auto-migrate followed by a rollback would leave code and database on different heads.\"\n echo \"[FATAL] Apply them yourself, then re-run the update:\"\n echo \"[FATAL] cd $(dirname \"$ECOSYSTEM\")\"\n echo \"[FATAL] npm install --prefer-online @selvajs/supabase-provider@$TAG\"\n echo \"[FATAL] npx selva-supabase\"\n echo \"[FATAL] npx supabase db push\"\n echo \"[FATAL] The provider install is not optional: the migration SQL ships inside that\"\n echo \"[FATAL] package, and the update only moves @selvajs/cli and @selvajs/selva — so a sync\"\n echo \"[FATAL] without it copies 0 files and the push reports 'up to date' having done nothing.\"\n echo \"[FATAL] If db push asks for credentials, see docs/self-hosting/providers/supabase.md\"\n echo \"[FATAL] — it needs a Supabase ACCOUNT credential (supabase login, or SUPABASE_ACCESS_TOKEN),\"\n echo \"[FATAL] which is not any of the three keys in .env.\"\n elif echo \"$BODY\" | grep -qE '\"plaintextFound\":true|\"failures\":\\\\[[^]]'; then\n echo \"[FATAL] AT_REST_SECRETS: stored compute server API keys could not be decrypted under the\"\n echo \"[FATAL] current SELVA_AT_REST_KEY. This is a configuration problem on this host, not a\"\n echo \"[FATAL] fault in the new version — retrying the update will fail the same way.\"\n echo \"[FATAL] Re-enter the affected keys at /admin/compute, or restore the original\"\n echo \"[FATAL] SELVA_AT_REST_KEY, then re-run the update.\"\n else\n echo \"[FATAL] The health endpoint did not report a known cause. Inspect the body above and\"\n echo \"[FATAL] \\\\\\`pm2 logs selva-compute\\\\\\` for what the new version failed on.\"\n fi\n\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\"\n\"$PM2\" stop selva-compute >/dev/null 2>&1 || true\nwait_until_stopped >/dev/null 2>&1\n# Restore @selvajs/cli alongside the runtime: the forward step installs both at\n# the channel tag, so reverting only the runtime leaves a version pair that was\n# never released together.\nif ! npm install --save \"@selvajs/cli@$BEFORE\" \"@selvajs/selva@$BEFORE\"; then\n echo \"[FATAL] Rollback npm install failed — EXIT trap will retry restart.\"\n exit 4\nfi\n\nstart_app || 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}\n\n// Selva self-updates as a CLI-scaffolded npm deployment: the deployment dir\n// holds a package.json that depends on @selvajs/selva, and update means\n// `npm install @selvajs/*@<tag>` + pm2 restart. Deployment-dir detection\n// (cwd-upward probe, `INSTALL_DIR` override) lives in `selfUpdate.server.ts`,\n// shared with the outcome reconciler and the log path.\nexport type UpdatePlan = { cwd: string; args: string[] };\n\n// Only the CLI and the runtime move. Provider code is bundled into\n// @selvajs/selva; @selvajs/supabase-provider carries just the migration SQL,\n// which the operator installs and pushes before updating.\n//\n// `npm install` pins to the channel's dist-tag rather than using `npm\n// update`, because `update` only ever moves FORWARD within the installed\n// semver range — it can't switch dist-tags or DOWNGRADE. Pinning to @latest /\n// @beta makes one command serve every transition: forward stable bumps,\n// beta→newer-beta, and the revert case (beta→stable lands on an older version).\n//\n// --save persists the resolved version into package.json so the next plain\n// install is reproducible; --prefer-online forces npm to revalidate cached\n// packuments against the registry — without it, npm's packument cache (5+\n// min TTL) can silently no-op right after publish.\nexport function npmInstallArgs(channel: ReleaseChannel): string[] {\n\tconst tag = channelTag(channel);\n\treturn ['install', '--save', '--prefer-online', `@selvajs/cli@${tag}`, `@selvajs/selva@${tag}`];\n}\n\nexport function detectUpdatePlan(\n\tenv: Record<string, string | undefined>,\n\tchannel: ReleaseChannel\n): UpdatePlan | null {\n\tconst dir = findDeploymentDir(env);\n\treturn dir ? { cwd: dir, args: npmInstallArgs(channel) } : null;\n}\n","import { spawn } from 'child_process';\nimport { join } from 'path';\nimport { readFileSync, writeFileSync } from 'fs';\nimport { env } from '#lib/server/env.js';\nimport { json } from '@sveltejs/kit';\nimport { actorFrom } from '@selvajs/platform';\nimport type { RequestHandler } from './$types';\nimport { requirePermission } from '#lib/server/access.server.js';\nimport { renderThrown } from '@selvajs/server/logging';\nimport { checkForUpdate } from '#lib/server/updateCheck.server.js';\nimport { readChannel, channelTag } from '#lib/server/releaseChannel.server.js';\nimport { getEventSink, getErrorReporter } from '#lib/server/providers.server.js';\nimport {\n\tfindDeploymentDir,\n\tstartUpdateOutcomeReconciler,\n\tupdateLogPath,\n\tupdateStatePath,\n\ttype PendingUpdateState\n} from '#lib/server/selfUpdate.server.js';\nimport {\n\treadRuntimeVersion,\n\tbuildLauncher,\n\tbuildNpmRunnerScript,\n\tdetectUpdatePlan\n} from '#lib/server/updateRunner.server.js';\n\n// Where the bash wrapper mirrors all script output (`updateLogPath` — in the\n// deployment dir so it survives reboots, audit O2). The SSE stream dies the\n// moment `pm2 stop selva-compute` succeeds (selva-compute IS the SSE server),\n// so the frontend loses visibility into everything that happens after — npm\n// update output, pm2 start result, health-probe results, rollback decisions.\n// The script keeps writing to this file regardless. Once the new selva-compute\n// process is back up, the frontend polls GET on this same route to fetch the\n// full log and reveal what happened during the blackout. One log per update —\n// the wrapper truncates at start, so we never carry stale content forward.\n// The runner's `[EXIT] code=N` marker in the same log also drives the\n// post-restart audit-event reconciliation (`selfUpdate.server.ts`).\n\n// Strip ANSI escape codes from terminal output\nfunction stripAnsi(str: string): string {\n\t// eslint-disable-next-line no-control-regex\n\treturn str.replace(/\\x1B\\[[0-9;]*[mGKHF]/g, '');\n}\n\n// POST - Run update and stream output via Server-Sent Events.\n//\n// Runs `npm update @selvajs/*` then restarts via ecosystem.config.cjs. The\n// runner script handles stop / update / start / health-probe / rollback with\n// an EXIT trap that keeps the app online no matter how it exits.\nexport const POST: RequestHandler = async ({ locals }) => {\n\trequirePermission(locals, 'instance_admin');\n\n\tconst channel = readChannel();\n\tconst plan = detectUpdatePlan(env, channel);\n\tif (!plan) {\n\t\treturn new Response(\n\t\t\tJSON.stringify({\n\t\t\t\terror:\n\t\t\t\t\t\"Couldn't determine how to update this deployment. \" +\n\t\t\t\t\t'Expected node_modules/@selvajs/selva (CLI scaffold) in the cwd ' +\n\t\t\t\t\t'or a parent directory.'\n\t\t\t}),\n\t\t\t{ status: 500, headers: { 'Content-Type': 'application/json' } }\n\t\t);\n\t}\n\n\t// Capture the runtime version BEFORE we touch anything, so we can:\n\t// (a) detect a no-op update and warn, (b) roll back to the prior version\n\t// if the new process fails to come up healthy.\n\tconst versionBefore = readRuntimeVersion(plan.cwd);\n\tconst actorId = locals.ctx ? actorFrom(locals.ctx) : 'system';\n\n\t// Audit trail (O2): `started` now; the terminal event is emitted by the\n\t// outcome reconciler after the app restarts (this process is killed\n\t// mid-update). The state file is the reconciler's emission token.\n\tconst pending: PendingUpdateState = {\n\t\tstartedAt: new Date().toISOString(),\n\t\tactorId,\n\t\tchannel,\n\t\tfromVersion: versionBefore\n\t};\n\ttry {\n\t\twriteFileSync(updateStatePath(plan.cwd), JSON.stringify(pending, null, '\\t'));\n\t} catch (err) {\n\t\tlocals.log.error('Could not persist pending-update state', {\n\t\t\tcomponent: 'selfUpdate',\n\t\t\terr: renderThrown(err)\n\t\t});\n\t}\n\tawait getEventSink().emit({\n\t\ttype: 'system.update.started',\n\t\tchannel,\n\t\tfromVersion: versionBefore,\n\t\tactorId\n\t});\n\n\tconst stream = new ReadableStream({\n\t\tstart(controller) {\n\t\t\tconst encoder = new TextEncoder();\n\n\t\t\tfunction sendEvent(type: string, data: Record<string, unknown>) {\n\t\t\t\tconst message = `data: ${JSON.stringify({ type, ...data })}\\n\\n`;\n\t\t\t\tcontroller.enqueue(encoder.encode(message));\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Prelude lines are passed to the bash wrapper rather than\n\t\t\t\t// sendEvent'd directly so they end up in both the SSE stream\n\t\t\t\t// (via bash stdout) AND the log file (via tee). Without this,\n\t\t\t\t// the frontend's blackout-recovery file fetch would clobber\n\t\t\t\t// these lines when it replaces its buffer with the file content.\n\t\t\t\tconst prelude = [\n\t\t\t\t\t`[INFO] Updating deployment (cwd: ${plan.cwd}, channel: ${channel})`,\n\t\t\t\t\t...(versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : [])\n\t\t\t\t];\n\n\t\t\t\t// Spawn the launcher detached. The launcher writes the actual\n\t\t\t\t// runner script to disk, daemonizes it (setsid + & + exit),\n\t\t\t\t// and quits — leaving the runner with PPID=1 so PM2's tree-kill\n\t\t\t\t// of selva-compute can't reach it. See buildLauncher for the\n\t\t\t\t// full rationale.\n\t\t\t\t//\n\t\t\t\t// The runner is buildNpmRunnerScript — pre-flights the version\n\t\t\t\t// check, then stop / npm update / start / health probe /\n\t\t\t\t// rollback, with an EXIT trap that ensures the app is online no\n\t\t\t\t// matter how the script exits.\n\t\t\t\tconst runnerScript = buildNpmRunnerScript(\n\t\t\t\t\tplan.args,\n\t\t\t\t\tversionBefore,\n\t\t\t\t\tjoin(plan.cwd, 'ecosystem.config.cjs'),\n\t\t\t\t\tchannelTag(channel)\n\t\t\t\t);\n\t\t\t\tconst cmd = 'bash';\n\t\t\t\tconst args = ['-c', buildLauncher(runnerScript, updateLogPath(plan.cwd), prelude)];\n\n\t\t\t\t// Prepend the deployment's node_modules/.bin to PATH so the bash\n\t\t\t\t// script finds the project-local pm2 (and any other tooling\n\t\t\t\t// installed as a deployment dependency). Without this the script\n\t\t\t\t// inherits the SvelteKit process's PATH, which on most servers\n\t\t\t\t// doesn't include node_modules/.bin — so `pm2` resolves to\n\t\t\t\t// whatever's globally installed, or fails outright if no global\n\t\t\t\t// pm2 exists. Both are wrong: we want the project-local pm2 so\n\t\t\t\t// daemon and CLI stay aligned. Mirrors the local-only resolution\n\t\t\t\t// in @selvajs/cli's pm2Bin().\n\t\t\t\tconst localBin = join(plan.cwd, 'node_modules', '.bin');\n\t\t\t\tconst child = spawn(cmd, args, {\n\t\t\t\t\tcwd: plan.cwd,\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tPATH: `${localBin}:${process.env.PATH ?? ''}`,\n\n\t\t\t\t\t\tHOME: process.env.HOME,\n\t\t\t\t\t\tINSTALL_DIR: plan.cwd\n\t\t\t\t\t},\n\t\t\t\t\tdetached: true,\n\t\t\t\t\tstdio: ['ignore', 'pipe', 'pipe']\n\t\t\t\t});\n\t\t\t\tchild.unref();\n\n\t\t\t\t// Covers the outcomes that DON'T restart this process (pre-flight\n\t\t\t\t// \"already up to date\", early failures): this process is still\n\t\t\t\t// alive to reconcile them. A real update kills this process; the\n\t\t\t\t// restarted one re-arms the reconciler from hooks.server.ts.\n\t\t\t\tstartUpdateOutcomeReconciler({\n\t\t\t\t\tdeploymentDir: plan.cwd,\n\t\t\t\t\temit: (e) => getEventSink().emit(e),\n\t\t\t\t\treport: (err) => getErrorReporter().capture(err, { tags: { origin: 'selfUpdate' } })\n\t\t\t\t});\n\n\t\t\t\t// Kill the process if it runs longer than 15 minutes.\n\t\t\t\t// The child is detached (its own process group), so signal the\n\t\t\t\t// whole group via negative pid — otherwise descendants (pnpm,\n\t\t\t\t// node, pm2) outlive the bash wrapper.\n\t\t\t\tconst timeout = setTimeout(\n\t\t\t\t\t() => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (child.pid) process.kill(-child.pid, 'SIGTERM');\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// group already gone — nothing to do\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendEvent('log', { data: '[FATAL] Update timed out after 15 minutes' });\n\t\t\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t},\n\t\t\t\t\t15 * 60 * 1000\n\t\t\t\t);\n\n\t\t\t\t// Stream stdout\n\t\t\t\tlet restarting = false;\n\t\t\t\tchild.stdout.on('data', (data) => {\n\t\t\t\t\tconst lines = data.toString().split('\\n');\n\t\t\t\t\tfor (const line of lines) {\n\t\t\t\t\t\tconst clean = stripAnsi(line).trim();\n\t\t\t\t\t\tif (clean) {\n\t\t\t\t\t\t\t// Detect both stopProcessId (pm2 restart) and restartProcessId (pm2 reload)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!restarting &&\n\t\t\t\t\t\t\t\t(clean.includes('Applying action stopProcessId') ||\n\t\t\t\t\t\t\t\t\tclean.includes('Applying action restartProcessId'))\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\trestarting = true;\n\t\t\t\t\t\t\t\tsendEvent('restarting', { data: clean });\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsendEvent('log', { data: clean });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Stream stderr\n\t\t\t\tchild.stderr.on('data', (data) => {\n\t\t\t\t\tconst lines = data.toString().split('\\n');\n\t\t\t\t\tfor (const line of lines) {\n\t\t\t\t\t\tconst clean = stripAnsi(line).trim();\n\t\t\t\t\t\tif (clean) {\n\t\t\t\t\t\t\tsendEvent('log', { data: `[ERROR] ${clean}` });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Handle process exit\n\t\t\t\tchild.on('close', (code) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tsendEvent('exit', { code: code ?? -1 });\n\t\t\t\t\tcontroller.close();\n\t\t\t\t});\n\n\t\t\t\t// Handle errors\n\t\t\t\tchild.on('error', (err) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tsendEvent('log', { data: `[FATAL] ${err.message}` });\n\t\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\t\tcontroller.close();\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tsendEvent('log', { data: `[FATAL] Failed to spawn process: ${err}` });\n\t\t\t\tsendEvent('exit', { code: -1 });\n\t\t\t\tcontroller.close();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn new Response(stream, {\n\t\theaders: {\n\t\t\t'Content-Type': 'text/event-stream',\n\t\t\t'Cache-Control': 'no-cache',\n\t\t\tConnection: 'keep-alive'\n\t\t}\n\t});\n};\n\n// GET — two jobs, selected by query param:\n//\n// ?check=1 → query the npm registry and report whether a newer\n// @selvajs/selva is published. JSON: { current, latest,\n// updateAvailable }. The admin page calls this on load to show\n// an \"update available\" badge. Degrades gracefully: if the\n// registry is unreachable, latest is null and updateAvailable\n// is false (we never block the page on npm).\n//\n// (default) → read the tee'd update log so the frontend can recover the\n// chunk of output that happened during the SSE blackout (between\n// `pm2 stop` killing this process and the new selva-compute\n// coming back online). Empty body if no update has run yet.\n// Polled by the admin UI during the post-restart wait.\nexport const GET: RequestHandler = async ({ locals, url, fetch }) => {\n\trequirePermission(locals, 'instance_admin');\n\n\tif (url.searchParams.get('check') !== null) {\n\t\treturn json(await checkForUpdate(fetch, readChannel()), {\n\t\t\theaders: { 'Cache-Control': 'no-store' }\n\t\t});\n\t}\n\n\tlet body = '';\n\ttry {\n\t\tbody = readFileSync(updateLogPath(findDeploymentDir(env)), 'utf8');\n\t} catch {\n\t\t// Log doesn't exist (no update has run yet). Empty body is correct —\n\t\t// the frontend treats no content as \"nothing to show yet\".\n\t}\n\treturn new Response(body, {\n\t\theaders: {\n\t\t\t'Content-Type': 'text/plain; charset=utf-8',\n\t\t\t'Cache-Control': 'no-store'\n\t\t}\n\t});\n};\n"],"mappings":"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"}
|
|
@@ -9,7 +9,7 @@ return {
|
|
|
9
9
|
app_path: "_app",
|
|
10
10
|
assets: new Set(["baseHDR.hdr","favicon/apple-touch-icon.png","favicon/favicon-96x96.png","favicon/favicon.ico","favicon/favicon.svg","favicon/site.webmanifest","favicon/web-app-manifest-192x192.png","favicon/web-app-manifest-512x512.png","robots.txt"]),
|
|
11
11
|
mime_types: {".png":"image/png",".ico":"image/x-icon",".svg":"image/svg+xml",".webmanifest":"application/manifest+json",".txt":"text/plain"},
|
|
12
|
-
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.
|
|
12
|
+
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.CN37JsEV.js",imports:["_app/immutable/entry/start.BW9gOvFV.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CRzLMJPS.js","_app/immutable/chunks/DUooINX6.js","_app/immutable/chunks/BRA_lgsI.js","_app/immutable/chunks/sphvlIzg.js","_app/immutable/chunks/Cyt8LZpN.js","_app/immutable/chunks/BFJ8iwO4.js","_app/immutable/entry/app.CN37JsEV.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
13
13
|
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
package/build/server/manifest.js
CHANGED
|
@@ -9,7 +9,7 @@ return {
|
|
|
9
9
|
app_path: "_app",
|
|
10
10
|
assets: new Set(["baseHDR.hdr","favicon/apple-touch-icon.png","favicon/favicon-96x96.png","favicon/favicon.ico","favicon/favicon.svg","favicon/site.webmanifest","favicon/web-app-manifest-192x192.png","favicon/web-app-manifest-512x512.png","robots.txt"]),
|
|
11
11
|
mime_types: {".png":"image/png",".ico":"image/x-icon",".svg":"image/svg+xml",".webmanifest":"application/manifest+json",".txt":"text/plain"},
|
|
12
|
-
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.
|
|
12
|
+
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.CN37JsEV.js",imports:["_app/immutable/entry/start.BW9gOvFV.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CRzLMJPS.js","_app/immutable/chunks/DUooINX6.js","_app/immutable/chunks/BRA_lgsI.js","_app/immutable/chunks/sphvlIzg.js","_app/immutable/chunks/Cyt8LZpN.js","_app/immutable/chunks/BFJ8iwO4.js","_app/immutable/entry/app.CN37JsEV.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
13
13
|
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
package/build/server/nodes/15.js
CHANGED
|
@@ -5,6 +5,6 @@ let component_cache;
|
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/pages/admin/system/_page.svelte.js')).default;
|
|
6
6
|
export { server };
|
|
7
7
|
export const server_id = "src/routes/admin/system/+page.server.ts";
|
|
8
|
-
export const imports = ["_app/immutable/nodes/15.
|
|
8
|
+
export const imports = ["_app/immutable/nodes/15.BXIV1QfS.js","_app/immutable/chunks/sphvlIzg.js","_app/immutable/chunks/CoRMsLUN.js","_app/immutable/chunks/BRA_lgsI.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/Cyt8LZpN.js","_app/immutable/chunks/BFJ8iwO4.js","_app/immutable/chunks/BHnRUwtv.js","_app/immutable/chunks/Ca-1xMUo.js","_app/immutable/chunks/BbFMtSJ8.js","_app/immutable/chunks/DNFu5yLd.js","_app/immutable/chunks/OznVWGiS.js","_app/immutable/chunks/BJGlbpZ0.js","_app/immutable/chunks/B187F-XR.js","_app/immutable/chunks/CivEAG-M.js","_app/immutable/chunks/gNgZDPHs.js","_app/immutable/chunks/rIQJtl5L.js","_app/immutable/chunks/nJUe9gXb.js","_app/immutable/chunks/CNkLk5_8.js","_app/immutable/chunks/Djv8qD_2.js","_app/immutable/chunks/CdTxvcQ4.js","_app/immutable/chunks/CNij7yXO.js","_app/immutable/chunks/BuCeXb-q.js","_app/immutable/chunks/DcS7V4T3.js","_app/immutable/chunks/BLG35vEW.js","_app/immutable/chunks/TZzCN567.js","_app/immutable/chunks/B9-uqzXO.js","_app/immutable/chunks/Cms9vBTq.js","_app/immutable/chunks/CUaHcctM.js","_app/immutable/chunks/CK2nnbJa.js","_app/immutable/chunks/D_-42ATH.js","_app/immutable/chunks/1AvDtYi1.js","_app/immutable/chunks/DR4HRB4w.js","_app/immutable/chunks/DtmJiR65.js","_app/immutable/chunks/B8LXiPqe.js","_app/immutable/chunks/ByPYmSUR.js","_app/immutable/chunks/Bx2qumU5.js","_app/immutable/chunks/fJvE1weH.js","_app/immutable/chunks/DIYaLgLs.js","_app/immutable/chunks/LbAo7oFZ.js"];
|
|
9
9
|
export const stylesheets = [];
|
|
10
10
|
export const fonts = [];
|
package/build/server/server.js
CHANGED
|
@@ -10,7 +10,7 @@ return {
|
|
|
10
10
|
app_path: "_app",
|
|
11
11
|
assets: new Set(["baseHDR.hdr","favicon/apple-touch-icon.png","favicon/favicon-96x96.png","favicon/favicon.ico","favicon/favicon.svg","favicon/site.webmanifest","favicon/web-app-manifest-192x192.png","favicon/web-app-manifest-512x512.png","robots.txt"]),
|
|
12
12
|
mime_types: {".png":"image/png",".ico":"image/x-icon",".svg":"image/svg+xml",".webmanifest":"application/manifest+json",".txt":"text/plain"},
|
|
13
|
-
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.
|
|
13
|
+
client: {start:"_app/immutable/entry/start.BW9gOvFV.js",app:"_app/immutable/entry/app.CN37JsEV.js",imports:["_app/immutable/entry/start.BW9gOvFV.js","_app/immutable/entry/payload.DSmR2FwN.js","_app/immutable/chunks/CRzLMJPS.js","_app/immutable/chunks/DUooINX6.js","_app/immutable/chunks/BRA_lgsI.js","_app/immutable/chunks/sphvlIzg.js","_app/immutable/chunks/Cyt8LZpN.js","_app/immutable/chunks/BFJ8iwO4.js","_app/immutable/entry/app.CN37JsEV.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
14
|
|
|
15
15
|
nodes: [
|
|
16
16
|
__memo(() => import('./nodes/0.js')),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selvajs/selva",
|
|
3
|
-
"version": "4.20.0-beta.
|
|
3
|
+
"version": "4.20.0-beta.30",
|
|
4
4
|
"description": "Selva — self-contained Grasshopper-driven web app. Install, configure via .env, deploy.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VektorNode",
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
"rimraf": "^6.1.3",
|
|
59
59
|
"tw-animate-css": "^1.4.0",
|
|
60
60
|
"vitest": "^5.0.5",
|
|
61
|
+
"@selvajs/compute": "5.0.0-beta.10",
|
|
61
62
|
"@selvajs/config": "0.0.4",
|
|
62
63
|
"@selvajs/header-auth-provider": "0.11.1",
|
|
63
|
-
"@selvajs/local-provider": "0.16.0-beta.6",
|
|
64
64
|
"@selvajs/mcp": "0.1.0-beta.8",
|
|
65
|
-
"@selvajs/
|
|
65
|
+
"@selvajs/local-provider": "0.16.0-beta.6",
|
|
66
66
|
"@selvajs/notifications": "0.3.0-beta.12",
|
|
67
67
|
"@selvajs/platform": "1.0.0-beta.12",
|
|
68
|
-
"@selvajs/schemas": "5.3.0-beta.3",
|
|
69
|
-
"@selvajs/server": "2.0.0-beta.26",
|
|
70
68
|
"@selvajs/solve": "2.0.0-beta.13",
|
|
71
|
-
"@selvajs/
|
|
69
|
+
"@selvajs/server": "2.0.0-beta.26",
|
|
70
|
+
"@selvajs/schemas": "5.3.0-beta.3",
|
|
72
71
|
"@selvajs/ui": "6.6.0-beta.20",
|
|
72
|
+
"@selvajs/supabase-provider": "0.20.0-beta.9",
|
|
73
73
|
"@selvajs/visualization": "1.6.0-beta.11"
|
|
74
74
|
},
|
|
75
75
|
"imports": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|