@selvajs/selva 4.6.21-beta.0 → 4.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/chunks/{BRbaYEL5.js → 9i3rf9gV.js} +1 -1
- package/build/client/_app/immutable/chunks/9i3rf9gV.js.br +0 -0
- package/build/client/_app/immutable/chunks/9i3rf9gV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{zOoVG74V.js → BUuRpU5m.js} +1 -1
- package/build/client/_app/immutable/chunks/BUuRpU5m.js.br +0 -0
- package/build/client/_app/immutable/chunks/BUuRpU5m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{COYKudi0.js → C1lje54W.js} +1 -1
- package/build/client/_app/immutable/chunks/C1lje54W.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1lje54W.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{I2TM0do6.js → CNzANXEE.js} +1 -1
- package/build/client/_app/immutable/chunks/CNzANXEE.js.br +0 -0
- package/build/client/_app/immutable/chunks/CNzANXEE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CYwmPsLn.js → CZrHjFO_.js} +1 -1
- package/build/client/_app/immutable/chunks/CZrHjFO_.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZrHjFO_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B2u4e1Y9.js → CtQi8B_W.js} +5 -5
- package/build/client/_app/immutable/chunks/CtQi8B_W.js.br +0 -0
- package/build/client/_app/immutable/chunks/CtQi8B_W.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D0ZkELYt.js +2 -0
- package/build/client/_app/immutable/chunks/D0ZkELYt.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0ZkELYt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DvWy04ZP.js +2 -0
- package/build/client/_app/immutable/chunks/DvWy04ZP.js.br +0 -0
- package/build/client/_app/immutable/chunks/DvWy04ZP.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.CRaXT8K-.js → app.CHLvYXSV.js} +2 -2
- package/build/client/_app/immutable/entry/app.CHLvYXSV.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CHLvYXSV.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.x7J2Q5dO.js +1 -0
- package/build/client/_app/immutable/entry/start.x7J2Q5dO.js.br +2 -0
- package/build/client/_app/immutable/entry/start.x7J2Q5dO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.DPMP9Es7.js → 1.DHaPDVfK.js} +1 -1
- package/build/client/_app/immutable/nodes/1.DHaPDVfK.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DHaPDVfK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.O0oWpOpl.js +3 -0
- package/build/client/_app/immutable/nodes/10.O0oWpOpl.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.O0oWpOpl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.BxhrIetk.js → 11.DhYj36Fk.js} +1 -1
- package/build/client/_app/immutable/nodes/11.DhYj36Fk.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DhYj36Fk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.bzJyaCKt.js → 13.CfJOch3J.js} +1 -1
- package/build/client/_app/immutable/nodes/13.CfJOch3J.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.CfJOch3J.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.XVGDZn7V.js → 14.DisTiyB2.js} +1 -1
- package/build/client/_app/immutable/nodes/14.DisTiyB2.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.DisTiyB2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.Ds7J6ry6.js → 15.A437nu0T.js} +1 -1
- package/build/client/_app/immutable/nodes/15.A437nu0T.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.A437nu0T.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.C6HKDHv3.js → 16.B9S-bV_g.js} +1 -1
- package/build/client/_app/immutable/nodes/16.B9S-bV_g.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.B9S-bV_g.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{17.BxjH0QZF.js → 17.BRN_aGIk.js} +1 -1
- package/build/client/_app/immutable/nodes/17.BRN_aGIk.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.BRN_aGIk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{19.BU2Lw57i.js → 19.DwCFMX9M.js} +1 -1
- package/build/client/_app/immutable/nodes/19.DwCFMX9M.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.DwCFMX9M.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.D9dN-poH.js → 2.DP5fYr4M.js} +1 -1
- package/build/client/_app/immutable/nodes/2.DP5fYr4M.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DP5fYr4M.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.nfHXDL2z.js +5414 -0
- package/build/client/_app/immutable/nodes/20.nfHXDL2z.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.nfHXDL2z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{21.qpo7v5r_.js → 21.OD5sg0NU.js} +1 -1
- package/build/client/_app/immutable/nodes/21.OD5sg0NU.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.OD5sg0NU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/23.CNjTTgpk.js +16 -0
- package/build/client/_app/immutable/nodes/23.CNjTTgpk.js.br +0 -0
- package/build/client/_app/immutable/nodes/23.CNjTTgpk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{24.BSJH1lHT.js → 24.CEgabT6P.js} +1 -1
- package/build/client/_app/immutable/nodes/24.CEgabT6P.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.CEgabT6P.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{27.BKQucFUA.js → 27.CRIaBHAx.js} +1 -1
- package/build/client/_app/immutable/nodes/27.CRIaBHAx.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.CRIaBHAx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{28.BleEhT0J.js → 28.BC6m2tWk.js} +1 -1
- package/build/client/_app/immutable/nodes/28.BC6m2tWk.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.BC6m2tWk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{29.fAbDo5Et.js → 29.BFYPdg-j.js} +1 -1
- package/build/client/_app/immutable/nodes/29.BFYPdg-j.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.BFYPdg-j.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.XubMG-dn.js → 3.J7HfMiHi.js} +1 -1
- package/build/client/_app/immutable/nodes/3.J7HfMiHi.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.J7HfMiHi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{30.DRrc_hLr.js → 30.60AXFjfN.js} +1 -1
- package/build/client/_app/immutable/nodes/30.60AXFjfN.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.60AXFjfN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.C77UuNpH.js → 5.CLnvzJQ1.js} +1 -1
- package/build/client/_app/immutable/nodes/5.CLnvzJQ1.js.br +1 -0
- package/build/client/_app/immutable/nodes/5.CLnvzJQ1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.B23L8hA_.js → 6.8mUhfqtj.js} +1 -1
- package/build/client/_app/immutable/nodes/6.8mUhfqtj.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.8mUhfqtj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.BZj0oAjH.js → 7.Bu0PYCkD.js} +1 -1
- package/build/client/_app/immutable/nodes/7.Bu0PYCkD.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.Bu0PYCkD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.CGy_fUC4.js → 8.CzmdM7pu.js} +1 -1
- package/build/client/_app/immutable/nodes/8.CzmdM7pu.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CzmdM7pu.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.BpEiOuN0.js → 9.BogAwqgH.js} +1 -1
- package/build/client/_app/immutable/nodes/9.BogAwqgH.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.BogAwqgH.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/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{access.server.js-D99g5hZd.js → access.server.js-_nJWuQcN.js} +66 -51
- package/build/server/chunks/chunks/access.server.js-_nJWuQcN.js.map +1 -0
- package/build/server/chunks/chunks/{admin-auth.server.js-hCWF6Pqg.js → admin-auth.server.js-CitjWnKM.js} +53 -31
- package/build/server/chunks/chunks/admin-auth.server.js-CitjWnKM.js.map +1 -0
- package/build/server/chunks/chunks/{api-errors.js-yRMzxqNi.js → api-errors.js-DlfcfPJs.js} +4 -4
- package/build/server/chunks/chunks/{api-errors.js-yRMzxqNi.js.map → api-errors.js-DlfcfPJs.js.map} +1 -1
- package/build/server/chunks/chunks/{auth-bootstrap.server.js-BpQr_I_2.js → auth-bootstrap.server.js-S-F5QI4m.js} +3 -3
- package/build/server/chunks/chunks/{auth-bootstrap.server.js-BpQr_I_2.js.map → auth-bootstrap.server.js-S-F5QI4m.js.map} +1 -1
- package/build/server/chunks/chunks/{bootHealth.server.js-CxNJCaGf.js → bootHealth.server.js-CvLSuL2x.js} +27 -4
- package/build/server/chunks/chunks/bootHealth.server.js-CvLSuL2x.js.map +1 -0
- package/build/server/chunks/chunks/{clientCache.server.js-nl8vnalG.js → clientCache.server.js-BS8-NdiI.js} +21 -5
- package/build/server/chunks/chunks/clientCache.server.js-BS8-NdiI.js.map +1 -0
- package/build/server/chunks/chunks/computeLimits.js-CQh4jXlX.js +28 -0
- package/build/server/chunks/chunks/computeLimits.js-CQh4jXlX.js.map +1 -0
- package/build/server/chunks/chunks/{context.js-D8E0GFTw.js → context.js-DsQGiS2x.js} +4 -1
- package/build/server/chunks/chunks/context.js-DsQGiS2x.js.map +1 -0
- package/build/server/chunks/chunks/{evictChangedServers.js-AKiDolw-.js → evictChangedServers.js-R3UCE6wP.js} +2 -2
- package/build/server/chunks/chunks/{evictChangedServers.js-AKiDolw-.js.map → evictChangedServers.js-R3UCE6wP.js.map} +1 -1
- package/build/server/chunks/chunks/{internal2.js-CNimHS8p.js → internal2.js-BBcEKa-m.js} +3 -3
- package/build/server/chunks/chunks/{internal2.js-CNimHS8p.js.map → internal2.js-BBcEKa-m.js.map} +1 -1
- package/build/server/chunks/chunks/{org-members.server.js-HahiM88D.js → org-members.server.js-DskaqUJo.js} +2 -2
- package/build/server/chunks/chunks/{org-members.server.js-HahiM88D.js.map → org-members.server.js-DskaqUJo.js.map} +1 -1
- package/build/server/chunks/chunks/{package.js-CGjshiZJ.js → package.js-Cl0z1gce.js} +2 -2
- package/build/server/chunks/chunks/package.js-Cl0z1gce.js.map +1 -0
- package/build/server/chunks/chunks/{permissions-compat.server.js-BfoBZYSH.js → permissions-compat.server.js-DNsLyriU.js} +2 -2
- package/build/server/chunks/chunks/{permissions-compat.server.js-BfoBZYSH.js.map → permissions-compat.server.js-DNsLyriU.js.map} +1 -1
- package/build/server/chunks/chunks/{permissions.server.js-B9lpLFEj.js → permissions.server.js-C3_SFjUh.js} +2 -2
- package/build/server/chunks/chunks/{permissions.server.js-B9lpLFEj.js.map → permissions.server.js-C3_SFjUh.js.map} +1 -1
- package/build/server/chunks/chunks/{providers.server.js-D0hpk-aq.js → providers.server.js-CIHOepKv.js} +152 -34
- package/build/server/chunks/chunks/providers.server.js-CIHOepKv.js.map +1 -0
- package/build/server/chunks/chunks/redirect.js-1CZ30qn2.js +9 -0
- package/build/server/chunks/chunks/redirect.js-1CZ30qn2.js.map +1 -0
- package/build/server/chunks/chunks/{resolve.server.js-CtUK_9yC.js → resolve.server.js-Dg1o2vnd.js} +4 -4
- package/build/server/chunks/chunks/{resolve.server.js-CtUK_9yC.js.map → resolve.server.js-Dg1o2vnd.js.map} +1 -1
- package/build/server/chunks/chunks/selfUpdate.server.js-CXejyqIT.js +109 -0
- package/build/server/chunks/chunks/selfUpdate.server.js-CXejyqIT.js.map +1 -0
- package/build/server/chunks/chunks/solve-cache-key.js-BIwJfBG9.js +320 -0
- package/build/server/chunks/chunks/solve-cache-key.js-BIwJfBG9.js.map +1 -0
- package/build/server/chunks/chunks/token-codec.js-1RPNe2RW.js +32 -0
- package/build/server/chunks/chunks/token-codec.js-1RPNe2RW.js.map +1 -0
- package/build/server/chunks/chunks/{token.server.js-q3fv9Fqo.js → token.server.js-DbTfFk9r.js} +10 -6
- package/build/server/chunks/chunks/token.server.js-DbTfFk9r.js.map +1 -0
- package/build/server/chunks/chunks/{token2.server.js-Cqw1dJj-.js → token2.server.js-Cjb4XaWC.js} +10 -6
- package/build/server/chunks/chunks/token2.server.js-Cjb4XaWC.js.map +1 -0
- package/build/server/chunks/chunks/update-outcome.js-mUyfVCnt.js +99 -0
- package/build/server/chunks/chunks/update-outcome.js-mUyfVCnt.js.map +1 -0
- package/build/server/chunks/chunks/{utils4.js-BRotGwxx.js → utils4.js-8SHxuGTr.js} +2 -2
- package/build/server/chunks/chunks/{utils4.js-BRotGwxx.js.map → utils4.js-8SHxuGTr.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/compute/{_server.ts.js-9SFgd7Dh.js → _server.ts.js-CR_1eCgH.js} +12 -9
- package/build/server/chunks/entries/endpoints/admin/api/compute/{_server.ts.js-9SFgd7Dh.js.map → _server.ts.js-CR_1eCgH.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/compute/actions/{_server.ts.js-nqqXR4_e.js → _server.ts.js-D1UFM_o6.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/compute/actions/{_server.ts.js-nqqXR4_e.js.map → _server.ts.js-D1UFM_o6.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/compute/status/{_server.ts.js-a2K9SJfi.js → _server.ts.js-DdzXkztc.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/compute/status/{_server.ts.js-a2K9SJfi.js.map → _server.ts.js-DdzXkztc.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/orgs/_id_/{_server.ts.js-BAhINzFq.js → _server.ts.js-CqdBKOC6.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/orgs/_id_/{_server.ts.js-BAhINzFq.js.map → _server.ts.js-CqdBKOC6.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/orgs/_id_/assets/_kind_/{_server.ts.js-DYD3g-28.js → _server.ts.js-Bi3NbLd3.js} +11 -7
- package/build/server/chunks/entries/endpoints/admin/api/orgs/_id_/assets/_kind_/{_server.ts.js-DYD3g-28.js.map → _server.ts.js-Bi3NbLd3.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/orgs/{_server.ts.js-PhwONmey.js → _server.ts.js-C3ZwVpyg.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/orgs/{_server.ts.js-PhwONmey.js.map → _server.ts.js-C3ZwVpyg.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/{_server.ts.js-DVXfLqfN.js → _server.ts.js-CAe8T4G6.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/{_server.ts.js-DVXfLqfN.js.map → _server.ts.js-CAe8T4G6.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/grants/_grantId_/{_server.ts.js-C3Gcr9vO.js → _server.ts.js-DHYHT1N8.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/grants/_grantId_/{_server.ts.js-C3Gcr9vO.js.map → _server.ts.js-DHYHT1N8.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/grants/{_server.ts.js-8rwkvJsL.js → _server.ts.js-Cgt7iGfE.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/projects/_id_/grants/{_server.ts.js-8rwkvJsL.js.map → _server.ts.js-Cgt7iGfE.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/projects/{_server.ts.js-BTgoWufU.js → _server.ts.js-BFi1Di59.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/projects/{_server.ts.js-BTgoWufU.js.map → _server.ts.js-BFi1Di59.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/system/health/{_server.ts.js-CQdxoaBS.js → _server.ts.js-Br7kd03s.js} +35 -6
- package/build/server/chunks/entries/endpoints/admin/api/system/health/_server.ts.js-Br7kd03s.js.map +1 -0
- package/build/server/chunks/entries/endpoints/admin/api/system/throughput/{_server.ts.js-DFacQgP7.js → _server.ts.js-ufKMuphM.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/system/throughput/{_server.ts.js-DFacQgP7.js.map → _server.ts.js-ufKMuphM.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/system/update/{_server.ts.js-y3dgQz-R.js → _server.ts.js-D-IGlEji.js} +43 -30
- package/build/server/chunks/entries/endpoints/admin/api/system/update/_server.ts.js-D-IGlEji.js.map +1 -0
- package/build/server/chunks/entries/endpoints/admin/api/users/_id_/{_server.ts.js-BEGaGEwg.js → _server.ts.js-7Efk1xkU.js} +8 -8
- package/build/server/chunks/entries/endpoints/admin/api/users/_id_/{_server.ts.js-BEGaGEwg.js.map → _server.ts.js-7Efk1xkU.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/users/_id_/disable/{_server.ts.js-CGwcR-7k.js → _server.ts.js-4UrDw7Q3.js} +6 -6
- package/build/server/chunks/entries/endpoints/admin/api/users/_id_/disable/{_server.ts.js-CGwcR-7k.js.map → _server.ts.js-4UrDw7Q3.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/admin/api/users/{_server.ts.js-D-z-Kl_c.js → _server.ts.js-B9ZWJoST.js} +9 -9
- package/build/server/chunks/entries/endpoints/admin/api/users/{_server.ts.js-D-z-Kl_c.js.map → _server.ts.js-B9ZWJoST.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/compute/{_server.ts.js-DkyT3FO6.js → _server.ts.js-D9qvgnX7.js} +287 -198
- package/build/server/chunks/entries/endpoints/api/compute/_server.ts.js-D9qvgnX7.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/compute/schema/{_server.ts.js-BmYC9zZb.js → _server.ts.js-CoS51dOD.js} +12 -8
- package/build/server/chunks/entries/endpoints/api/compute/schema/{_server.ts.js-BmYC9zZb.js.map → _server.ts.js-CoS51dOD.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/{_server.ts.js--cRkjXHi.js → _server.ts.js-D7jS25IN.js} +11 -7
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/{_server.ts.js--cRkjXHi.js.map → _server.ts.js-D7jS25IN.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/image/_filename_/{_server.ts.js-Dz0exqZ1.js → _server.ts.js-5hlsFhI1.js} +11 -7
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/image/_filename_/{_server.ts.js-Dz0exqZ1.js.map → _server.ts.js-5hlsFhI1.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/image/{_server.ts.js-CgM8FSl0.js → _server.ts.js-CRMcPOgH.js} +11 -7
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/image/{_server.ts.js-CgM8FSl0.js.map → _server.ts.js-CRMcPOgH.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/publish/{_server.ts.js-BQX0WanC.js → _server.ts.js-C8-AAq8y.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/publish/{_server.ts.js-BQX0WanC.js.map → _server.ts.js-C8-AAq8y.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/share-links/_linkId_/{_server.ts.js-BsV3i0Cq.js → _server.ts.js-LV0ZGJh9.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/share-links/_linkId_/{_server.ts.js-BsV3i0Cq.js.map → _server.ts.js-LV0ZGJh9.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/share-links/{_server.ts.js-DWFprR5Z.js → _server.ts.js-OUvpfSN4.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/share-links/{_server.ts.js-DWFprR5Z.js.map → _server.ts.js-OUvpfSN4.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/versions/{_server.ts.js-DA3K2FgH.js → _server.ts.js-BJxBKsrU.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/versions/{_server.ts.js-DA3K2FgH.js.map → _server.ts.js-BJxBKsrU.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/versions/_versionId_/{_server.ts.js-SHjs_zm9.js → _server.ts.js-BaHW7TEs.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/definitions/_guid_/versions/_versionId_/{_server.ts.js-SHjs_zm9.js.map → _server.ts.js-BaHW7TEs.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/definitions/{_server.ts.js-ycJ8puIN.js → _server.ts.js-CBMi-KUD.js} +11 -7
- package/build/server/chunks/entries/endpoints/api/definitions/{_server.ts.js-ycJ8puIN.js.map → _server.ts.js-CBMi-KUD.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/diag/throughput/{_server.ts.js-BdF3kn__.js → _server.ts.js-C98KkHLg.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/diag/throughput/{_server.ts.js-BdF3kn__.js.map → _server.ts.js-C98KkHLg.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/files/_...path_/{_server.ts.js-C26jiO43.js → _server.ts.js-CeTV6qVK.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/files/_...path_/{_server.ts.js-C26jiO43.js.map → _server.ts.js-CeTV6qVK.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-CoRl_nbA.js → _server.ts.js-7eclLbhJ.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-CoRl_nbA.js.map → _server.ts.js-7eclLbhJ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/invites/_id_/{_server.ts.js-CvAeI7gV.js → _server.ts.js-DNh5594J.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/invites/_id_/{_server.ts.js-CvAeI7gV.js.map → _server.ts.js-DNh5594J.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/invites/{_server.ts.js-Cd0V4sta.js → _server.ts.js-DGKHjtw8.js} +9 -8
- package/build/server/chunks/entries/endpoints/api/invites/{_server.ts.js-Cd0V4sta.js.map → _server.ts.js-DGKHjtw8.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/me/starred/_guid_/{_server.ts.js-BThetmba.js → _server.ts.js-CZ50nT84.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/me/starred/_guid_/{_server.ts.js-BThetmba.js.map → _server.ts.js-CZ50nT84.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/org/compute/{_server.ts.js-B4lGohx2.js → _server.ts.js-Bf1qSz52.js} +12 -9
- package/build/server/chunks/entries/endpoints/api/org/compute/_server.ts.js-Bf1qSz52.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/orgs/_orgId_/members/_userId_/{_server.ts.js-BcW-ZH-q.js → _server.ts.js-8PZedKem.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/orgs/_orgId_/members/_userId_/{_server.ts.js-BcW-ZH-q.js.map → _server.ts.js-8PZedKem.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/projects/_id_/{_server.ts.js-bIB33ABF.js → _server.ts.js-C6v2wqYB.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/{_server.ts.js-bIB33ABF.js.map → _server.ts.js-C6v2wqYB.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/projects/_id_/members/{_server.ts.js-B1AwpUGi.js → _server.ts.js-B3WPTw6C.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/members/{_server.ts.js-B1AwpUGi.js.map → _server.ts.js-B3WPTw6C.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/projects/_id_/members/_userId_/{_server.ts.js-DMl495J4.js → _server.ts.js-CY3ngc5p.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/members/_userId_/{_server.ts.js-DMl495J4.js.map → _server.ts.js-CY3ngc5p.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/projects/_id_/reclaim/{_server.ts.js-DFJbS6RF.js → _server.ts.js-DMAeVu3R.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/reclaim/{_server.ts.js-DFJbS6RF.js.map → _server.ts.js-DMAeVu3R.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/projects/{_server.ts.js-Gcc5eHXJ.js → _server.ts.js-D32BzObk.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/{_server.ts.js-Gcc5eHXJ.js.map → _server.ts.js-D32BzObk.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/auth/email/callback/{_server.ts.js-B7kvAKyV.js → _server.ts.js-DREl2Sbq.js} +12 -7
- package/build/server/chunks/entries/endpoints/auth/email/callback/_server.ts.js-DREl2Sbq.js.map +1 -0
- package/build/server/chunks/entries/endpoints/auth/supabase/callback/{_server.ts.js-3yXXN2SO.js → _server.ts.js-CmIWOQ81.js} +12 -7
- package/build/server/chunks/entries/endpoints/auth/supabase/callback/_server.ts.js-CmIWOQ81.js.map +1 -0
- package/build/server/chunks/entries/endpoints/auth/supabase/start/{_server.ts.js-1z1P1Ihi.js → _server.ts.js-D0O8rZwg.js} +5 -5
- package/build/server/chunks/entries/endpoints/auth/supabase/start/{_server.ts.js-1z1P1Ihi.js.map → _server.ts.js-D0O8rZwg.js.map} +1 -1
- package/build/server/chunks/entries/{hooks.server.js-OUXv4_qA.js → hooks.server.js-DSn6v_nP.js} +88 -40
- package/build/server/chunks/entries/hooks.server.js-DSn6v_nP.js.map +1 -0
- package/build/server/chunks/entries/pages/{_layout.server.ts.js-Cu7ejVMb.js → _layout.server.ts.js-Cts38lSM.js} +2 -2
- package/build/server/chunks/entries/pages/{_layout.server.ts.js-Cu7ejVMb.js.map → _layout.server.ts.js-Cts38lSM.js.map} +1 -1
- package/build/server/chunks/entries/pages/accept-invite/{_page.server.ts.js-koO2loGE.js → _page.server.ts.js-BIr1NoEK.js} +5 -5
- package/build/server/chunks/entries/pages/accept-invite/{_page.server.ts.js-koO2loGE.js.map → _page.server.ts.js-BIr1NoEK.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/{_layout.server.ts.js-BcS7EPWJ.js → _layout.server.ts.js-DjB5P2N0.js} +3 -3
- package/build/server/chunks/entries/pages/admin/{_layout.server.ts.js-BcS7EPWJ.js.map → _layout.server.ts.js-DjB5P2N0.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/{_page.server.ts.js-ColpdHsj.js → _page.server.ts.js-DMawiAOU.js} +4 -4
- package/build/server/chunks/entries/pages/admin/{_page.server.ts.js-ColpdHsj.js.map → _page.server.ts.js-DMawiAOU.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/audit/{_page.server.ts.js-pm9fJjcH.js → _page.server.ts.js-CJie_AQe.js} +14 -5
- package/build/server/chunks/entries/pages/admin/audit/_page.server.ts.js-CJie_AQe.js.map +1 -0
- package/build/server/chunks/entries/pages/admin/audit/{_page.svelte.js-smQE9KlB.js → _page.svelte.js-B3TE0-_a.js} +6 -2
- package/build/server/chunks/entries/pages/admin/audit/_page.svelte.js-B3TE0-_a.js.map +1 -0
- package/build/server/chunks/entries/pages/admin/compute/{_page.server.ts.js-btPxjqx4.js → _page.server.ts.js-DJI-BqLn.js} +5 -5
- package/build/server/chunks/entries/pages/admin/compute/{_page.server.ts.js-btPxjqx4.js.map → _page.server.ts.js-DJI-BqLn.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/organizations/{_page.server.ts.js-CQSWGW0Y.js → _page.server.ts.js-DRZlByRc.js} +3 -3
- package/build/server/chunks/entries/pages/admin/organizations/{_page.server.ts.js-CQSWGW0Y.js.map → _page.server.ts.js-DRZlByRc.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/projects/_id_/{_page.server.ts.js-DWObSxSO.js → _page.server.ts.js-cnc8alqe.js} +9 -7
- package/build/server/chunks/entries/pages/admin/projects/_id_/_page.server.ts.js-cnc8alqe.js.map +1 -0
- package/build/server/chunks/entries/pages/admin/projects/{_page.server.ts.js-BSYX7hSD.js → _page.server.ts.js-7suWtJxu.js} +3 -3
- package/build/server/chunks/entries/pages/admin/projects/{_page.server.ts.js-BSYX7hSD.js.map → _page.server.ts.js-7suWtJxu.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/system/{_page.server.ts.js-DFA57irm.js → _page.server.ts.js-C0ZdK8vU.js} +6 -6
- package/build/server/chunks/entries/pages/admin/system/{_page.server.ts.js-DFA57irm.js.map → _page.server.ts.js-C0ZdK8vU.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/system/{_page.svelte.js-D4Z-BGD2.js → _page.svelte.js-CqNLFuOZ.js} +2 -97
- package/build/server/chunks/entries/pages/admin/system/_page.svelte.js-CqNLFuOZ.js.map +1 -0
- package/build/server/chunks/entries/pages/admin/users/{_page.server.ts.js-B0s6jSPs.js → _page.server.ts.js-C1LiUNB_.js} +5 -5
- package/build/server/chunks/entries/pages/admin/users/{_page.server.ts.js-B0s6jSPs.js.map → _page.server.ts.js-C1LiUNB_.js.map} +1 -1
- package/build/server/chunks/entries/pages/admin/users/{_page.svelte.js-CO0kHa1b.js → _page.svelte.js-C-jy08cJ.js} +2 -2
- package/build/server/chunks/entries/pages/admin/users/{_page.svelte.js-CO0kHa1b.js.map → _page.svelte.js-C-jy08cJ.js.map} +1 -1
- package/build/server/chunks/entries/pages/auth/email/start/{_page.server.ts.js-F8fXU2YV.js → _page.server.ts.js-Bf5aciLN.js} +4 -3
- package/build/server/chunks/entries/pages/auth/email/start/_page.server.ts.js-Bf5aciLN.js.map +1 -0
- package/build/server/chunks/entries/pages/library/_guid_/{_page.server.ts.js-BXXiZbrJ.js → _page.server.ts.js-Cd1cMb0M.js} +9 -9
- package/build/server/chunks/entries/pages/library/_guid_/{_page.server.ts.js-BXXiZbrJ.js.map → _page.server.ts.js-Cd1cMb0M.js.map} +1 -1
- package/build/server/chunks/entries/pages/library/_guid_/{_page.svelte.js-BpEnQ79H.js → _page.svelte.js-BHPELPpI.js} +53 -1
- package/build/server/chunks/entries/pages/library/_guid_/{_page.svelte.js-BpEnQ79H.js.map → _page.svelte.js-BHPELPpI.js.map} +1 -1
- package/build/server/chunks/entries/pages/library/{_page.server.ts.js-CNsQMZl_.js → _page.server.ts.js-CkNgTDfl.js} +4 -4
- package/build/server/chunks/entries/pages/library/{_page.server.ts.js-CNsQMZl_.js.map → _page.server.ts.js-CkNgTDfl.js.map} +1 -1
- package/build/server/chunks/entries/pages/login/{_page.server.ts.js-DLtWh9lt.js → _page.server.ts.js-BM0BZFoZ.js} +4 -3
- package/build/server/chunks/entries/pages/login/_page.server.ts.js-BM0BZFoZ.js.map +1 -0
- package/build/server/chunks/entries/pages/logout/{_page.server.ts.js-DbaORCjB.js → _page.server.ts.js-Cc1BjCbc.js} +2 -2
- package/build/server/chunks/entries/pages/logout/{_page.server.ts.js-DbaORCjB.js.map → _page.server.ts.js-Cc1BjCbc.js.map} +1 -1
- package/build/server/chunks/entries/pages/projects/{_layout.server.ts.js-CNMJpFAK.js → _layout.server.ts.js-DuJkKJcb.js} +2 -2
- package/build/server/chunks/entries/pages/projects/{_layout.server.ts.js-CNMJpFAK.js.map → _layout.server.ts.js-DuJkKJcb.js.map} +1 -1
- package/build/server/chunks/entries/pages/projects/{_page.server.ts.js-BPAfS2yX.js → _page.server.ts.js-6JTf7XX0.js} +5 -5
- package/build/server/chunks/entries/pages/projects/{_page.server.ts.js-BPAfS2yX.js.map → _page.server.ts.js-6JTf7XX0.js.map} +1 -1
- package/build/server/chunks/entries/pages/projects/{_page.svelte.js-nQ9Uj1kK.js → _page.svelte.js-DVU6xc3i.js} +30 -4
- package/build/server/chunks/entries/pages/projects/_page.svelte.js-DVU6xc3i.js.map +1 -0
- package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-DmwzD-qo.js → _page.server.ts.js-CAIQvVcR.js} +5 -5
- package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-DmwzD-qo.js.map → _page.server.ts.js-CAIQvVcR.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/{_layout.server.ts.js-Bm1MwrYZ.js → _layout.server.ts.js-CBM_iY4T.js} +2 -2
- package/build/server/chunks/entries/pages/team/{_layout.server.ts.js-Bm1MwrYZ.js.map → _layout.server.ts.js-CBM_iY4T.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/{_page.server.ts.js-DjFIDiK1.js → _page.server.ts.js-Pf-MSXv0.js} +2 -2
- package/build/server/chunks/entries/pages/team/{_page.server.ts.js-DjFIDiK1.js.map → _page.server.ts.js-Pf-MSXv0.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/compute/{_page.server.ts.js-B331KcmA.js → _page.server.ts.js-CR-ddKJ4.js} +4 -4
- package/build/server/chunks/entries/pages/team/compute/{_page.server.ts.js-B331KcmA.js.map → _page.server.ts.js-CR-ddKJ4.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/members/{_page.server.ts.js-lSFTK3rq.js → _page.server.ts.js-DCQ0yy-F.js} +3 -3
- package/build/server/chunks/entries/pages/team/members/{_page.server.ts.js-lSFTK3rq.js.map → _page.server.ts.js-DCQ0yy-F.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/members/{_page.svelte.js-C70N76b0.js → _page.svelte.js-DVOfVzGn.js} +2 -2
- package/build/server/chunks/entries/pages/team/members/{_page.svelte.js-C70N76b0.js.map → _page.svelte.js-DVOfVzGn.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/projects/{_page.server.ts.js-CFZGG_Ci.js → _page.server.ts.js-FUxzp5PC.js} +3 -3
- package/build/server/chunks/entries/pages/team/projects/{_page.server.ts.js-CFZGG_Ci.js.map → _page.server.ts.js-FUxzp5PC.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/reclaim/{_page.server.ts.js-AFrlbBl8.js → _page.server.ts.js-Btcar0yP.js} +3 -3
- package/build/server/chunks/entries/pages/team/reclaim/{_page.server.ts.js-AFrlbBl8.js.map → _page.server.ts.js-Btcar0yP.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/settings/{_page.server.ts.js-BbKtggo9.js → _page.server.ts.js-CS5FLYXE.js} +3 -3
- package/build/server/chunks/entries/pages/team/settings/{_page.server.ts.js-BbKtggo9.js.map → _page.server.ts.js-CS5FLYXE.js.map} +1 -1
- package/build/server/chunks/entries/pages/team/shares/{_page.server.ts.js-B0XsHyzb.js → _page.server.ts.js-B1QqNYRo.js} +2 -2
- package/build/server/chunks/entries/pages/team/shares/{_page.server.ts.js-B0XsHyzb.js.map → _page.server.ts.js-B1QqNYRo.js.map} +1 -1
- package/build/server/chunks/{handler-BVoIPaUa.js → handler-CiXlY3wu.js} +3 -3
- package/build/server/chunks/{handler-BVoIPaUa.js.map → handler-CiXlY3wu.js.map} +1 -1
- package/build/server/chunks/{index.js-hj4o2h8q.js → index.js-CfdDzNmO.js} +2 -2
- package/build/server/chunks/{index.js-hj4o2h8q.js.map → index.js-CfdDzNmO.js.map} +1 -1
- package/build/server/chunks/{manifest.js-BIVs9dfJ.js → manifest.js-DZ6WZ-WA.js} +76 -76
- package/build/server/chunks/{manifest.js-BIVs9dfJ.js.map → manifest.js-DZ6WZ-WA.js.map} +1 -1
- package/build/server/chunks/nodes/{0.js-OxxVvycM.js → 0.js-BMoQIPmA.js} +4 -4
- package/build/server/chunks/nodes/{0.js-OxxVvycM.js.map → 0.js-BMoQIPmA.js.map} +1 -1
- package/build/server/chunks/nodes/{1.js-Bs6uvYbc.js → 1.js-Cm5AdicB.js} +2 -2
- package/build/server/chunks/nodes/{1.js-Bs6uvYbc.js.map → 1.js-Cm5AdicB.js.map} +1 -1
- package/build/server/chunks/nodes/{10.js-CvIgMW7D.js → 10.js-BNCwQwZV.js} +9 -9
- package/build/server/chunks/nodes/{10.js-CvIgMW7D.js.map → 10.js-BNCwQwZV.js.map} +1 -1
- package/build/server/chunks/nodes/{11.js-CnBjS7-t.js → 11.js-DkWLgBVg.js} +8 -8
- package/build/server/chunks/nodes/{11.js-CnBjS7-t.js.map → 11.js-DkWLgBVg.js.map} +1 -1
- package/build/server/chunks/nodes/{12.js-Dq_XopIA.js → 12.js-kNjmUDDo.js} +4 -4
- package/build/server/chunks/nodes/{12.js-Dq_XopIA.js.map → 12.js-kNjmUDDo.js.map} +1 -1
- package/build/server/chunks/nodes/{13.js-CqZCtg80.js → 13.js-jNBOb5Ni.js} +5 -5
- package/build/server/chunks/nodes/{13.js-CqZCtg80.js.map → 13.js-jNBOb5Ni.js.map} +1 -1
- package/build/server/chunks/nodes/{14.js-OvULgcZx.js → 14.js-jkWhR5ra.js} +5 -5
- package/build/server/chunks/nodes/{14.js-OvULgcZx.js.map → 14.js-jkWhR5ra.js.map} +1 -1
- package/build/server/chunks/nodes/{15.js-3rOev7kG.js → 15.js-Bh0tBhZ6.js} +15 -11
- package/build/server/chunks/nodes/{15.js-3rOev7kG.js.map → 15.js-Bh0tBhZ6.js.map} +1 -1
- package/build/server/chunks/nodes/{16.js-DY4bmQK_.js → 16.js-BjSvS7x7.js} +11 -11
- package/build/server/chunks/nodes/{16.js-DY4bmQK_.js.map → 16.js-BjSvS7x7.js.map} +1 -1
- package/build/server/chunks/nodes/{17.js-DzcgsMqq.js → 17.js-CVAlNLd1.js} +2 -2
- package/build/server/chunks/nodes/{17.js-DzcgsMqq.js.map → 17.js-CVAlNLd1.js.map} +1 -1
- package/build/server/chunks/nodes/{18.js-C3GcE50R.js → 18.js-m1EmD7J9.js} +10 -5
- package/build/server/chunks/nodes/{18.js-C3GcE50R.js.map → 18.js-m1EmD7J9.js.map} +1 -1
- package/build/server/chunks/nodes/{19.js-4ei3NRJW.js → 19.js-Cvq4wk_v.js} +8 -8
- package/build/server/chunks/nodes/{19.js-4ei3NRJW.js.map → 19.js-Cvq4wk_v.js.map} +1 -1
- package/build/server/chunks/nodes/{2.js-BhhMlQQP.js → 2.js-_j2qbJf6.js} +8 -8
- package/build/server/chunks/nodes/{2.js-BhhMlQQP.js.map → 2.js-_j2qbJf6.js.map} +1 -1
- package/build/server/chunks/nodes/{20.js-BQZue73m.js → 20.js-BjgFHK82.js} +17 -13
- package/build/server/chunks/nodes/{20.js-BQZue73m.js.map → 20.js-BjgFHK82.js.map} +1 -1
- package/build/server/chunks/nodes/{21.js-BAkAIvfV.js → 21.js-C3u9VeIP.js} +12 -7
- package/build/server/chunks/nodes/{21.js-BAkAIvfV.js.map → 21.js-C3u9VeIP.js.map} +1 -1
- package/build/server/chunks/nodes/{22.js-d354Ho4z.js → 22.js-3vW3ZPjE.js} +8 -3
- package/build/server/chunks/nodes/{22.js-d354Ho4z.js.map → 22.js-3vW3ZPjE.js.map} +1 -1
- package/build/server/chunks/nodes/{23.js-BMNUZekw.js → 23.js-h3AKg2Bd.js} +9 -9
- package/build/server/chunks/nodes/{23.js-BMNUZekw.js.map → 23.js-h3AKg2Bd.js.map} +1 -1
- package/build/server/chunks/nodes/{24.js-BGD-JCcE.js → 24.js-DcfMC0S6.js} +11 -7
- package/build/server/chunks/nodes/{24.js-BGD-JCcE.js.map → 24.js-DcfMC0S6.js.map} +1 -1
- package/build/server/chunks/nodes/{25.js-BqxnZYdq.js → 25.js-B8F-WcNH.js} +4 -4
- package/build/server/chunks/nodes/{25.js-BqxnZYdq.js.map → 25.js-B8F-WcNH.js.map} +1 -1
- package/build/server/chunks/nodes/{27.js-Bpas2N07.js → 27.js-DmjAkuen.js} +6 -6
- package/build/server/chunks/nodes/{27.js-Bpas2N07.js.map → 27.js-DmjAkuen.js.map} +1 -1
- package/build/server/chunks/nodes/{28.js-CzzcTWyj.js → 28.js-B7Rf1M8l.js} +6 -6
- package/build/server/chunks/nodes/{28.js-CzzcTWyj.js.map → 28.js-B7Rf1M8l.js.map} +1 -1
- package/build/server/chunks/nodes/{29.js-D-yU37B7.js → 29.js-DFPsK4BF.js} +5 -5
- package/build/server/chunks/nodes/{29.js-D-yU37B7.js.map → 29.js-DFPsK4BF.js.map} +1 -1
- package/build/server/chunks/nodes/{3.js-Cz9pT7ce.js → 3.js-DEDKRIYO.js} +2 -2
- package/build/server/chunks/nodes/{3.js-Cz9pT7ce.js.map → 3.js-DEDKRIYO.js.map} +1 -1
- package/build/server/chunks/nodes/{30.js-CTnqbIs1.js → 30.js-B17mHAaN.js} +5 -5
- package/build/server/chunks/nodes/{30.js-CTnqbIs1.js.map → 30.js-B17mHAaN.js.map} +1 -1
- package/build/server/chunks/nodes/{31.js-BzVXDu0q.js → 31.js-g3F8A8P0.js} +4 -4
- package/build/server/chunks/nodes/{31.js-BzVXDu0q.js.map → 31.js-g3F8A8P0.js.map} +1 -1
- package/build/server/chunks/nodes/{32.js-D5n6ZsDK.js → 32.js-1VSkrG-2.js} +4 -4
- package/build/server/chunks/nodes/{32.js-D5n6ZsDK.js.map → 32.js-1VSkrG-2.js.map} +1 -1
- package/build/server/chunks/nodes/{5.js-BJ8b3aNu.js → 5.js-BvHhhp_p.js} +4 -4
- package/build/server/chunks/nodes/{5.js-BJ8b3aNu.js.map → 5.js-BvHhhp_p.js.map} +1 -1
- package/build/server/chunks/nodes/{6.js-BUe0tZCB.js → 6.js-BHejxveY.js} +5 -5
- package/build/server/chunks/nodes/{6.js-BUe0tZCB.js.map → 6.js-BHejxveY.js.map} +1 -1
- package/build/server/chunks/nodes/{7.js-Bo7bTIfx.js → 7.js-CV5qjTXV.js} +2 -2
- package/build/server/chunks/nodes/{7.js-Bo7bTIfx.js.map → 7.js-CV5qjTXV.js.map} +1 -1
- package/build/server/chunks/nodes/{8.js-C6iVKn1o.js → 8.js-jhS48nhZ.js} +12 -7
- package/build/server/chunks/nodes/{8.js-C6iVKn1o.js.map → 8.js-jhS48nhZ.js.map} +1 -1
- package/build/server/chunks/nodes/{9.js-DPMqw-Dj.js → 9.js-27g91Gox.js} +6 -6
- package/build/server/chunks/nodes/{9.js-DPMqw-Dj.js.map → 9.js-27g91Gox.js.map} +1 -1
- package/package.json +4 -4
- package/templates/.env.example +57 -0
- package/build/client/_app/immutable/chunks/B2u4e1Y9.js.br +0 -0
- package/build/client/_app/immutable/chunks/B2u4e1Y9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BRbaYEL5.js.br +0 -0
- package/build/client/_app/immutable/chunks/BRbaYEL5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/COYKudi0.js.br +0 -0
- package/build/client/_app/immutable/chunks/COYKudi0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CYwmPsLn.js.br +0 -0
- package/build/client/_app/immutable/chunks/CYwmPsLn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CxPY7Obc.js +0 -2
- package/build/client/_app/immutable/chunks/CxPY7Obc.js.br +0 -0
- package/build/client/_app/immutable/chunks/CxPY7Obc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/I2TM0do6.js.br +0 -0
- package/build/client/_app/immutable/chunks/I2TM0do6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/IUqeb3TJ.js +0 -2
- package/build/client/_app/immutable/chunks/IUqeb3TJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/IUqeb3TJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/zOoVG74V.js.br +0 -0
- package/build/client/_app/immutable/chunks/zOoVG74V.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CRaXT8K-.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CRaXT8K-.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DuKqaS_0.js +0 -1
- package/build/client/_app/immutable/entry/start.DuKqaS_0.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DuKqaS_0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DPMP9Es7.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DPMP9Es7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.DMJdbPyC.js +0 -3
- package/build/client/_app/immutable/nodes/10.DMJdbPyC.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.DMJdbPyC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.BxhrIetk.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.BxhrIetk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.bzJyaCKt.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.bzJyaCKt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.XVGDZn7V.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.XVGDZn7V.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.Ds7J6ry6.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.Ds7J6ry6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.C6HKDHv3.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.C6HKDHv3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.BxjH0QZF.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.BxjH0QZF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/19.BU2Lw57i.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.BU2Lw57i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.D9dN-poH.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.D9dN-poH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.BIo_tnO_.js +0 -5021
- package/build/client/_app/immutable/nodes/20.BIo_tnO_.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.BIo_tnO_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.qpo7v5r_.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.qpo7v5r_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/23.CdjZcdrJ.js +0 -16
- package/build/client/_app/immutable/nodes/23.CdjZcdrJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/23.CdjZcdrJ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.BSJH1lHT.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.BSJH1lHT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/27.BKQucFUA.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.BKQucFUA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/28.BleEhT0J.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.BleEhT0J.js.gz +0 -0
- package/build/client/_app/immutable/nodes/29.fAbDo5Et.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.fAbDo5Et.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.XubMG-dn.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.XubMG-dn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.DRrc_hLr.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.DRrc_hLr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.C77UuNpH.js.br +0 -1
- package/build/client/_app/immutable/nodes/5.C77UuNpH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.B23L8hA_.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.B23L8hA_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.BZj0oAjH.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.BZj0oAjH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.CGy_fUC4.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CGy_fUC4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.BpEiOuN0.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.BpEiOuN0.js.gz +0 -0
- package/build/server/chunks/chunks/access.server.js-D99g5hZd.js.map +0 -1
- package/build/server/chunks/chunks/admin-auth.server.js-hCWF6Pqg.js.map +0 -1
- package/build/server/chunks/chunks/bootHealth.server.js-CxNJCaGf.js.map +0 -1
- package/build/server/chunks/chunks/clientCache.server.js-nl8vnalG.js.map +0 -1
- package/build/server/chunks/chunks/computeLimits.js-C5c7HPGJ.js +0 -20
- package/build/server/chunks/chunks/computeLimits.js-C5c7HPGJ.js.map +0 -1
- package/build/server/chunks/chunks/context.js-D8E0GFTw.js.map +0 -1
- package/build/server/chunks/chunks/package.js-CGjshiZJ.js.map +0 -1
- package/build/server/chunks/chunks/providers.server.js-D0hpk-aq.js.map +0 -1
- package/build/server/chunks/chunks/token.server.js-q3fv9Fqo.js.map +0 -1
- package/build/server/chunks/chunks/token2.server.js-Cqw1dJj-.js.map +0 -1
- package/build/server/chunks/entries/endpoints/admin/api/system/health/_server.ts.js-CQdxoaBS.js.map +0 -1
- package/build/server/chunks/entries/endpoints/admin/api/system/update/_server.ts.js-y3dgQz-R.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/compute/_server.ts.js-DkyT3FO6.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/org/compute/_server.ts.js-B4lGohx2.js.map +0 -1
- package/build/server/chunks/entries/endpoints/auth/email/callback/_server.ts.js-B7kvAKyV.js.map +0 -1
- package/build/server/chunks/entries/endpoints/auth/supabase/callback/_server.ts.js-3yXXN2SO.js.map +0 -1
- package/build/server/chunks/entries/hooks.server.js-OUXv4_qA.js.map +0 -1
- package/build/server/chunks/entries/pages/admin/audit/_page.server.ts.js-pm9fJjcH.js.map +0 -1
- package/build/server/chunks/entries/pages/admin/audit/_page.svelte.js-smQE9KlB.js.map +0 -1
- package/build/server/chunks/entries/pages/admin/projects/_id_/_page.server.ts.js-DWObSxSO.js.map +0 -1
- package/build/server/chunks/entries/pages/admin/system/_page.svelte.js-D4Z-BGD2.js.map +0 -1
- package/build/server/chunks/entries/pages/auth/email/start/_page.server.ts.js-F8fXU2YV.js.map +0 -1
- package/build/server/chunks/entries/pages/login/_page.server.ts.js-DLtWh9lt.js.map +0 -1
- package/build/server/chunks/entries/pages/projects/_page.svelte.js-nQ9Uj1kK.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as requireInstanceAdmin } from '../../../../../../../../chunks/access.server.js-
|
|
3
|
-
import { a as apiError, h as handleApiError, A as ApiErrorCode } from '../../../../../../../../chunks/api-errors.js-
|
|
4
|
-
import { S as SYSTEM_CONTEXT } from '../../../../../../../../chunks/context.js-
|
|
1
|
+
import { i as flag, n as getPlatformProjectGrantStore } from '../../../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
2
|
+
import { b as requireInstanceAdmin } from '../../../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
3
|
+
import { a as apiError, h as handleApiError, A as ApiErrorCode } from '../../../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
4
|
+
import { S as SYSTEM_CONTEXT } from '../../../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
5
5
|
import '../../../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:path';
|
|
@@ -13,7 +13,7 @@ import '@sveltejs/kit';
|
|
|
13
13
|
import 'zod';
|
|
14
14
|
import '@selvajs/compute/core';
|
|
15
15
|
import '../../../../../../../../chunks/schema.js-j3D3emog.js';
|
|
16
|
-
import '../../../../../../../../chunks/utils4.js-
|
|
16
|
+
import '../../../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
17
17
|
|
|
18
18
|
const DELETE = async ({ params, locals }) => {
|
|
19
19
|
requireInstanceAdmin(locals);
|
|
@@ -29,4 +29,4 @@ const DELETE = async ({ params, locals }) => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export { DELETE };
|
|
32
|
-
//# sourceMappingURL=_server.ts.js-
|
|
32
|
+
//# sourceMappingURL=_server.ts.js-DHYHT1N8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js-
|
|
1
|
+
{"version":3,"file":"_server.ts.js-DHYHT1N8.js","sources":["../../../../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/projects/_id_/grants/_grantId_/_server.ts.js"],"sourcesContent":["import { f as flag, n as getPlatformProjectGrantStore } from \"../../../../../../../../chunks/providers.server.js\";\nimport { b as requireInstanceAdmin } from \"../../../../../../../../chunks/access.server.js\";\nimport { a as apiError, h as handleApiError, A as ApiErrorCode } from \"../../../../../../../../chunks/api-errors.js\";\nimport { S as SYSTEM_CONTEXT } from \"../../../../../../../../chunks/context.js\";\nconst DELETE = async ({ params, locals }) => {\n requireInstanceAdmin(locals);\n if (!flag(\"ENABLE_PLATFORM_PROJECTS\")) apiError(404, ApiErrorCode.NOT_FOUND, \"Not found\");\n const { grantId } = params;\n if (!grantId) apiError(400, ApiErrorCode.VALIDATION_FAILED, \"Missing grant ID\");\n try {\n await getPlatformProjectGrantStore().delete(SYSTEM_CONTEXT, grantId);\n return new Response(null, { status: 204 });\n } catch (err) {\n handleApiError(err, \"Failed to revoke grant\");\n }\n};\nexport {\n DELETE\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIK,MAAC,MAAM,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK;AAC7C,EAAE,oBAAoB,CAAC,MAAM,CAAC;AAC9B,EAAE,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,EAAE,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC;AAC3F,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM;AAC5B,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;AACjF,EAAE,IAAI;AACN,IAAI,MAAM,4BAA4B,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC;AACxE,IAAI,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC9C,EAAE,CAAC,CAAC,OAAO,GAAG,EAAE;AAChB,IAAI,cAAc,CAAC,GAAG,EAAE,wBAAwB,CAAC;AACjD,EAAE;AACF;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { json } from '@sveltejs/kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import {
|
|
5
|
-
import { b as requireInstanceAdmin } from '../../../../../../../chunks/access.server.js-
|
|
6
|
-
import { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from '../../../../../../../chunks/api-errors.js-
|
|
7
|
-
import { S as SYSTEM_CONTEXT } from '../../../../../../../chunks/context.js-
|
|
4
|
+
import { n as getPlatformProjectGrantStore, d as getOrganizationProvider, r as getUserProfileStore, i as flag, e as getProjectProvider } from '../../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
5
|
+
import { b as requireInstanceAdmin } from '../../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
6
|
+
import { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from '../../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
7
|
+
import { S as SYSTEM_CONTEXT } from '../../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
8
8
|
import '../../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'node:path';
|
|
@@ -13,7 +13,7 @@ import 'node:fs/promises';
|
|
|
13
13
|
import '@supabase/supabase-js';
|
|
14
14
|
import '@selvajs/compute/core';
|
|
15
15
|
import '../../../../../../../chunks/schema.js-j3D3emog.js';
|
|
16
|
-
import '../../../../../../../chunks/utils4.js-
|
|
16
|
+
import '../../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
17
17
|
|
|
18
18
|
const CreateGrantBody = z.object({
|
|
19
19
|
granteeType: z.enum(["org", "user"]),
|
|
@@ -79,4 +79,4 @@ const POST = async ({ params, request, locals }) => {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
export { GET, POST };
|
|
82
|
-
//# sourceMappingURL=_server.ts.js-
|
|
82
|
+
//# sourceMappingURL=_server.ts.js-Cgt7iGfE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js-
|
|
1
|
+
{"version":3,"file":"_server.ts.js-Cgt7iGfE.js","sources":["../../../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/projects/_id_/grants/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { z } from \"zod\";\nimport { randomUUID } from \"node:crypto\";\nimport { n as getPlatformProjectGrantStore, e as getOrganizationProvider, h as getUserProfileStore, f as flag, m as getProjectProvider } from \"../../../../../../../chunks/providers.server.js\";\nimport { b as requireInstanceAdmin } from \"../../../../../../../chunks/access.server.js\";\nimport { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from \"../../../../../../../chunks/api-errors.js\";\nimport { S as SYSTEM_CONTEXT } from \"../../../../../../../chunks/context.js\";\nconst CreateGrantBody = z.object({\n granteeType: z.enum([\"org\", \"user\"]),\n granteeId: z.string().min(1),\n canSolve: z.boolean()\n});\nasync function assertPlatformProject(id) {\n if (!flag(\"ENABLE_PLATFORM_PROJECTS\")) apiError(404, ApiErrorCode.NOT_FOUND, \"Not found\");\n const project = await getProjectProvider().getProject(SYSTEM_CONTEXT, id);\n if (!project || project.visibility !== \"platform\") {\n apiError(404, ApiErrorCode.NOT_FOUND, \"Platform project not found\");\n }\n return project;\n}\nconst GET = async ({ params, locals }) => {\n requireInstanceAdmin(locals);\n const { id } = params;\n if (!id) apiError(400, ApiErrorCode.VALIDATION_FAILED, \"Missing project ID\");\n try {\n await assertPlatformProject(id);\n const grants = await getPlatformProjectGrantStore().listByProject(SYSTEM_CONTEXT, id);\n return json({ grants });\n } catch (err) {\n handleApiError(err, \"Failed to list grants\");\n }\n};\nconst POST = async ({ params, request, locals }) => {\n const user = requireInstanceAdmin(locals);\n const { id } = params;\n if (!id) apiError(400, ApiErrorCode.VALIDATION_FAILED, \"Missing project ID\");\n const body = await request.json().catch(() => null);\n const parsed = CreateGrantBody.safeParse(body);\n if (!parsed.success) throwZodError(parsed.error);\n try {\n await assertPlatformProject(id);\n if (parsed.data.granteeType === \"org\") {\n const org = await getOrganizationProvider().getOrg(SYSTEM_CONTEXT, parsed.data.granteeId);\n if (!org)\n apiError(\n 400,\n ApiErrorCode.VALIDATION_FAILED,\n `Organization '${parsed.data.granteeId}' not found`\n );\n } else {\n const profile = await getUserProfileStore().getProfile(SYSTEM_CONTEXT, parsed.data.granteeId);\n if (!profile)\n apiError(400, ApiErrorCode.VALIDATION_FAILED, `User '${parsed.data.granteeId}' not found`);\n }\n const grant = {\n id: randomUUID(),\n projectId: id,\n granteeType: parsed.data.granteeType,\n granteeId: parsed.data.granteeId,\n canSolve: parsed.data.canSolve,\n createdBy: user.id,\n createdAt: (/* @__PURE__ */ new Date()).toISOString()\n };\n await getPlatformProjectGrantStore().create(SYSTEM_CONTEXT, grant);\n return json(grant, { status: 201 });\n } catch (err) {\n handleApiError(err, \"Failed to create grant\");\n }\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;AACjC,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACtC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9B,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO;AACrB,CAAC,CAAC;AACF,eAAe,qBAAqB,CAAC,EAAE,EAAE;AACzC,EAAE,IAAI,CAAC,IAAI,CA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CAAC,IAAI,CAAC,QAAQ;AACpC,MAAM,SAAS,EAAE,IAAI,CAAC,EAAE;AACxB,MAAM,SAAS,EAAE,iBAAiB,IAAI,IAAI,EAAE,EAAE,WAAW;AACzD,KAAK;AACL,IAAI,MAAM,4BAA4B,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC;AACtE,IAAI,OAAO,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACvC,EAAE,CAAC,CAAC,OAAO,GAAG,EAAE;AAChB,IAAI,cAAc,CAAC,GAAG,EAAE,wBAAwB,CAAC;AACjD,EAAE;AACF;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { json } from '@sveltejs/kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import {
|
|
5
|
-
import { b as requireInstanceAdmin } from '../../../../../chunks/access.server.js-
|
|
6
|
-
import { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from '../../../../../chunks/api-errors.js-
|
|
4
|
+
import { i as flag, d as getOrganizationProvider, e as getProjectProvider, P as ProviderError } from '../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
5
|
+
import { b as requireInstanceAdmin } from '../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
6
|
+
import { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from '../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
7
7
|
import { s as slugify } from '../../../../../chunks/slug.js-BGuFQjqe.js';
|
|
8
|
-
import { S as SYSTEM_CONTEXT } from '../../../../../chunks/context.js-
|
|
8
|
+
import { S as SYSTEM_CONTEXT } from '../../../../../chunks/context.js-DsQGiS2x.js';
|
|
9
9
|
import '../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
10
10
|
import 'node:url';
|
|
11
11
|
import 'node:path';
|
|
@@ -14,7 +14,7 @@ import 'node:fs/promises';
|
|
|
14
14
|
import '@supabase/supabase-js';
|
|
15
15
|
import '@selvajs/compute/core';
|
|
16
16
|
import '../../../../../chunks/schema.js-j3D3emog.js';
|
|
17
|
-
import '../../../../../chunks/utils4.js-
|
|
17
|
+
import '../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
18
18
|
|
|
19
19
|
const MAX_SLUG_ATTEMPTS = 25;
|
|
20
20
|
function isSlugConflict(err) {
|
|
@@ -116,4 +116,4 @@ const POST = async ({ request, locals }) => {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
export { GET, POST };
|
|
119
|
-
//# sourceMappingURL=_server.ts.js-
|
|
119
|
+
//# sourceMappingURL=_server.ts.js-BFi1Di59.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js-
|
|
1
|
+
{"version":3,"file":"_server.ts.js-BFi1Di59.js","sources":["../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/projects/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { z } from \"zod\";\nimport { randomUUID } from \"node:crypto\";\nimport { f as flag, e as getOrganizationProvider, m as getProjectProvider, P as ProviderError } from \"../../../../../chunks/providers.server.js\";\nimport { b as requireInstanceAdmin } from \"../../../../../chunks/access.server.js\";\nimport { a as apiError, h as handleApiError, t as throwZodError, A as ApiErrorCode } from \"../../../../../chunks/api-errors.js\";\nimport { s as slugify } from \"../../../../../chunks/slug.js\";\nimport { S as SYSTEM_CONTEXT } from \"../../../../../chunks/context.js\";\nconst MAX_SLUG_ATTEMPTS = 25;\nfunction isSlugConflict(err) {\n return err instanceof ProviderError && err.statusCode === 409 && /projects_org_id_slug_key/.test(err.message);\n}\nfunction isNameConflict(err) {\n return err instanceof ProviderError && err.statusCode === 409 && /projects_org_name_unique/.test(err.message);\n}\nconst CreatePlatformProjectBody = z.object({\n name: z.string().min(1, \"Project name is required\").max(128).trim(),\n description: z.string().max(2e3).optional(),\n /**\n * Org that physically hosts the project. Storage routing and compute\n * resolution use this — but org membership in this org does NOT grant\n * access. Visibility = 'platform' overrides those defaults.\n *\n * If omitted, the platform admin's first available org is used.\n */\n orgId: z.string().uuid().optional()\n});\nconst GET = async ({ locals }) => {\n requireInstanceAdmin(locals);\n if (!flag(\"ENABLE_PLATFORM_PROJECTS\")) apiError(404, ApiErrorCode.NOT_FOUND, \"Not found\");\n try {\n const orgs = await getOrganizationProvider().listOrgs(SYSTEM_CONTEXT, { limit: 1e3 });\n const all = [];\n for (const org of orgs.items) {\n const page = await getProjectProvider().listProjects(SYSTEM_CONTEXT, org.id, {\n limit: 1e3\n });\n for (const p of page.items) {\n if (p.visibility === \"platform\") all.push(p);\n }\n }\n return json({ projects: all });\n } catch (err) {\n handleApiError(err, \"Failed to list platform projects\");\n }\n};\nconst POST = async ({ request, locals }) => {\n const user = requireInstanceAdmin(locals);\n if (!flag(\"ENABLE_PLATFORM_PROJECTS\")) apiError(404, ApiErrorCode.NOT_FOUND, \"Not found\");\n const ctx = locals.ctx;\n const body = await request.json().catch(() => null);\n const parsed = CreatePlatformProjectBody.safeParse(body);\n if (!parsed.success) throwZodError(parsed.error);\n const hostOrgId = parsed.data.orgId ?? ctx.actingOrgId;\n if (!hostOrgId) {\n apiError(\n 400,\n ApiErrorCode.VALIDATION_FAILED,\n \"A host orgId is required (no active organization in context).\"\n );\n }\n const hostOrg = await getOrganizationProvider().getOrg(SYSTEM_CONTEXT, hostOrgId);\n if (!hostOrg)\n apiError(400, ApiErrorCode.VALIDATION_FAILED, `Host organization '${hostOrgId}' not found.`);\n const projectStore = getProjectProvider();\n const baseSlug = slugify(parsed.data.name) || \"platform-project\";\n const now = (/* @__PURE__ */ new Date()).toISOString();\n const projectId = randomUUID();\n for (let attempt = 0; attempt < MAX_SLUG_ATTEMPTS; attempt++) {\n const slug = attempt === 0 ? baseSlug : `${baseSlug}-${attempt + 1}`;\n const project = {\n id: projectId,\n orgId: hostOrgId,\n name: parsed.data.name,\n slug,\n description: parsed.data.description,\n visibility: \"platform\",\n ownerId: user.id,\n createdBy: user.id,\n updatedBy: user.id,\n autoJoinOnUpload: false,\n createdAt: now,\n updatedAt: now,\n deletedAt: null\n };\n try {\n await projectStore.createProject(SYSTEM_CONTEXT, project);\n return json(project, { status: 201 });\n } catch (err) {\n if (isNameConflict(err)) {\n apiError(\n 409,\n ApiErrorCode.CONFLICT,\n \"A project with that name already exists in the host organization.\"\n );\n }\n if (isSlugConflict(err)) continue;\n handleApiError(err, \"Failed to create platform project\");\n }\n }\n apiError(\n 409,\n ApiErrorCode.CONFLICT,\n \"Could not pick a unique project slug after several attempts.\"\n );\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAQA,MAAM,iBAAiB,GAAG,EAAE;AAC5B,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,EAAE,OAAO,GAAG,YAAY,aAAa,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;AAC/G;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,EAAE,OAAO,GAAG,YAAY,aAAa,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;AAC/G;AACA,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;AACrE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ;AACnC,CAAC,C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MAAM,EAAE,EAAE,SAAS;AACnB,MAAM,KAAK,EAAE,SAAS;AACtB,MAAM,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;AAC5B,MAAM,IAAI;AACV,MAAM,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;AAC1C,MAAM,UAAU,EAAE,UAAU;AAC5B,MAAM,OAAO,EAAE,IAAI,CAAC,EAAE;AACtB,MAAM,SAAS,EAAE,IAAI,CAAC,EAAE;AACxB,MAAM,SAAS,EAAE,IAAI,CAAC,EAAE;AACxB,MAAM,gBAAgB,EAAE,KAAK;AAC7B,MAAM,SAAS,EAAE,GAAG;AACpB,MAAM,SAAS,EAAE,GAAG;AACpB,MAAM,SAAS,EAAE;AACjB,KAAK;AACL,IAAI,IAAI;AACR,MAAM,MAAM,YAAY,CAAC,aAAa,CAAC,cAAc,EAAE,OAAO,CAAC;AAC/D,MAAM,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC3C,IAAI,CAAC,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE;AAC/B,QAAQ,QAAQ;AAChB,UAAU,GAAG;AACb,UAAU,YAAY,CAAC,QAAQ;AAC/B,UAAU;AACV,SAAS;AACT,MAAM;AACN,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE;AAC/B,MAAM,cAAc,CAAC,GAAG,EAAE,mCAAmC,CAAC;AAC9D,IAAI;AACJ,EAAE;AACF,EAAE,QAAQ;AACV,IAAI,GAAG;AACP,IAAI,YAAY,CAAC,QAAQ;AACzB,IAAI;AACJ,GAAG;AACH;;;;"}
|
|
@@ -3,15 +3,15 @@ import { randomUUID } from 'node:crypto';
|
|
|
3
3
|
import { mkdir, writeFile, unlink } from 'node:fs/promises';
|
|
4
4
|
import { resolve, join } from 'node:path';
|
|
5
5
|
import { b as private_env } from '../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
6
|
-
import '../../../../../../chunks/context.js-
|
|
7
|
-
import { f as findServerById } from '../../../../../../chunks/utils4.js-
|
|
8
|
-
import { p as providers,
|
|
9
|
-
import { d as requirePermission } from '../../../../../../chunks/access.server.js-
|
|
6
|
+
import '../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
7
|
+
import { f as findServerById } from '../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
8
|
+
import { p as providers, l as getComputeServerConfigStore, L as LocalComputeServerStore } from '../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
9
|
+
import { d as requirePermission } from '../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'node:url';
|
|
12
12
|
import 'node:fs';
|
|
13
13
|
import '@supabase/supabase-js';
|
|
14
|
-
import '../../../../../../chunks/api-errors.js-
|
|
14
|
+
import '../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
15
15
|
import '@selvajs/compute/core';
|
|
16
16
|
import '../../../../../../chunks/schema.js-j3D3emog.js';
|
|
17
17
|
|
|
@@ -40,6 +40,29 @@ function atRestSecretsCheck(report) {
|
|
|
40
40
|
remediation: plaintext ? "A key is stored in plaintext on disk — re-enter it via /admin/compute so it is encrypted." : "The stored ciphertext does not match the current SELVA_AT_REST_KEY (rotated key or restored backup). Re-enter the affected keys via /admin/compute, or restore the original SELVA_AT_REST_KEY, then run this check again."
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
+
function schemaVersionCheck(report) {
|
|
44
|
+
const base = { id: "schema-version", label: "Database schema" };
|
|
45
|
+
if (report === null) {
|
|
46
|
+
return {
|
|
47
|
+
...base,
|
|
48
|
+
status: "not_applicable",
|
|
49
|
+
summary: "The active data provider migrates with the app — there is no separate schema to verify."
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (report.ok) {
|
|
53
|
+
return {
|
|
54
|
+
...base,
|
|
55
|
+
status: "ok",
|
|
56
|
+
summary: `Database migration head ${report.actual} satisfies the app's expected ${report.expected}.`
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
...base,
|
|
61
|
+
status: "degraded",
|
|
62
|
+
summary: report.message ?? `Database migration head ${report.actual ?? "unavailable"} is behind the app's expected ${report.expected}.`,
|
|
63
|
+
remediation: "Sync the provider migrations into your Supabase project and run `npx supabase db push`, then restart the app. `selva doctor` runs the same check from the CLI."
|
|
64
|
+
};
|
|
65
|
+
}
|
|
43
66
|
const COMPUTE_PING_TIMEOUT_MS = 8e3;
|
|
44
67
|
async function computeReachabilityCheck(locals) {
|
|
45
68
|
const base = { id: "compute-reachable", label: "Default compute server" };
|
|
@@ -145,6 +168,12 @@ const GET = async ({ locals }) => {
|
|
|
145
168
|
} else {
|
|
146
169
|
checks.push(atRestSecretsCheck(null));
|
|
147
170
|
}
|
|
171
|
+
const data = providers.data;
|
|
172
|
+
if (typeof data.verifySchemaVersion === "function") {
|
|
173
|
+
checks.push(schemaVersionCheck(await data.verifySchemaVersion()));
|
|
174
|
+
} else {
|
|
175
|
+
checks.push(schemaVersionCheck(null));
|
|
176
|
+
}
|
|
148
177
|
checks.push(...await Promise.all([computeReachabilityCheck(locals), dataPathWritableCheck()]));
|
|
149
178
|
const rank = {
|
|
150
179
|
ok: 0,
|
|
@@ -160,4 +189,4 @@ const GET = async ({ locals }) => {
|
|
|
160
189
|
};
|
|
161
190
|
|
|
162
191
|
export { GET };
|
|
163
|
-
//# sourceMappingURL=_server.ts.js-
|
|
192
|
+
//# sourceMappingURL=_server.ts.js-Br7kd03s.js.map
|
package/build/server/chunks/entries/endpoints/admin/api/system/health/_server.ts.js-Br7kd03s.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js-Br7kd03s.js","sources":["../../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/system/health/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { randomUUID } from \"node:crypto\";\nimport { mkdir, writeFile, unlink } from \"node:fs/promises\";\nimport { resolve, join } from \"node:path\";\nimport { b as private_env } from \"../../../../../../chunks/shared-server.js\";\nimport \"../../../../../../chunks/context.js\";\nimport { f as findServerById } from \"../../../../../../chunks/utils4.js\";\nimport { p as providers, k as getComputeServerConfigStore, L as LocalComputeServerStore } from \"../../../../../../chunks/providers.server.js\";\nimport { d as requirePermission } from \"../../../../../../chunks/access.server.js\";\nfunction atRestSecretsCheck(report) {\n const base = { id: \"at-rest-secrets\", label: \"Compute server secrets\" };\n if (report === null) {\n return {\n ...base,\n status: \"not_applicable\",\n summary: \"The active data provider does not encrypt secrets at this layer — nothing to verify.\"\n };\n }\n if (report.ok) {\n return {\n ...base,\n status: \"ok\",\n summary: \"All stored compute server API keys decrypt under the current SELVA_AT_REST_KEY.\"\n };\n }\n const failed = report.failures.map((f) => `\"${f.serverLabel}\" (${f.reason}${f.cause ? `: ${f.cause}` : \"\"})`).join(\", \");\n const plaintext = report.plaintextFound;\n return {\n ...base,\n status: \"degraded\",\n summary: `${report.failures.length} compute server key(s) could not be loaded: ${failed}.`,\n remediation: plaintext ? \"A key is stored in plaintext on disk — re-enter it via /admin/compute so it is encrypted.\" : \"The stored ciphertext does not match the current SELVA_AT_REST_KEY (rotated key or restored backup). Re-enter the affected keys via /admin/compute, or restore the original SELVA_AT_REST_KEY, then run this check again.\"\n };\n}\nfunction schemaVersionCheck(report) {\n const base = { id: \"schema-version\", label: \"Database schema\" };\n if (report === null) {\n return {\n ...base,\n status: \"not_applicable\",\n summary: \"The active data provider migrates with the app — there is no separate schema to verify.\"\n };\n }\n if (report.ok) {\n return {\n ...base,\n status: \"ok\",\n summary: `Database migration head ${report.actual} satisfies the app's expected ${report.expected}.`\n };\n }\n return {\n ...base,\n status: \"degraded\",\n summary: report.message ?? `Database migration head ${report.actual ?? \"unavailable\"} is behind the app's expected ${report.expected}.`,\n remediation: \"Sync the provider migrations into your Supabase project and run `npx supabase db push`, then restart the app. `selva doctor` runs the same check from the CLI.\"\n };\n}\nconst COMPUTE_PING_TIMEOUT_MS = 8e3;\nasync function computeReachabilityCheck(locals) {\n const base = { id: \"compute-reachable\", label: \"Default compute server\" };\n let config;\n try {\n config = await getComputeServerConfigStore().getConfig(locals.ctx);\n } catch (err) {\n return {\n ...base,\n status: \"error\",\n summary: `Could not read compute config: ${err instanceof Error ? err.message : String(err)}`\n };\n }\n const server = config.defaultServerId ? findServerById(config, config.defaultServerId) : void 0;\n if (!server) {\n return {\n ...base,\n status: \"not_applicable\",\n summary: \"No default compute server is configured — nothing to reach.\",\n remediation: \"Add a server and set it as default in /admin/compute.\"\n };\n }\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), COMPUTE_PING_TIMEOUT_MS);\n try {\n const headers = {};\n if (server.apiKey) headers[\"RhinoComputeKey\"] = server.apiKey;\n const res = await fetch(new URL(\"/healthcheck\", server.serverUrl).toString(), {\n signal: controller.signal,\n headers\n });\n if (res.ok) {\n return { ...base, status: \"ok\", summary: `\"${server.label}\" answered /healthcheck (200).` };\n }\n return {\n ...base,\n status: \"degraded\",\n summary: `\"${server.label}\" responded ${res.status} to /healthcheck.`,\n remediation: res.status === 401 || res.status === 403 ? \"Authentication rejected — verify the API key in /admin/compute.\" : \"The server is reachable but unhealthy. Check the Rhino.Compute host.\"\n };\n } catch (err) {\n const aborted = err instanceof Error && err.name === \"AbortError\";\n return {\n ...base,\n status: \"degraded\",\n summary: aborted ? `\"${server.label}\" did not respond within ${COMPUTE_PING_TIMEOUT_MS / 1e3}s.` : `\"${server.label}\" is unreachable: ${err instanceof Error ? err.message : String(err)}.`,\n remediation: `Confirm the Rhino.Compute host is running and ${server.serverUrl} is correct.`\n };\n } finally {\n clearTimeout(timer);\n }\n}\nasync function dataPathWritableCheck() {\n const base = { id: \"data-path-writable\", label: \"Data path writable\" };\n if (!(providers.data.computeServer instanceof LocalComputeServerStore)) {\n return {\n ...base,\n status: \"not_applicable\",\n summary: \"The active data provider does not persist to a local DATA_PATH.\"\n };\n }\n const dataPath = private_env.DATA_PATH;\n if (!dataPath) {\n return {\n ...base,\n status: \"error\",\n summary: \"DATA_PATH is unset but the local provider is active.\",\n remediation: \"Set DATA_PATH in .env and restart.\"\n };\n }\n const absolute = resolve(dataPath);\n const probe = join(absolute, `.health-probe-${randomUUID()}`);\n try {\n await mkdir(absolute, { recursive: true });\n await writeFile(probe, \"ok\");\n await unlink(probe);\n return { ...base, status: \"ok\", summary: `DATA_PATH (${dataPath}) is writable.` };\n } catch (err) {\n return {\n ...base,\n status: \"degraded\",\n summary: `DATA_PATH (${dataPath}) is not writable: ${err instanceof Error ? err.message : String(err)}.`,\n remediation: \"Check free disk space and that the directory is owned by the user running the app (`df -h`, `ls -la`).\"\n };\n }\n}\nconst GET = async ({ locals }) => {\n requirePermission(locals, \"instance_admin\");\n const checks = [];\n const store = providers.data.computeServer;\n if (typeof store.verifySecrets === \"function\") {\n try {\n checks.push(atRestSecretsCheck(await store.verifySecrets()));\n } catch (err) {\n checks.push({\n id: \"at-rest-secrets\",\n label: \"Compute server secrets\",\n status: \"error\",\n summary: `Verification threw: ${err instanceof Error ? err.message : String(err)}`,\n remediation: \"Check server logs (`pm2 logs selva-compute`) for the underlying error.\"\n });\n }\n } else {\n checks.push(atRestSecretsCheck(null));\n }\n const data = providers.data;\n if (typeof data.verifySchemaVersion === \"function\") {\n checks.push(schemaVersionCheck(await data.verifySchemaVersion()));\n } else {\n checks.push(schemaVersionCheck(null));\n }\n checks.push(...await Promise.all([computeReachabilityCheck(locals), dataPathWritableCheck()]));\n const rank = {\n ok: 0,\n not_applicable: 0,\n degraded: 2,\n error: 3\n };\n const overall = checks.reduce(\n (worst, c) => rank[c.status] > rank[worst] ? c.status : worst,\n \"ok\"\n );\n return json({ overall, checkedAt: (/* @__PURE__ */ new Date()).toISOString(), checks });\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AASA,SAAS,kBAAkB,CAAC,MAAM,EAAE;AACpC,EAA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AE,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC;AACzF;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { randomFillSync } from 'node:crypto';
|
|
2
2
|
import { json } from '@sveltejs/kit';
|
|
3
|
-
import { a as apiError, A as ApiErrorCode } from '../../../../../../chunks/api-errors.js-
|
|
4
|
-
import { d as requirePermission } from '../../../../../../chunks/access.server.js-
|
|
5
|
-
import '../../../../../../chunks/context.js-
|
|
3
|
+
import { a as apiError, A as ApiErrorCode } from '../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
4
|
+
import { d as requirePermission } from '../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
5
|
+
import '../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../../../../../../chunks/providers.server.js-
|
|
7
|
+
import '../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
8
8
|
import '../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'node:path';
|
|
@@ -13,7 +13,7 @@ import 'node:fs/promises';
|
|
|
13
13
|
import '@supabase/supabase-js';
|
|
14
14
|
import '@selvajs/compute/core';
|
|
15
15
|
import '../../../../../../chunks/schema.js-j3D3emog.js';
|
|
16
|
-
import '../../../../../../chunks/utils4.js-
|
|
16
|
+
import '../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
17
17
|
|
|
18
18
|
const CHUNK_BYTES = 1024 * 1024;
|
|
19
19
|
const DOWNLOAD_DEFAULT_MB = 20;
|
|
@@ -77,4 +77,4 @@ const POST = async ({ locals, request }) => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
export { GET, POST };
|
|
80
|
-
//# sourceMappingURL=_server.ts.js-
|
|
80
|
+
//# sourceMappingURL=_server.ts.js-ufKMuphM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js-
|
|
1
|
+
{"version":3,"file":"_server.ts.js-ufKMuphM.js","sources":["../../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/system/throughput/_server.ts.js"],"sourcesContent":["import { randomFillSync } from \"node:crypto\";\nimport { json } from \"@sveltejs/kit\";\nimport { a as apiError, A as ApiErrorCode } from \"../../../../../../chunks/api-errors.js\";\nimport { d as requirePermission } from \"../../../../../../chunks/access.server.js\";\nconst CHUNK_BYTES = 1024 * 1024;\nconst DOWNLOAD_DEFAULT_MB = 20;\nconst DOWNLOAD_MAX_MB = 256;\nconst UPLOAD_MAX_BYTES = 256 * 1024 * 1024;\nconst GET = async ({ locals, url }) => {\n requirePermission(locals, \"instance_admin\");\n const requested = Number(url.searchParams.get(\"mb\"));\n const mb = Math.min(\n DOWNLOAD_MAX_MB,\n Math.max(1, Number.isFinite(requested) ? requested : DOWNLOAD_DEFAULT_MB)\n );\n let sentChunks = 0;\n const stream = new ReadableStream({\n pull(controller) {\n if (sentChunks >= mb) {\n controller.close();\n return;\n }\n const chunk = new Uint8Array(CHUNK_BYTES);\n randomFillSync(chunk);\n controller.enqueue(chunk);\n sentChunks++;\n }\n });\n return new Response(stream, {\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n \"Content-Length\": String(mb * CHUNK_BYTES),\n \"Cache-Control\": \"no-store\"\n }\n });\n};\nconst POST = async ({ locals, request }) => {\n requirePermission(locals, \"instance_admin\");\n const declared = Number(request.headers.get(\"content-length\"));\n if (Number.isFinite(declared) && declared > UPLOAD_MAX_BYTES) {\n apiError(413, ApiErrorCode.VALIDATION_FAILED, \"Upload exceeds the 256 MB probe limit\");\n }\n if (!request.body) {\n apiError(400, ApiErrorCode.VALIDATION_FAILED, \"Missing request body\");\n }\n const start = performance.now();\n const reader = request.body.getReader();\n let bytes = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n bytes += value.byteLength;\n if (bytes > UPLOAD_MAX_BYTES) {\n await reader.cancel();\n apiError(413, ApiErrorCode.VALIDATION_FAILED, \"Upload exceeds the 256 MB probe limit\");\n }\n }\n const ms = performance.now() - start;\n return json({\n bytes,\n ms: Math.round(ms),\n mbps: ms > 0 ? Number((bytes / (1024 * 1024) / (ms / 1e3)).toFixed(2)) : null\n });\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI;AAC/B,MAAM,mBAAmB,GAAG,EAAE;AAC9B,MAAM,eAAe,GAAG,GAAG;AAC3B,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI;AACrC,MAAC,GAAG,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AACvC,EAAE,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,CAAC;AAC7C,EAAE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtD,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG;AACrB,IAAI,eAAe;AACnB,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,mBAAmB;AAC5E,GAAG;AACH,EAAE,IAAI,UAAU,GAAG,CAAC;AACpB,EAAE,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC;AACpC,IAAI,IAAI,CAAC,UAAU,EAAE;AACrB,MAAM,IAAI,UAAU,IAAI,EAAE,EAAE;AAC5B,QAAQ,UAAU,CAAC,KAAK,EAAE;AAC1B,QAAQ;AACR,MAAM;AACN,MAAM,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC;AAC/C,MAAM,cAAc,CAAC,KAAK,CAAC;AAC3B,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC;AAC/B,MAAM,UAAU,EAAE;AAClB,IAAI;AACJ,GAAG,CAAC;AACJ,EAAE,OAAO,IAAI,QAAQ,CAA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AAC5F,IAAI;AACJ,EAAE;AACF,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;AACtC,EAAE,OAAO,IAAI,CAAC;AACd,IAAI,KAAK;AACT,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACtB,IAAI,IAAI,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG;AAC7E,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { spawn } from 'child_process';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
-
import { readFileSync,
|
|
3
|
+
import { readFileSync, writeFileSync } from 'fs';
|
|
4
4
|
import { b as private_env } from '../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
5
5
|
import { json } from '@sveltejs/kit';
|
|
6
|
-
import
|
|
6
|
+
import '../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
7
|
+
import { w as actorFrom, h as getEventSink, f as getErrorReporter } from '../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
8
|
+
import { d as requirePermission } from '../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
7
9
|
import { c as checkForUpdate, r as readChannel, a as channelTag } from '../../../../../../chunks/updateCheck.server.js-DdReI2pF.js';
|
|
8
|
-
import '../../../../../../chunks/
|
|
10
|
+
import { u as updateLogPath, f as findDeploymentDir, a as updateStatePath, s as startUpdateOutcomeReconciler } from '../../../../../../chunks/selfUpdate.server.js-CXejyqIT.js';
|
|
9
11
|
import 'zod';
|
|
10
|
-
import '../../../../../../chunks/providers.server.js-D0hpk-aq.js';
|
|
11
12
|
import 'node:url';
|
|
12
13
|
import 'node:path';
|
|
13
14
|
import 'node:fs';
|
|
14
15
|
import 'node:crypto';
|
|
15
16
|
import 'node:fs/promises';
|
|
16
17
|
import '@supabase/supabase-js';
|
|
17
|
-
import '../../../../../../chunks/api-errors.js-
|
|
18
|
+
import '../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
18
19
|
import '@selvajs/compute/core';
|
|
19
20
|
import '../../../../../../chunks/schema.js-j3D3emog.js';
|
|
20
|
-
import '../../../../../../chunks/utils4.js-
|
|
21
|
+
import '../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
22
|
+
import '../../../../../../chunks/update-outcome.js-mUyfVCnt.js';
|
|
21
23
|
|
|
22
|
-
const UPDATE_LOG_PATH = "/tmp/selva-update.log";
|
|
23
24
|
function stripAnsi(str) {
|
|
24
25
|
return str.replace(/\x1B\[[0-9;]*[mGKHF]/g, "");
|
|
25
26
|
}
|
|
@@ -36,10 +37,10 @@ function readRuntimeVersion(dir) {
|
|
|
36
37
|
function shellQuote(s) {
|
|
37
38
|
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
38
39
|
}
|
|
39
|
-
function buildLauncher(runnerScript, prelude = []) {
|
|
40
|
+
function buildLauncher(runnerScript, logPath, prelude = []) {
|
|
40
41
|
const echoes = prelude.map((line) => `echo ${shellQuote(line)}`).join("\n");
|
|
41
42
|
return `
|
|
42
|
-
LOGFILE=${shellQuote(
|
|
43
|
+
LOGFILE=${shellQuote(logPath)}
|
|
43
44
|
RUNNER=/tmp/selva-update-runner.sh
|
|
44
45
|
mkdir -p "$(dirname "$LOGFILE")"
|
|
45
46
|
: > "$LOGFILE"
|
|
@@ -85,6 +86,7 @@ TAG=${distTag}
|
|
|
85
86
|
# this script is to update the app; leaving it down is the worst possible
|
|
86
87
|
# outcome.
|
|
87
88
|
on_exit() {
|
|
89
|
+
CODE=$?
|
|
88
90
|
STATUS=$(pm2 jlist 2>/dev/null | node -e "
|
|
89
91
|
try {
|
|
90
92
|
const list = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
|
|
@@ -97,6 +99,9 @@ on_exit() {
|
|
|
97
99
|
pm2 start "$ECOSYSTEM" --update-env >/dev/null 2>&1 || \\
|
|
98
100
|
echo "[RECOVER] pm2 start failed — manual intervention required: cd $(dirname "$ECOSYSTEM") && pm2 start ecosystem.config.cjs"
|
|
99
101
|
fi
|
|
102
|
+
# Terminal marker: the restarted app's outcome reconciler greps this to turn
|
|
103
|
+
# the run into an audit event (selfUpdate.server.ts). Keep the format stable.
|
|
104
|
+
echo "[EXIT] code=$CODE"
|
|
100
105
|
}
|
|
101
106
|
trap on_exit EXIT
|
|
102
107
|
|
|
@@ -255,28 +260,13 @@ echo "[FATAL] Manual recovery required. Check: pm2 logs selva-compute"
|
|
|
255
260
|
exit 6
|
|
256
261
|
`;
|
|
257
262
|
}
|
|
258
|
-
function isDeploymentDir(dir) {
|
|
259
|
-
return existsSync(join(dir, "node_modules", "@selvajs", "selva", "package.json"));
|
|
260
|
-
}
|
|
261
263
|
function npmInstallArgs(channel) {
|
|
262
264
|
const tag = channelTag(channel);
|
|
263
265
|
return ["install", "--save", "--prefer-online", `@selvajs/cli@${tag}`, `@selvajs/selva@${tag}`];
|
|
264
266
|
}
|
|
265
267
|
function detectUpdatePlan(channel) {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
return { cwd: private_env.INSTALL_DIR, args };
|
|
269
|
-
}
|
|
270
|
-
let dir = process.cwd();
|
|
271
|
-
for (let i = 0; i < 6; i++) {
|
|
272
|
-
if (isDeploymentDir(dir)) {
|
|
273
|
-
return { cwd: dir, args };
|
|
274
|
-
}
|
|
275
|
-
const parent = join(dir, "..");
|
|
276
|
-
if (parent === dir) break;
|
|
277
|
-
dir = parent;
|
|
278
|
-
}
|
|
279
|
-
return null;
|
|
268
|
+
const dir = findDeploymentDir(private_env);
|
|
269
|
+
return dir ? { cwd: dir, args: npmInstallArgs(channel) } : null;
|
|
280
270
|
}
|
|
281
271
|
const POST = async ({ locals }) => {
|
|
282
272
|
requirePermission(locals, "instance_admin");
|
|
@@ -290,6 +280,25 @@ const POST = async ({ locals }) => {
|
|
|
290
280
|
{ status: 500, headers: { "Content-Type": "application/json" } }
|
|
291
281
|
);
|
|
292
282
|
}
|
|
283
|
+
const versionBefore = readRuntimeVersion(plan.cwd);
|
|
284
|
+
const actorId = locals.ctx ? actorFrom(locals.ctx) : "system";
|
|
285
|
+
const pending = {
|
|
286
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
287
|
+
actorId,
|
|
288
|
+
channel,
|
|
289
|
+
fromVersion: versionBefore
|
|
290
|
+
};
|
|
291
|
+
try {
|
|
292
|
+
writeFileSync(updateStatePath(plan.cwd), JSON.stringify(pending, null, " "));
|
|
293
|
+
} catch (err) {
|
|
294
|
+
console.error("[selfUpdate] could not persist pending-update state:", err);
|
|
295
|
+
}
|
|
296
|
+
await getEventSink().emit({
|
|
297
|
+
type: "system.update.started",
|
|
298
|
+
channel,
|
|
299
|
+
fromVersion: versionBefore,
|
|
300
|
+
actorId
|
|
301
|
+
});
|
|
293
302
|
const stream = new ReadableStream({
|
|
294
303
|
start(controller) {
|
|
295
304
|
const encoder = new TextEncoder();
|
|
@@ -300,7 +309,6 @@ const POST = async ({ locals }) => {
|
|
|
300
309
|
controller.enqueue(encoder.encode(message));
|
|
301
310
|
}
|
|
302
311
|
try {
|
|
303
|
-
const versionBefore = readRuntimeVersion(plan.cwd);
|
|
304
312
|
const prelude = [
|
|
305
313
|
`[INFO] Updating deployment (cwd: ${plan.cwd}, channel: ${channel})`,
|
|
306
314
|
...versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : []
|
|
@@ -312,7 +320,7 @@ const POST = async ({ locals }) => {
|
|
|
312
320
|
channelTag(channel)
|
|
313
321
|
);
|
|
314
322
|
const cmd = "bash";
|
|
315
|
-
const args = ["-c", buildLauncher(runnerScript, prelude)];
|
|
323
|
+
const args = ["-c", buildLauncher(runnerScript, updateLogPath(plan.cwd), prelude)];
|
|
316
324
|
const localBin = join(plan.cwd, "node_modules", ".bin");
|
|
317
325
|
const child = spawn(cmd, args, {
|
|
318
326
|
cwd: plan.cwd,
|
|
@@ -327,6 +335,11 @@ const POST = async ({ locals }) => {
|
|
|
327
335
|
stdio: ["ignore", "pipe", "pipe"]
|
|
328
336
|
});
|
|
329
337
|
child.unref();
|
|
338
|
+
startUpdateOutcomeReconciler({
|
|
339
|
+
deploymentDir: plan.cwd,
|
|
340
|
+
emit: (e) => getEventSink().emit(e),
|
|
341
|
+
report: (err) => getErrorReporter().capture(err, { tags: { origin: "selfUpdate" } })
|
|
342
|
+
});
|
|
330
343
|
const timeout = setTimeout(
|
|
331
344
|
() => {
|
|
332
345
|
try {
|
|
@@ -398,7 +411,7 @@ const GET = async ({ locals, url, fetch }) => {
|
|
|
398
411
|
}
|
|
399
412
|
let body = "";
|
|
400
413
|
try {
|
|
401
|
-
body = readFileSync(
|
|
414
|
+
body = readFileSync(updateLogPath(findDeploymentDir(private_env)), "utf8");
|
|
402
415
|
} catch {
|
|
403
416
|
}
|
|
404
417
|
return new Response(body, {
|
|
@@ -410,4 +423,4 @@ const GET = async ({ locals, url, fetch }) => {
|
|
|
410
423
|
};
|
|
411
424
|
|
|
412
425
|
export { GET, POST };
|
|
413
|
-
//# sourceMappingURL=_server.ts.js-
|
|
426
|
+
//# sourceMappingURL=_server.ts.js-D-IGlEji.js.map
|
package/build/server/chunks/entries/endpoints/admin/api/system/update/_server.ts.js-D-IGlEji.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js-D-IGlEji.js","sources":["../../../../../../../../../.svelte-kit/output/server/entries/endpoints/admin/api/system/update/_server.ts.js"],"sourcesContent":["import { spawn } from \"child_process\";\nimport { join } from \"path\";\nimport { readFileSync, writeFileSync } from \"fs\";\nimport { b as private_env } from \"../../../../../../chunks/shared-server.js\";\nimport { json } from \"@sveltejs/kit\";\nimport \"../../../../../../chunks/context.js\";\nimport { o as actorFrom, a as getEventSink, g as getErrorReporter } from \"../../../../../../chunks/providers.server.js\";\nimport { d as requirePermission } from \"../../../../../../chunks/access.server.js\";\nimport { c as checkForUpdate, r as readChannel, a as channelTag } from \"../../../../../../chunks/updateCheck.server.js\";\nimport { u as updateLogPath, f as findDeploymentDir, a as updateStatePath, s as startUpdateOutcomeReconciler } from \"../../../../../../chunks/selfUpdate.server.js\";\nfunction stripAnsi(str) {\n return str.replace(/\\x1B\\[[0-9;]*[mGKHF]/g, \"\");\n}\nfunction readRuntimeVersion(dir) {\n try {\n const pkg = JSON.parse(\n readFileSync(join(dir, \"node_modules\", \"@selvajs\", \"selva\", \"package.json\"), \"utf8\")\n );\n return typeof pkg.version === \"string\" ? pkg.version : void 0;\n } catch {\n return void 0;\n }\n}\nfunction shellQuote(s) {\n return `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\nfunction buildLauncher(runnerScript, logPath, prelude = []) {\n const echoes = prelude.map((line) => `echo ${shellQuote(line)}`).join(\"\\n\");\n return `\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}\nfunction buildNpmRunnerScript(npmArgs, versionBefore, ecosystemPath, tag) {\n const npmCommand = [\"npm\", ...npmArgs].map(shellQuote).join(\" \");\n const before = shellQuote(versionBefore ?? \"\");\n const ecosystem = shellQuote(ecosystemPath);\n const distTag = shellQuote(tag);\n return `#!/bin/bash\nset -o pipefail\nBEFORE=${before}\nECOSYSTEM=${ecosystem}\nTAG=${distTag}\n\n# Last-resort safety net. If the script exits with the app NOT online for\n# any reason (crash, kill -9, network blip, npm hang past timeout), try to\n# bring it back from ecosystem.config.cjs before we go. The whole point of\n# this script is to update the app; leaving it down is the worst possible\n# outcome.\non_exit() {\n CODE=$?\n STATUS=$(pm2 jlist 2>/dev/null | node -e \"\n try {\n const list = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));\n const app = list.find(p => p.name === 'selva-compute');\n process.stdout.write(app ? app.pm2_env.status : 'missing');\n } catch { process.stdout.write('error'); }\n \" 2>/dev/null || echo \"error\")\n if [ \"$STATUS\" != \"online\" ]; then\n echo \"[RECOVER] selva-compute is '$STATUS' — starting from ecosystem.config.cjs\"\n pm2 start \"$ECOSYSTEM\" --update-env >/dev/null 2>&1 || \\\\\n echo \"[RECOVER] pm2 start failed — manual intervention required: cd $(dirname \"$ECOSYSTEM\") && pm2 start ecosystem.config.cjs\"\n fi\n # 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# ---------------------------------------------------------------------------\n# 1. Pre-flight: skip the whole cycle if there's nothing to install.\n# ---------------------------------------------------------------------------\n# Without this, clicking \"Update\" on an already-current instance triggered\n# a full stop/install/start cycle and a downtime window for no reason. Now\n# we just check the registry first.\necho \"[STEP] Checking npm registry for 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# 2. Resync PM2 daemon if its in-memory version drifted from the CLI on disk.\n# ---------------------------------------------------------------------------\n# After a global pm2 upgrade the daemon keeps running its original version\n# while the CLI moves forward. Process commands then talk to a stale daemon\n# and the symptom is \"stop works, start never lands\". \\`pm2 update\\` dumps\n# processes, kills the daemon, respawns on the current CLI, restores the\n# dump. Doing it before we touch anything keeps the rest of the script\n# talking to a coherent daemon.\necho \"[STEP] Checking PM2 daemon/CLI version sync\"\nif pm2 ping 2>&1 | grep -q \"out-of-date\" || pm2 list 2>&1 | grep -q \"out-of-date\"; then\n echo \"[STEP] PM2 daemon is out-of-date — running 'pm2 update' to resync\"\n if ! pm2 update; then\n echo \"[FATAL] pm2 update failed — aborting before stopping the running app\"\n exit 1\n fi\n echo \"[INFO] PM2 daemon resynced\"\nfi\n\n# ---------------------------------------------------------------------------\n# 3. Stop selva-compute BEFORE npm rewrites build/.\n# ---------------------------------------------------------------------------\n# SvelteKit's node adapter lazy-imports chunks from build/server/chunks/ on\n# every request. Letting npm rewrite build/ while the old process is still\n# serving traffic = in-flight requests hit ERR_MODULE_NOT_FOUND for chunks\n# whose hash just changed under their feet. Stopping first is a brief\n# downtime window (~1-2s longer than restart-in-place) for a much smaller\n# blast radius.\n#\n# This is also where the SSE connection to the frontend dies — selva-compute\n# IS the SSE server. From here on, the user sees output via the log-file\n# polling fallback in the admin UI, not over SSE.\necho \"[STEP] Stopping selva-compute\"\nif ! pm2 stop selva-compute; then\n echo \"[WARN] pm2 stop failed — selva-compute may not be running yet. Continuing.\"\nfi\n\n# ---------------------------------------------------------------------------\n# 4. Run npm update.\n# ---------------------------------------------------------------------------\necho \"[STEP] Updating @selvajs/* packages\"\nif ! ${npmCommand}; then\n echo \"[FATAL] npm update failed — EXIT trap will restart the previous build\"\n exit 1\nfi\n\nAFTER=$(node -e \"try{console.log(require('./node_modules/@selvajs/selva/package.json').version)}catch(e){}\" 2>/dev/null)\necho \"[INFO] New @selvajs/selva: \\${AFTER:-unknown}\"\n\nif [ -n \"$BEFORE\" ] && [ \"$BEFORE\" = \"$AFTER\" ]; then\n echo \"[WARN] No version change ($BEFORE). Your npm cache may be stale.\"\n echo \"[WARN] Recover with:\"\n echo \"[WARN] npm cache clean --force\"\n echo \"[WARN] rm -rf node_modules package-lock.json\"\n echo \"[WARN] npm install --prefer-online\"\nfi\n\n# ---------------------------------------------------------------------------\n# 5. Start selva-compute with the new build.\n# ---------------------------------------------------------------------------\n# Start from ecosystem.config.cjs, NOT \\`pm2 start selva-compute\\` — the\n# latter requires selva-compute to already be in pm2's in-memory process\n# list. After a \\`pm2 update\\` (step 2) that's not guaranteed.\necho \"[STEP] Starting selva-compute with new build\"\nif ! pm2 start \"$ECOSYSTEM\" --update-env; then\n echo \"[FATAL] pm2 start failed — investigate with \\\\\\`pm2 logs selva-compute\\\\\\`\"\n exit 2\nfi\n\n# ---------------------------------------------------------------------------\n# 6. Health probe the new process.\n# ---------------------------------------------------------------------------\n# Read PORT from .env the same way scripts/update.sh does, so non-default\n# ports are respected.\nPORT=$(grep \"^PORT=\" .env 2>/dev/null \\\\\n | head -1 \\\\\n | cut -d'=' -f2 \\\\\n | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e 's/^[\"'\"'\"']//' -e 's/[\"'\"'\"']$//' -e 's/[[:space:]]*#.*//')\nPORT=\\${PORT:-3000}\n\necho \"[STEP] Health-probing the new process on port $PORT\"\nHEALTHY=0\nfor i in $(seq 1 15); do\n sleep 2\n CODE=$(curl -sS -o /tmp/selva-health.$$ -w \"%{http_code}\" --max-time 5 \"http://localhost:$PORT/api/health\" 2>/dev/null || echo \"000\")\n if [ \"$CODE\" = \"200\" ]; then\n HEALTHY=1\n echo \"[INFO] Health probe passed after \\${i} attempt(s)\"\n rm -f /tmp/selva-health.$$\n break\n fi\n echo \"[INFO] Probe attempt $i/15: HTTP $CODE — retrying\"\ndone\n\nif [ \"$HEALTHY\" = \"1\" ]; then\n echo \"[DONE] Update complete\"\n exit 0\nfi\n\n# ---------------------------------------------------------------------------\n# 7. Rollback path.\n# ---------------------------------------------------------------------------\necho \"[FATAL] New process failed health check after 30s\"\nif [ -f /tmp/selva-health.$$ ]; then\n echo \"[FATAL] Last response body:\"\n cat /tmp/selva-health.$$\n rm -f /tmp/selva-health.$$\nfi\n\nif [ -z \"$BEFORE\" ]; then\n echo \"[FATAL] No prior version recorded — cannot roll back automatically.\"\n echo \"[FATAL] EXIT trap will attempt to restart the current build anyway.\"\n exit 3\nfi\n\necho \"[STEP] Rolling back @selvajs/selva to $BEFORE\"\npm2 stop selva-compute >/dev/null 2>&1 || true\nif ! npm install --save \"@selvajs/selva@$BEFORE\"; then\n echo \"[FATAL] Rollback npm install failed — EXIT trap will retry restart.\"\n exit 4\nfi\n\npm2 start \"$ECOSYSTEM\" --update-env || true\nsleep 3\nROLLBACK_CODE=$(curl -sS -o /dev/null -w \"%{http_code}\" --max-time 5 \"http://localhost:$PORT/api/health\" 2>/dev/null || echo \"000\")\nif [ \"$ROLLBACK_CODE\" = \"200\" ]; then\n echo \"[DONE] Rolled back to $BEFORE — previous version is online\"\n exit 5\nfi\n\necho \"[FATAL] Rollback restart also failed health check (HTTP $ROLLBACK_CODE)\"\necho \"[FATAL] Manual recovery required. Check: pm2 logs selva-compute\"\nexit 6\n`;\n}\nfunction npmInstallArgs(channel) {\n const tag = channelTag(channel);\n return [\"install\", \"--save\", \"--prefer-online\", `@selvajs/cli@${tag}`, `@selvajs/selva@${tag}`];\n}\nfunction detectUpdatePlan(channel) {\n const dir = findDeploymentDir(private_env);\n return dir ? { cwd: dir, args: npmInstallArgs(channel) } : null;\n}\nconst POST = async ({ locals }) => {\n requirePermission(locals, \"instance_admin\");\n const channel = readChannel();\n const plan = detectUpdatePlan(channel);\n if (!plan) {\n return new Response(\n JSON.stringify({\n error: \"Couldn't determine how to update this deployment. Expected node_modules/@selvajs/selva (CLI scaffold) in the cwd or a parent directory.\"\n }),\n { status: 500, headers: { \"Content-Type\": \"application/json\" } }\n );\n }\n const versionBefore = readRuntimeVersion(plan.cwd);\n const actorId = locals.ctx ? actorFrom(locals.ctx) : \"system\";\n const pending = {\n startedAt: (/* @__PURE__ */ new Date()).toISOString(),\n actorId,\n channel,\n fromVersion: versionBefore\n };\n try {\n writeFileSync(updateStatePath(plan.cwd), JSON.stringify(pending, null, \"\t\"));\n } catch (err) {\n console.error(\"[selfUpdate] could not persist pending-update state:\", err);\n }\n await getEventSink().emit({\n type: \"system.update.started\",\n channel,\n fromVersion: versionBefore,\n actorId\n });\n const stream = new ReadableStream({\n start(controller) {\n const encoder = new TextEncoder();\n function sendEvent(type, data) {\n const message = `data: ${JSON.stringify({ type, ...data })}\n\n`;\n controller.enqueue(encoder.encode(message));\n }\n try {\n const prelude = [\n `[INFO] Updating deployment (cwd: ${plan.cwd}, channel: ${channel})`,\n ...versionBefore ? [`[INFO] Current @selvajs/selva: ${versionBefore}`] : []\n ];\n const runnerScript = buildNpmRunnerScript(\n plan.args,\n versionBefore,\n join(plan.cwd, \"ecosystem.config.cjs\"),\n channelTag(channel)\n );\n const cmd = \"bash\";\n const args = [\"-c\", buildLauncher(runnerScript, updateLogPath(plan.cwd), prelude)];\n const localBin = join(plan.cwd, \"node_modules\", \".bin\");\n const child = spawn(cmd, args, {\n cwd: plan.cwd,\n env: {\n // eslint-disable-next-line no-restricted-properties -- OS env for the spawned child, not .env config\n PATH: `${localBin}:${process.env.PATH ?? \"\"}`,\n // eslint-disable-next-line no-restricted-properties -- OS env for the spawned child, not .env config\n HOME: process.env.HOME,\n INSTALL_DIR: plan.cwd\n },\n detached: true,\n stdio: [\"ignore\", \"pipe\", \"pipe\"]\n });\n child.unref();\n startUpdateOutcomeReconciler({\n deploymentDir: plan.cwd,\n emit: (e) => getEventSink().emit(e),\n report: (err) => getErrorReporter().capture(err, { tags: { origin: \"selfUpdate\" } })\n });\n const timeout = setTimeout(\n () => {\n try {\n if (child.pid) process.kill(-child.pid, \"SIGTERM\");\n } catch {\n }\n sendEvent(\"log\", { data: \"[FATAL] Update timed out after 15 minutes\" });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n },\n 15 * 60 * 1e3\n );\n let restarting = false;\n child.stdout.on(\"data\", (data) => {\n const lines = data.toString().split(\"\\n\");\n for (const line of lines) {\n const clean = stripAnsi(line).trim();\n if (clean) {\n if (!restarting && (clean.includes(\"Applying action stopProcessId\") || clean.includes(\"Applying action restartProcessId\"))) {\n restarting = true;\n sendEvent(\"restarting\", { data: clean });\n } else {\n sendEvent(\"log\", { data: clean });\n }\n }\n }\n });\n child.stderr.on(\"data\", (data) => {\n const lines = data.toString().split(\"\\n\");\n for (const line of lines) {\n const clean = stripAnsi(line).trim();\n if (clean) {\n sendEvent(\"log\", { data: `[ERROR] ${clean}` });\n }\n }\n });\n child.on(\"close\", (code) => {\n clearTimeout(timeout);\n sendEvent(\"exit\", { code: code ?? -1 });\n controller.close();\n });\n child.on(\"error\", (err) => {\n clearTimeout(timeout);\n sendEvent(\"log\", { data: `[FATAL] ${err.message}` });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n });\n } catch (err) {\n sendEvent(\"log\", { data: `[FATAL] Failed to spawn process: ${err}` });\n sendEvent(\"exit\", { code: -1 });\n controller.close();\n }\n }\n });\n return new Response(stream, {\n headers: {\n \"Content-Type\": \"text/event-stream\",\n \"Cache-Control\": \"no-cache\",\n Connection: \"keep-alive\"\n }\n });\n};\nconst GET = async ({ locals, url, fetch }) => {\n requirePermission(locals, \"instance_admin\");\n if (url.searchParams.get(\"check\") !== null) {\n return json(await checkForUpdate(fetch, readChannel()), {\n headers: { \"Cache-Control\": \"no-store\" }\n });\n }\n let body = \"\";\n try {\n body = readFileSync(updateLogPath(findDeploymentDir(private_env)), \"utf8\");\n } catch {\n }\n return new Response(body, {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n \"Cache-Control\": \"no-store\"\n }\n });\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,SAAS,CAAC,GAAG,EAAE;AACxB,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC;AACjD;AACA,SAAS,kBAAkB,CAAC,GAAG,EAAE;AACjC,EAAE,IAAI;AACN,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK;AAC1B,MAAM,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM;AACzF,KAAK;AACL,IAAI,OAAO,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;AACjE,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,OAAO,MAAM;AACjB,EAAE;AACF;AACA,SAAS,UAAU,CAAC,CAAC,EAAE;AACvB,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxC;AACA,SAAS,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AAC5D,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7E,EAAE,OAAO;AACT,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC;AAC7B;AACA;AACA;;AAEA;AACA,EAAE,YAAY;AACd;AACA;;AAEA;AACA;AACA,EAAE,MAAM;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,SAAS,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,EAAE;AAC1E,EAAE,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAClE,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,IAAI,EAAE,CAAC;AAChD,EAAE,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC;AAC7C,EAAE,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC;AACjC,EAAE,OAAO,CAAC;AACV;AACA,OAAO,EAAE,MAAM;AACf,UAAU,EAAE,SAAS;AACrB,IAAI,EAAE,OAAO;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,EAAE,UAAU,CAAC;AAClB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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|
|
2
|
-
import { a as getPermissionStore, g as getAuthProvider, c as getDataProvider, d as getOrganizationProvider } from '../../../../../../chunks/providers.server.js-
|
|
3
|
-
import { e as requireManageInstanceUsers } from '../../../../../../chunks/access.server.js-
|
|
4
|
-
import { a as apiError, t as throwZodError, A as ApiErrorCode } from '../../../../../../chunks/api-errors.js-
|
|
5
|
-
import { S as SYSTEM_CONTEXT, h as hasPermission, D as DEFAULT_ORG_PERMISSIONS, M as MEMBER_ASSIGNABLE_PERMISSIONS, P as PlatformPermissionSchema, b as OrgPermissionSchema } from '../../../../../../chunks/context.js-
|
|
6
|
-
import { s as splitFlatPermissions } from '../../../../../../chunks/permissions-compat.server.js-
|
|
7
|
-
import { s as setUserPlatformPermissions } from '../../../../../../chunks/permissions.server.js-
|
|
2
|
+
import { a as getPermissionStore, g as getAuthProvider, c as getDataProvider, d as getOrganizationProvider } from '../../../../../../chunks/providers.server.js-CIHOepKv.js';
|
|
3
|
+
import { e as requireManageInstanceUsers } from '../../../../../../chunks/access.server.js-_nJWuQcN.js';
|
|
4
|
+
import { a as apiError, t as throwZodError, A as ApiErrorCode } from '../../../../../../chunks/api-errors.js-DlfcfPJs.js';
|
|
5
|
+
import { S as SYSTEM_CONTEXT, h as hasPermission, D as DEFAULT_ORG_PERMISSIONS, M as MEMBER_ASSIGNABLE_PERMISSIONS, P as PlatformPermissionSchema, b as OrgPermissionSchema } from '../../../../../../chunks/context.js-DsQGiS2x.js';
|
|
6
|
+
import { s as splitFlatPermissions } from '../../../../../../chunks/permissions-compat.server.js-DNsLyriU.js';
|
|
7
|
+
import { s as setUserPlatformPermissions } from '../../../../../../chunks/permissions.server.js-C3_SFjUh.js';
|
|
8
8
|
import '../../../../../../chunks/shared-server.js-DaWdgxVh.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'node:path';
|
|
@@ -15,7 +15,7 @@ import '@supabase/supabase-js';
|
|
|
15
15
|
import '@sveltejs/kit';
|
|
16
16
|
import '@selvajs/compute/core';
|
|
17
17
|
import '../../../../../../chunks/schema.js-j3D3emog.js';
|
|
18
|
-
import '../../../../../../chunks/utils4.js-
|
|
18
|
+
import '../../../../../../chunks/utils4.js-8SHxuGTr.js';
|
|
19
19
|
|
|
20
20
|
const FlatPermissionSchema = z.union([PlatformPermissionSchema, OrgPermissionSchema]);
|
|
21
21
|
const UpdatePermissionsBody = z.object({
|
|
@@ -104,4 +104,4 @@ const DELETE = async ({ params, locals }) => {
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
export { DELETE, PATCH };
|
|
107
|
-
//# sourceMappingURL=_server.ts.js-
|
|
107
|
+
//# sourceMappingURL=_server.ts.js-7Efk1xkU.js.map
|