@minecraft-docker/mcctl-console 1.15.2 → 1.15.4

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.
Files changed (83) hide show
  1. package/.next/standalone/package.json +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +15 -15
  4. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
  6. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/[id]/route.js +11 -2
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/export/route.js +11 -2
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/route.js +11 -2
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stats/route.js +11 -2
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stream/route.js +11 -2
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/auth/[...all]/route.js +11 -2
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/history/route.js +10 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/restore/route.js +10 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/route.js +10 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/ban/route.js +10 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/kick/route.js +11 -2
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/op/route.js +10 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/route.js +10 -1
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/whitelist/route.js +10 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/router/status/route.js +10 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/[action]/route.js +10 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config/route.js +10 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/exec/route.js +10 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/route.js +10 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/world/reset/route.js +10 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/route.js +10 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/[id]/route.js +11 -2
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/route.js +11 -2
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/users/route.js +11 -2
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/[action]/route.js +10 -1
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/route.js +10 -1
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/route.js +10 -1
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +1 -1
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +1 -1
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +1 -1
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +1 -1
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +1 -1
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +1 -1
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  66. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +1 -1
  67. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  68. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +10 -10
  70. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/613.js +11 -2
  71. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  72. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
  73. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
  74. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  75. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  76. package/.next/standalone/platform/services/mcctl-console/.next/server/pages-manifest.json +1 -1
  77. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  78. package/.next/standalone/platform/services/mcctl-console/package.json +1 -1
  79. package/package.json +2 -2
  80. /package/.next/standalone/platform/services/mcctl-console/.next/static/{ddlfT0dafY0G-jGkapBmi → ZVkcx2OmeAN6P00KKasi0}/_buildManifest.js +0 -0
  81. /package/.next/standalone/platform/services/mcctl-console/.next/static/{ddlfT0dafY0G-jGkapBmi → ZVkcx2OmeAN6P00KKasi0}/_ssgManifest.js +0 -0
  82. /package/.next/static/{ddlfT0dafY0G-jGkapBmi → ZVkcx2OmeAN6P00KKasi0}/_buildManifest.js +0 -0
  83. /package/.next/static/{ddlfT0dafY0G-jGkapBmi → ZVkcx2OmeAN6P00KKasi0}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=6185,e.ids=[6185],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},69903:(e,r,s)=>{s.r(r),s.d(r,{originalPathname:()=>_,patchFetch:()=>A,requestAsyncStorage:()=>E,routeModule:()=>T,serverHooks:()=>L,staticGenerationAsyncStorage:()=>N});var t={};s.r(t),s.d(t,{GET:()=>v,POST:()=>f,dynamic:()=>c});var a=s(3025),i=s(45086),n=s(74048),o=s(24517),d=s(31969),u=s(77605),l=s(97060),m=s(74888);let c="force-dynamic";function p(){let e=new l.x;return new m.e(e)}async function v(e){try{let r=await d.I.api.getSession({headers:await (0,u.headers)()});if(!r)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});let s=e.nextUrl.searchParams.get("serverId");if(!s)return o.NextResponse.json({error:"BadRequest",message:"serverId query parameter is required"},{status:400});if("admin"!==r.user.role){let e=p();if(!await e.hasPermission(r.user.id,s,"admin"))return o.NextResponse.json({error:"Forbidden",message:"Admin permission required"},{status:403})}let t=p(),a=await t.getServerUsersWithDetails(s);return o.NextResponse.json({users:a,total:a.length})}catch(e){return console.error("Failed to list user-server permissions:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to list permissions"},{status:500})}}async function f(e){try{let r=await d.I.api.getSession({headers:await (0,u.headers)()});if(!r)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});let{userId:s,serverId:t,permission:a}=await e.json();if(!s||!t||!a)return o.NextResponse.json({error:"BadRequest",message:"userId, serverId, and permission are required"},{status:400});if(!["view","manage","admin"].includes(a))return o.NextResponse.json({error:"BadRequest",message:"Permission must be view, manage, or admin"},{status:400});if("admin"!==r.user.role){let e=p();if(!await e.hasPermission(r.user.id,t,"admin"))return o.NextResponse.json({error:"Forbidden",message:"Admin permission required to grant access"},{status:403})}let i=p(),n=await i.grantAccess(s,t,a);return o.NextResponse.json(n,{status:201})}catch(e){if(e instanceof m.o)return o.NextResponse.json({error:"Forbidden",message:e.message},{status:403});return console.error("Failed to grant access:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to grant access"},{status:500})}}let T=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/user-servers/route",pathname:"/api/user-servers",filename:"route",bundlePath:"app/api/user-servers/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/user-servers/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:E,staticGenerationAsyncStorage:N,serverHooks:L}=T,_="/api/user-servers/route";function A(){return(0,n.patchFetch)({serverHooks:L,staticGenerationAsyncStorage:N})}},97060:(e,r,s)=>{s.d(r,{x:()=>n});var t=s(30579),a=s(22587),i=s(8290);class n{async findById(e){return(await a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.id,e)).limit(1))[0]??null}async findByUserAndServer(e,r){return(await a.db.select().from(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.userId,e),(0,t.eq)(i.userServers.serverId,r))).limit(1))[0]??null}async findByServer(e){return a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.serverId,e))}async findByServerWithUsers(e){return(await a.db.select({id:i.userServers.id,userId:i.userServers.userId,serverId:i.userServers.serverId,permission:i.userServers.permission,createdAt:i.userServers.createdAt,updatedAt:i.userServers.updatedAt,user:{id:i.users.id,name:i.users.name,email:i.users.email,image:i.users.image}}).from(i.userServers).leftJoin(i.users,(0,t.eq)(i.userServers.userId,i.users.id)).where((0,t.eq)(i.userServers.serverId,e))).map(e=>({id:e.id,userId:e.userId,serverId:e.serverId,permission:e.permission,createdAt:e.createdAt,updatedAt:e.updatedAt,user:e.user??void 0}))}async findByUser(e){return a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.userId,e))}async create(e){let r=await a.db.insert(i.userServers).values(e).returning();if(!r[0])throw Error("Failed to create user-server permission");return r[0]}async updatePermission(e,r){let s=await a.db.update(i.userServers).set({permission:r,updatedAt:new Date}).where((0,t.eq)(i.userServers.id,e)).returning();if(!s[0])throw Error(`User-server permission not found: ${e}`);return s[0]}async delete(e){await a.db.delete(i.userServers).where((0,t.eq)(i.userServers.id,e))}async deleteByUserAndServer(e,r){await a.db.delete(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.userId,e),(0,t.eq)(i.userServers.serverId,r)))}async countByServerAndPermission(e,r){return(await a.db.select().from(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.serverId,e),(0,t.eq)(i.userServers.permission,r)))).length}}},31969:(e,r,s)=>{s.d(r,{I:()=>d});var t=s(33580),a=s(5944),i=s(90224),n=s(22587),o=s(8290);let d=(0,t.kj)({database:(0,a.s)(n.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,i.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,r,s)=>{s.d(r,{db:()=>c});var t=s(85890),a=s.n(t),i=s(31590),n=s(8290),o=s(55315),d=s.n(o),u=s(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let r=d().dirname(e);(0,u.existsSync)(r)||(0,u.mkdirSync)(r,{recursive:!0})}(l);let m=new(a())(l);m.pragma("journal_mode = WAL"),m.pragma("foreign_keys = ON"),m.exec(`
1
+ "use strict";(()=>{var e={};e.id=6185,e.ids=[6185],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},69903:(e,r,s)=>{s.r(r),s.d(r,{originalPathname:()=>_,patchFetch:()=>A,requestAsyncStorage:()=>f,routeModule:()=>v,serverHooks:()=>L,staticGenerationAsyncStorage:()=>N});var t={};s.r(t),s.d(t,{GET:()=>T,POST:()=>E,dynamic:()=>m});var a=s(3025),i=s(45086),n=s(74048),o=s(24517),d=s(31969),u=s(77605),l=s(97060),c=s(74888);let m="force-dynamic";function p(){let e=new l.x;return new c.e(e)}async function T(e){try{let r=await d.I.api.getSession({headers:await (0,u.headers)()});if(!r)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});let s=e.nextUrl.searchParams.get("serverId");if(!s)return o.NextResponse.json({error:"BadRequest",message:"serverId query parameter is required"},{status:400});if("admin"!==r.user.role){let e=p();if(!await e.hasPermission(r.user.id,s,"admin"))return o.NextResponse.json({error:"Forbidden",message:"Admin permission required"},{status:403})}let t=p(),a=await t.getServerUsersWithDetails(s);return o.NextResponse.json({users:a,total:a.length})}catch(e){return console.error("Failed to list user-server permissions:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to list permissions"},{status:500})}}async function E(e){try{let r=await d.I.api.getSession({headers:await (0,u.headers)()});if(!r)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});let{userId:s,serverId:t,permission:a}=await e.json();if(!s||!t||!a)return o.NextResponse.json({error:"BadRequest",message:"userId, serverId, and permission are required"},{status:400});if(!["view","manage","admin"].includes(a))return o.NextResponse.json({error:"BadRequest",message:"Permission must be view, manage, or admin"},{status:400});if("admin"!==r.user.role){let e=p();if(!await e.hasPermission(r.user.id,t,"admin"))return o.NextResponse.json({error:"Forbidden",message:"Admin permission required to grant access"},{status:403})}let i=p(),n=await i.grantAccess(s,t,a);return o.NextResponse.json(n,{status:201})}catch(e){if(e instanceof c.o)return o.NextResponse.json({error:"Forbidden",message:e.message},{status:403});return console.error("Failed to grant access:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to grant access"},{status:500})}}let v=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/user-servers/route",pathname:"/api/user-servers",filename:"route",bundlePath:"app/api/user-servers/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/user-servers/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:f,staticGenerationAsyncStorage:N,serverHooks:L}=v,_="/api/user-servers/route";function A(){return(0,n.patchFetch)({serverHooks:L,staticGenerationAsyncStorage:N})}},97060:(e,r,s)=>{s.d(r,{x:()=>n});var t=s(30579),a=s(22587),i=s(8290);class n{async findById(e){return(await a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.id,e)).limit(1))[0]??null}async findByUserAndServer(e,r){return(await a.db.select().from(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.userId,e),(0,t.eq)(i.userServers.serverId,r))).limit(1))[0]??null}async findByServer(e){return a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.serverId,e))}async findByServerWithUsers(e){return(await a.db.select({id:i.userServers.id,userId:i.userServers.userId,serverId:i.userServers.serverId,permission:i.userServers.permission,createdAt:i.userServers.createdAt,updatedAt:i.userServers.updatedAt,user:{id:i.users.id,name:i.users.name,email:i.users.email,image:i.users.image}}).from(i.userServers).leftJoin(i.users,(0,t.eq)(i.userServers.userId,i.users.id)).where((0,t.eq)(i.userServers.serverId,e))).map(e=>({id:e.id,userId:e.userId,serverId:e.serverId,permission:e.permission,createdAt:e.createdAt,updatedAt:e.updatedAt,user:e.user??void 0}))}async findByUser(e){return a.db.select().from(i.userServers).where((0,t.eq)(i.userServers.userId,e))}async create(e){let r=await a.db.insert(i.userServers).values(e).returning();if(!r[0])throw Error("Failed to create user-server permission");return r[0]}async updatePermission(e,r){let s=await a.db.update(i.userServers).set({permission:r,updatedAt:new Date}).where((0,t.eq)(i.userServers.id,e)).returning();if(!s[0])throw Error(`User-server permission not found: ${e}`);return s[0]}async delete(e){await a.db.delete(i.userServers).where((0,t.eq)(i.userServers.id,e))}async deleteByUserAndServer(e,r){await a.db.delete(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.userId,e),(0,t.eq)(i.userServers.serverId,r)))}async countByServerAndPermission(e,r){return(await a.db.select().from(i.userServers).where((0,t.xD)((0,t.eq)(i.userServers.serverId,e),(0,t.eq)(i.userServers.permission,r)))).length}}},31969:(e,r,s)=>{s.d(r,{I:()=>l});var t=s(33580),a=s(5944),i=s(90224),n=s(22587),o=s(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,u=d.startsWith("https://"),l=(0,t.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(n.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:u},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,i.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",..."http://localhost:5000"!==d?[d]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,r,s)=>{s.d(r,{db:()=>m});var t=s(85890),a=s.n(t),i=s(31590),n=s(8290),o=s(55315),d=s.n(o),u=s(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),r=d().join(e,"data");return d().join(r,"mcctl.db")}();!function(e){if(":memory:"===e)return;let r=d().dirname(e);(0,u.existsSync)(r)||(0,u.mkdirSync)(r,{recursive:!0})}(l);let c=new(a())(l);c.pragma("journal_mode = WAL"),c.pragma("foreign_keys = ON"),c.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -45,4 +45,13 @@ CREATE TABLE IF NOT EXISTS verifications (
45
45
  created_at INTEGER,
46
46
  updated_at INTEGER
47
47
  );
48
- `);let c=(0,i.t)(m,{schema:n})},8290:(e,r,s)=>{s.r(r),s.d(r,{accounts:()=>u,sessions:()=>d,userServers:()=>m,users:()=>o,verifications:()=>l});var t=s(80722),a=s(10160),i=s(30304),n=s(76303);let o=(0,t.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,i._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,i._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,i._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,t.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,t.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,i._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,i._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),l=(0,t.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),m=(0,t.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,n.Kz)("user_server_idx").on(e.userId,e.serverId)}))},74888:(e,r,s)=>{s.d(r,{e:()=>a,o:()=>t});class t extends Error{constructor(e){super(e),this.name="PermissionError"}}class a{constructor(e){this.repository=e}async grantAccess(e,r,s){let t=await this.repository.findByUserAndServer(e,r);return t?this.repository.updatePermission(t.id,s):this.repository.create({userId:e,serverId:r,permission:s})}async revokeAccess(e,r){let s=await this.repository.findByUserAndServer(e,r);if(s?.permission==="admin"&&await this.repository.countByServerAndPermission(r,"admin")<=1)throw new t("Cannot remove the last admin from the server");await this.repository.deleteByUserAndServer(e,r)}async updatePermission(e,r,s){let a=await this.repository.findByUserAndServer(e,r);if(!a)throw new t("Permission not found for this user and server");if("admin"===a.permission&&"admin"!==s&&await this.repository.countByServerAndPermission(r,"admin")<=1)throw new t("Cannot downgrade the last admin. Assign another admin first.");return this.repository.updatePermission(a.id,s)}async getServerUsers(e){return this.repository.findByServer(e)}async getServerUsersWithDetails(e){return this.repository.findByServerWithUsers(e)}async getUserServers(e){return this.repository.findByUser(e)}async hasPermission(e,r,s){let t=await this.repository.findByUserAndServer(e,r);if(!t)return!1;let a={view:1,manage:2,admin:3};return a[t.permission]>=a[s]}async ensureAtLeastOneAdmin(e){if(0===await this.repository.countByServerAndPermission(e,"admin"))throw new t("Server must have at least one admin")}}}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[9836,1489,7605,5309],()=>s(69903));module.exports=t})();
48
+ CREATE TABLE IF NOT EXISTS user_servers (
49
+ id TEXT PRIMARY KEY,
50
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
51
+ server_id TEXT NOT NULL,
52
+ permission TEXT NOT NULL DEFAULT 'view',
53
+ created_at INTEGER NOT NULL,
54
+ updated_at INTEGER NOT NULL
55
+ );
56
+ CREATE INDEX IF NOT EXISTS user_server_idx ON user_servers(user_id, server_id);
57
+ `);let m=(0,i.t)(c,{schema:n})},8290:(e,r,s)=>{s.r(r),s.d(r,{accounts:()=>u,sessions:()=>d,userServers:()=>c,users:()=>o,verifications:()=>l});var t=s(80722),a=s(10160),i=s(30304),n=s(76303);let o=(0,t.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,i._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,i._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,i._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,t.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,t.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,i._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,i._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),l=(0,t.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),c=(0,t.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,n.Kz)("user_server_idx").on(e.userId,e.serverId)}))},74888:(e,r,s)=>{s.d(r,{e:()=>a,o:()=>t});class t extends Error{constructor(e){super(e),this.name="PermissionError"}}class a{constructor(e){this.repository=e}async grantAccess(e,r,s){let t=await this.repository.findByUserAndServer(e,r);return t?this.repository.updatePermission(t.id,s):this.repository.create({userId:e,serverId:r,permission:s})}async revokeAccess(e,r){let s=await this.repository.findByUserAndServer(e,r);if(s?.permission==="admin"&&await this.repository.countByServerAndPermission(r,"admin")<=1)throw new t("Cannot remove the last admin from the server");await this.repository.deleteByUserAndServer(e,r)}async updatePermission(e,r,s){let a=await this.repository.findByUserAndServer(e,r);if(!a)throw new t("Permission not found for this user and server");if("admin"===a.permission&&"admin"!==s&&await this.repository.countByServerAndPermission(r,"admin")<=1)throw new t("Cannot downgrade the last admin. Assign another admin first.");return this.repository.updatePermission(a.id,s)}async getServerUsers(e){return this.repository.findByServer(e)}async getServerUsersWithDetails(e){return this.repository.findByServerWithUsers(e)}async getUserServers(e){return this.repository.findByUser(e)}async hasPermission(e,r,s){let t=await this.repository.findByUserAndServer(e,r);if(!t)return!1;let a={view:1,manage:2,admin:3};return a[t.permission]>=a[s]}async ensureAtLeastOneAdmin(e){if(0===await this.repository.countByServerAndPermission(e,"admin"))throw new t("Server must have at least one admin")}}}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[9836,1489,7605,5309],()=>s(69903));module.exports=t})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=5701,e.ids=[5701],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},68249:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>A,requestAsyncStorage:()=>L,routeModule:()=>E,serverHooks:()=>_,staticGenerationAsyncStorage:()=>N});var s={};r.r(s),r.d(s,{GET:()=>T,dynamic:()=>m});var a=r(3025),n=r(45086),i=r(74048),o=r(24517),d=r(31969),u=r(77605),l=r(22587),c=r(8290),p=r(30579);let m="force-dynamic";async function T(e){try{let t=await d.I.api.getSession({headers:await (0,u.headers)()});if(!t)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});if("admin"!==t.user.role)return o.NextResponse.json({error:"Forbidden",message:"Admin permission required"},{status:403});let r=e.nextUrl.searchParams.get("q");if(!r||r.length<2)return o.NextResponse.json({error:"BadRequest",message:"Search query must be at least 2 characters"},{status:400});let s=`%${r}%`,a=await l.db.select({id:c.users.id,name:c.users.name,email:c.users.email,image:c.users.image}).from(c.users).where((0,p.or)((0,p.vL)(c.users.name,s),(0,p.vL)(c.users.email,s))).limit(20);return o.NextResponse.json({users:a})}catch(e){return console.error("Failed to search users:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to search users"},{status:500})}}let E=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/users/route",pathname:"/api/users",filename:"route",bundlePath:"app/api/users/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/users/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:L,staticGenerationAsyncStorage:N,serverHooks:_}=E,f="/api/users/route";function A(){return(0,i.patchFetch)({serverHooks:_,staticGenerationAsyncStorage:N})}},31969:(e,t,r)=>{r.d(t,{I:()=>d});var s=r(33580),a=r(5944),n=r(90224),i=r(22587),o=r(8290);let d=(0,s.kj)({database:(0,a.s)(i.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),i=r(8290),o=r(55315),d=r.n(o),u=r(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(l);let c=new(a())(l);c.pragma("journal_mode = WAL"),c.pragma("foreign_keys = ON"),c.exec(`
1
+ "use strict";(()=>{var e={};e.id=5701,e.ids=[5701],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},68249:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>A,requestAsyncStorage:()=>L,routeModule:()=>m,serverHooks:()=>_,staticGenerationAsyncStorage:()=>N});var s={};r.r(s),r.d(s,{GET:()=>p,dynamic:()=>c});var a=r(3025),n=r(45086),i=r(74048),o=r(24517),d=r(31969),u=r(77605),l=r(22587),T=r(8290),E=r(30579);let c="force-dynamic";async function p(e){try{let t=await d.I.api.getSession({headers:await (0,u.headers)()});if(!t)return o.NextResponse.json({error:"Unauthorized",message:"Authentication required"},{status:401});if("admin"!==t.user.role)return o.NextResponse.json({error:"Forbidden",message:"Admin permission required"},{status:403});let r=e.nextUrl.searchParams.get("q");if(!r||r.length<2)return o.NextResponse.json({error:"BadRequest",message:"Search query must be at least 2 characters"},{status:400});let s=`%${r}%`,a=await l.db.select({id:T.users.id,name:T.users.name,email:T.users.email,image:T.users.image}).from(T.users).where((0,E.or)((0,E.vL)(T.users.name,s),(0,E.vL)(T.users.email,s))).limit(20);return o.NextResponse.json({users:a})}catch(e){return console.error("Failed to search users:",e),o.NextResponse.json({error:"InternalServerError",message:"Failed to search users"},{status:500})}}let m=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/users/route",pathname:"/api/users",filename:"route",bundlePath:"app/api/users/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/users/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:L,staticGenerationAsyncStorage:N,serverHooks:_}=m,f="/api/users/route";function A(){return(0,i.patchFetch)({serverHooks:_,staticGenerationAsyncStorage:N})}},31969:(e,t,r)=>{r.d(t,{I:()=>l});var s=r(33580),a=r(5944),n=r(90224),i=r(22587),o=r(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,u=d.startsWith("https://"),l=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(i.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:u},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",..."http://localhost:5000"!==d?[d]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>E});var s=r(85890),a=r.n(s),n=r(31590),i=r(8290),o=r(55315),d=r.n(o),u=r(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(l);let T=new(a())(l);T.pragma("journal_mode = WAL"),T.pragma("foreign_keys = ON"),T.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -45,4 +45,13 @@ CREATE TABLE IF NOT EXISTS verifications (
45
45
  created_at INTEGER,
46
46
  updated_at INTEGER
47
47
  );
48
- `);let p=(0,n.t)(c,{schema:i})},8290:(e,t,r)=>{r.r(t),r.d(t,{accounts:()=>u,sessions:()=>d,userServers:()=>c,users:()=>o,verifications:()=>l});var s=r(80722),a=r(10160),n=r(30304),i=r(76303);let o=(0,s.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,n._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,n._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,n._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,s.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,s.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,n._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,n._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),l=(0,s.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),c=(0,s.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,i.Kz)("user_server_idx").on(e.userId,e.serverId)}))}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9836,1489,7605,5309],()=>r(68249));module.exports=s})();
48
+ CREATE TABLE IF NOT EXISTS user_servers (
49
+ id TEXT PRIMARY KEY,
50
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
51
+ server_id TEXT NOT NULL,
52
+ permission TEXT NOT NULL DEFAULT 'view',
53
+ created_at INTEGER NOT NULL,
54
+ updated_at INTEGER NOT NULL
55
+ );
56
+ CREATE INDEX IF NOT EXISTS user_server_idx ON user_servers(user_id, server_id);
57
+ `);let E=(0,n.t)(T,{schema:i})},8290:(e,t,r)=>{r.r(t),r.d(t,{accounts:()=>u,sessions:()=>d,userServers:()=>T,users:()=>o,verifications:()=>l});var s=r(80722),a=r(10160),n=r(30304),i=r(76303);let o=(0,s.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,n._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,n._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,n._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,s.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,s.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,n._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,n._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),l=(0,s.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),T=(0,s.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,i.Kz)("user_server_idx").on(e.userId,e.serverId)}))}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9836,1489,7605,5309],()=>r(68249));module.exports=s})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=1914,e.ids=[1914],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},26482:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>N,patchFetch:()=>L,requestAsyncStorage:()=>T,routeModule:()=>f,serverHooks:()=>h,staticGenerationAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{POST:()=>m,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic",p=["assign","release"];async function m(e,{params:t}){try{let r=await (0,u.mk)(await (0,c.headers)()),{name:s,action:a}=await t;if(!p.includes(a))return i.NextResponse.json({error:"BadRequest",message:`Invalid action: ${a}`},{status:400});let n=(0,d.F0)({username:r.user.name||r.user.email,role:r.user.role||"user"});switch(a){case"assign":{let t=await e.json();if(!t.serverName)return i.NextResponse.json({error:"BadRequest",message:"serverName is required"},{status:400});let r=await n.assignWorld(s,t.serverName);return i.NextResponse.json(r)}case"release":{let{searchParams:t}=new URL(e.url),r="true"===t.get("force"),a=await n.releaseWorld(s,r);return i.NextResponse.json(a)}default:return i.NextResponse.json({error:"BadRequest",message:`Invalid action: ${a}`},{status:400})}}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to execute action:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to execute action"},{status:500})}}let f=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/[name]/[action]/route",pathname:"/api/worlds/[name]/[action]",filename:"route",bundlePath:"app/api/worlds/[name]/[action]/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/[name]/[action]/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:T,staticGenerationAsyncStorage:E,serverHooks:h}=f,N="/api/worlds/[name]/[action]/route";function L(){return(0,o.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:E})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>d});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=(0,s.kj)({database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
1
+ "use strict";(()=>{var e={};e.id=1914,e.ids=[1914],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},26482:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>h,patchFetch:()=>L,requestAsyncStorage:()=>E,routeModule:()=>T,serverHooks:()=>N,staticGenerationAsyncStorage:()=>f});var s={};r.r(s),r.d(s,{POST:()=>m,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic",p=["assign","release"];async function m(e,{params:t}){try{let r=await (0,u.mk)(await (0,c.headers)()),{name:s,action:a}=await t;if(!p.includes(a))return i.NextResponse.json({error:"BadRequest",message:`Invalid action: ${a}`},{status:400});let n=(0,d.F0)({username:r.user.name||r.user.email,role:r.user.role||"user"});switch(a){case"assign":{let t=await e.json();if(!t.serverName)return i.NextResponse.json({error:"BadRequest",message:"serverName is required"},{status:400});let r=await n.assignWorld(s,t.serverName);return i.NextResponse.json(r)}case"release":{let{searchParams:t}=new URL(e.url),r="true"===t.get("force"),a=await n.releaseWorld(s,r);return i.NextResponse.json(a)}default:return i.NextResponse.json({error:"BadRequest",message:`Invalid action: ${a}`},{status:400})}}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to execute action:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to execute action"},{status:500})}}let T=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/[name]/[action]/route",pathname:"/api/worlds/[name]/[action]",filename:"route",bundlePath:"app/api/worlds/[name]/[action]/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/[name]/[action]/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:E,staticGenerationAsyncStorage:f,serverHooks:N}=T,h="/api/worlds/[name]/[action]/route";function L(){return(0,o.patchFetch)({serverHooks:N,staticGenerationAsyncStorage:f})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>c});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,u=d.startsWith("https://"),c=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:u},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",..."http://localhost:5000"!==d?[d]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -45,4 +45,13 @@ CREATE TABLE IF NOT EXISTS verifications (
45
45
  created_at INTEGER,
46
46
  updated_at INTEGER
47
47
  );
48
+ CREATE TABLE IF NOT EXISTS user_servers (
49
+ id TEXT PRIMARY KEY,
50
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
51
+ server_id TEXT NOT NULL,
52
+ permission TEXT NOT NULL DEFAULT 'view',
53
+ created_at INTEGER NOT NULL,
54
+ updated_at INTEGER NOT NULL
55
+ );
56
+ CREATE INDEX IF NOT EXISTS user_server_idx ON user_servers(user_id, server_id);
48
57
  `);let p=(0,n.t)(l,{schema:o})},8290:(e,t,r)=>{r.r(t),r.d(t,{accounts:()=>u,sessions:()=>d,userServers:()=>l,users:()=>i,verifications:()=>c});var s=r(80722),a=r(10160),n=r(30304),o=r(76303);let i=(0,s.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,n._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,n._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,n._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,s.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,s.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,n._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,n._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),c=(0,s.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),l=(0,s.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,o.Kz)("user_server_idx").on(e.userId,e.serverId)}))}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9836,1489,7605,5309],()=>r(26482));module.exports=s})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=5746,e.ids=[5746],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},20062:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>N,patchFetch:()=>_,requestAsyncStorage:()=>E,routeModule:()=>T,serverHooks:()=>L,staticGenerationAsyncStorage:()=>h});var s={};r.r(s),r.d(s,{DELETE:()=>f,GET:()=>m,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic";function p(e){return{username:e.user.name||e.user.email,role:e.user.role||"user"}}async function m(e,{params:t}){try{let e=await (0,u.mk)(await (0,c.headers)()),{name:r}=await t,s=(0,d.F0)(p(e)),a=await s.getWorld(r);return i.NextResponse.json(a)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to fetch world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to fetch world details"},{status:500})}}async function f(e,{params:t}){try{let r=await (0,u.kF)(await (0,c.headers)()),{name:s}=await t,{searchParams:a}=new URL(e.url),n="true"===a.get("force"),o=(0,d.F0)(p(r)),l=await o.deleteWorld(s,n);return i.NextResponse.json(l)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Forbidden",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to delete world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to delete world"},{status:500})}}let T=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/[name]/route",pathname:"/api/worlds/[name]",filename:"route",bundlePath:"app/api/worlds/[name]/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/[name]/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:E,staticGenerationAsyncStorage:h,serverHooks:L}=T,N="/api/worlds/[name]/route";function _(){return(0,o.patchFetch)({serverHooks:L,staticGenerationAsyncStorage:h})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>d});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=(0,s.kj)({database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
1
+ "use strict";(()=>{var e={};e.id=5746,e.ids=[5746],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},20062:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>L,patchFetch:()=>_,requestAsyncStorage:()=>f,routeModule:()=>E,serverHooks:()=>N,staticGenerationAsyncStorage:()=>h});var s={};r.r(s),r.d(s,{DELETE:()=>T,GET:()=>m,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic";function p(e){return{username:e.user.name||e.user.email,role:e.user.role||"user"}}async function m(e,{params:t}){try{let e=await (0,u.mk)(await (0,c.headers)()),{name:r}=await t,s=(0,d.F0)(p(e)),a=await s.getWorld(r);return i.NextResponse.json(a)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to fetch world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to fetch world details"},{status:500})}}async function T(e,{params:t}){try{let r=await (0,u.kF)(await (0,c.headers)()),{name:s}=await t,{searchParams:a}=new URL(e.url),n="true"===a.get("force"),o=(0,d.F0)(p(r)),l=await o.deleteWorld(s,n);return i.NextResponse.json(l)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Forbidden",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to delete world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to delete world"},{status:500})}}let E=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/[name]/route",pathname:"/api/worlds/[name]",filename:"route",bundlePath:"app/api/worlds/[name]/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/[name]/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:N}=E,L="/api/worlds/[name]/route";function _(){return(0,o.patchFetch)({serverHooks:N,staticGenerationAsyncStorage:h})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>c});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,u=d.startsWith("https://"),c=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:u},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",..."http://localhost:5000"!==d?[d]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -45,4 +45,13 @@ CREATE TABLE IF NOT EXISTS verifications (
45
45
  created_at INTEGER,
46
46
  updated_at INTEGER
47
47
  );
48
+ CREATE TABLE IF NOT EXISTS user_servers (
49
+ id TEXT PRIMARY KEY,
50
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
51
+ server_id TEXT NOT NULL,
52
+ permission TEXT NOT NULL DEFAULT 'view',
53
+ created_at INTEGER NOT NULL,
54
+ updated_at INTEGER NOT NULL
55
+ );
56
+ CREATE INDEX IF NOT EXISTS user_server_idx ON user_servers(user_id, server_id);
48
57
  `);let p=(0,n.t)(l,{schema:o})},8290:(e,t,r)=>{r.r(t),r.d(t,{accounts:()=>u,sessions:()=>d,userServers:()=>l,users:()=>i,verifications:()=>c});var s=r(80722),a=r(10160),n=r(30304),o=r(76303);let i=(0,s.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,n._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,n._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,n._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,s.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,s.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,n._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,n._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),c=(0,s.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),l=(0,s.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,o.Kz)("user_server_idx").on(e.userId,e.serverId)}))}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9836,1489,7605,5309],()=>r(20062));module.exports=s})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var e={};e.id=6541,e.ids=[6541],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},32527:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>N,patchFetch:()=>_,requestAsyncStorage:()=>h,routeModule:()=>T,serverHooks:()=>L,staticGenerationAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{GET:()=>m,POST:()=>f,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic";function p(e){return{username:e.user.name||e.user.email,role:e.user.role||"user"}}async function m(){try{let e=await (0,u.mk)(await (0,c.headers)()),t=(0,d.F0)(p(e)),r=await t.getWorlds();return i.NextResponse.json(r)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to fetch worlds:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to fetch worlds"},{status:500})}}async function f(e){try{let t=await (0,u.mk)(await (0,c.headers)()),r=await e.json(),s=(0,d.F0)(p(t)),a=await s.createWorld(r);return i.NextResponse.json(a,{status:201})}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to create world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to create world"},{status:500})}}let T=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/route",pathname:"/api/worlds",filename:"route",bundlePath:"app/api/worlds/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:h,staticGenerationAsyncStorage:E,serverHooks:L}=T,N="/api/worlds/route";function _(){return(0,o.patchFetch)({serverHooks:L,staticGenerationAsyncStorage:E})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>d});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=(0,s.kj)({database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
1
+ "use strict";(()=>{var e={};e.id=6541,e.ids=[6541],e.modules={85890:e=>{e.exports=require("better-sqlite3")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},32527:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>L,patchFetch:()=>_,requestAsyncStorage:()=>f,routeModule:()=>E,serverHooks:()=>N,staticGenerationAsyncStorage:()=>h});var s={};r.r(s),r.d(s,{GET:()=>m,POST:()=>T,dynamic:()=>l});var a=r(3025),n=r(45086),o=r(74048),i=r(24517),d=r(78649),u=r(60154),c=r(77605);let l="force-dynamic";function p(e){return{username:e.user.name||e.user.email,role:e.user.role||"user"}}async function m(){try{let e=await (0,u.mk)(await (0,c.headers)()),t=(0,d.F0)(p(e)),r=await t.getWorlds();return i.NextResponse.json(r)}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to fetch worlds:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to fetch worlds"},{status:500})}}async function T(e){try{let t=await (0,u.mk)(await (0,c.headers)()),r=await e.json(),s=(0,d.F0)(p(t)),a=await s.createWorld(r);return i.NextResponse.json(a,{status:201})}catch(e){if(e instanceof u.l4)return i.NextResponse.json({error:"Unauthorized",message:e.message},{status:e.statusCode});if(e instanceof d.zB)return i.NextResponse.json({error:e.error,message:e.message},{status:e.statusCode});return console.error("Failed to create world:",e),i.NextResponse.json({error:"InternalServerError",message:"Failed to create world"},{status:500})}}let E=new a.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worlds/route",pathname:"/api/worlds",filename:"route",bundlePath:"app/api/worlds/route"},resolvedPagePath:"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/api/worlds/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:N}=E,L="/api/worlds/route";function _(){return(0,o.patchFetch)({serverHooks:N,staticGenerationAsyncStorage:h})}},78649:(e,t,r)=>{r.d(t,{F0:()=>n,zB:()=>s});class s extends Error{constructor(e,t,r){super(r),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class a{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let r=`${this.baseUrl}${e}`,a={"X-API-Key":this.apiKey};t.body&&(a["Content-Type"]="application/json"),this.userContext&&(a["X-User"]=this.userContext.username,a["X-Role"]=this.userContext.role);let n=await fetch(r,{...t,headers:{...a,...t.headers}});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText}));throw new s(n.status,e.error,e.message)}return n.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}}function n(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",r=process.env.MCCTL_API_KEY||"";return r||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new a({baseUrl:t,apiKey:r,userContext:e})}},60154:(e,t,r)=>{r.d(t,{Ke:()=>c,kF:()=>u,l4:()=>i,mk:()=>d});var s=r(31969),a=r(22587),n=r(8290),o=r(30579);class i extends Error{constructor(e,t=401){super(e),this.statusCode=t,this.name="AuthError"}}async function d(e){let t=await s.I.api.getSession({headers:e});if(!t)throw new i("Unauthorized",401);return t}async function u(e){let t=await d(e);if("admin"!==t.user.role)throw new i("Forbidden: Admin access required",403);return t}async function c(e,t,r="view"){let s=await d(e);if("admin"===s.user.role)return s;let u=await a.db.select().from(n.userServers).where((0,o.xD)((0,o.eq)(n.userServers.userId,s.user.id),(0,o.eq)(n.userServers.serverId,t))).limit(1);if(0===u.length)throw new i("Forbidden: No access to this server",403);let c=u[0].permission,l={view:1,manage:2,admin:3};if(l[c]<l[r])throw new i(`Forbidden: Requires ${r} permission`,403);return s}},31969:(e,t,r)=>{r.d(t,{I:()=>c});var s=r(33580),a=r(5944),n=r(90224),o=r(22587),i=r(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,u=d.startsWith("https://"),c=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:u},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,n.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",..."http://localhost:5000"!==d?[d]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,t,r)=>{r.d(t,{db:()=>p});var s=r(85890),a=r.n(s),n=r(31590),o=r(8290),i=r(55315),d=r.n(i),u=r(92048);let c=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,u.existsSync)(t)||(0,u.mkdirSync)(t,{recursive:!0})}(c);let l=new(a())(c);l.pragma("journal_mode = WAL"),l.pragma("foreign_keys = ON"),l.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -45,4 +45,13 @@ CREATE TABLE IF NOT EXISTS verifications (
45
45
  created_at INTEGER,
46
46
  updated_at INTEGER
47
47
  );
48
+ CREATE TABLE IF NOT EXISTS user_servers (
49
+ id TEXT PRIMARY KEY,
50
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
51
+ server_id TEXT NOT NULL,
52
+ permission TEXT NOT NULL DEFAULT 'view',
53
+ created_at INTEGER NOT NULL,
54
+ updated_at INTEGER NOT NULL
55
+ );
56
+ CREATE INDEX IF NOT EXISTS user_server_idx ON user_servers(user_id, server_id);
48
57
  `);let p=(0,n.t)(l,{schema:o})},8290:(e,t,r)=>{r.r(t),r.d(t,{accounts:()=>u,sessions:()=>d,userServers:()=>l,users:()=>i,verifications:()=>c});var s=r(80722),a=r(10160),n=r(30304),o=r(76303);let i=(0,s.Px)("users",{id:(0,a.fL)("id").primaryKey(),name:(0,a.fL)("name").notNull(),email:(0,a.fL)("email").notNull().unique(),emailVerified:(0,n._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,a.fL)("image"),role:(0,a.fL)("role").notNull().default("user"),banned:(0,n._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,a.fL)("ban_reason"),banExpires:(0,n._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,s.Px)("sessions",{id:(0,a.fL)("id").primaryKey(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,a.fL)("token").notNull().unique(),ipAddress:(0,a.fL)("ip_address"),userAgent:(0,a.fL)("user_agent"),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),u=(0,s.Px)("accounts",{id:(0,a.fL)("id").primaryKey(),accountId:(0,a.fL)("account_id").notNull(),providerId:(0,a.fL)("provider_id").notNull(),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),accessToken:(0,a.fL)("access_token"),refreshToken:(0,a.fL)("refresh_token"),idToken:(0,a.fL)("id_token"),accessTokenExpiresAt:(0,n._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,n._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,a.fL)("scope"),password:(0,a.fL)("password"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),c=(0,s.Px)("verifications",{id:(0,a.fL)("id").primaryKey(),identifier:(0,a.fL)("identifier").notNull(),value:(0,a.fL)("value").notNull(),expiresAt:(0,n._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),l=(0,s.Px)("user_servers",{id:(0,a.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,a.fL)("user_id").notNull().references(()=>i.id,{onDelete:"cascade"}),serverId:(0,a.fL)("server_id").notNull(),permission:(0,a.fL)("permission").$type().notNull().default("view"),createdAt:(0,n._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,n._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,o.Kz)("user_server_idx").on(e.userId,e.serverId)}))}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9836,1489,7605,5309],()=>r(32527));module.exports=s})();
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/33a864272e2b3e97-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/3ecd40fce058ee61-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/70d2fd2b9078a5a3-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c99b890c5ded8d2e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/8dfdea5f9ccf5da4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c5f126aae1eac753.js"/><script src="/_next/static/chunks/3b518dcd-5724e59d48f01b72.js" async=""></script><script src="/_next/static/chunks/2757-058492b5c236cb62.js" async=""></script><script src="/_next/static/chunks/main-app-666bf3e0c0f3dee2.js" async=""></script><script src="/_next/static/chunks/6812-f5924f14ef351036.js" async=""></script><script src="/_next/static/chunks/7220-4d1d72de4109ad9b.js" async=""></script><script src="/_next/static/chunks/8006-219c9bbc650b079e.js" async=""></script><script src="/_next/static/chunks/7294-ffa0013d4b0fa40a.js" async=""></script><script src="/_next/static/chunks/8696-8adf1e9b1a84f5c0.js" async=""></script><script src="/_next/static/chunks/1071-235049df1c3caba7.js" async=""></script><script src="/_next/static/chunks/540-4b925f2c57833962.js" async=""></script><script src="/_next/static/chunks/6189-d8557db379604b3e.js" async=""></script><script src="/_next/static/chunks/4840-5802e869ffd1d2a9.js" async=""></script><script src="/_next/static/chunks/5511-7a419d84918a8d64.js" async=""></script><script src="/_next/static/chunks/55-cc17f03142ace10c.js" async=""></script><script src="/_next/static/chunks/310-72d3b802b3cefa99.js" async=""></script><script src="/_next/static/chunks/8347-d55cd74fb316fad0.js" async=""></script><script src="/_next/static/chunks/4278-9a6acf769f296866.js" async=""></script><script src="/_next/static/chunks/9654-84c0d7b06321aab9.js" async=""></script><script src="/_next/static/chunks/2022-6da2f9a847a5d61c.js" async=""></script><script src="/_next/static/chunks/8918-bae025d477685e7d.js" async=""></script><script src="/_next/static/chunks/406-64ea09489141e436.js" async=""></script><script src="/_next/static/chunks/app/(main)/audit-logs/page-7a5d1441bb2811cf.js" async=""></script><script src="/_next/static/chunks/3543-1ec838cbe59f6baa.js" async=""></script><script src="/_next/static/chunks/2149-ba1bdd1d726ab70c.js" async=""></script><script src="/_next/static/chunks/2542-6ea12719b9ca1b7c.js" async=""></script><script src="/_next/static/chunks/8322-8ae826d4c9b38acc.js" async=""></script><script src="/_next/static/chunks/212-b904d9ae152f2360.js" async=""></script><script src="/_next/static/chunks/app/(main)/layout-692cb1da92b73287.js" async=""></script><script src="/_next/static/chunks/5645-d306bb768b5907c8.js" async=""></script><script src="/_next/static/chunks/app/layout-e0e626ece42c56d9.js" async=""></script><title>Minecraft Server Manager</title><meta name="description" content="Web-based management console for Minecraft server infrastructure"/><link rel="icon" href="/icon.svg?0f68875a168deab8" type="image/svg+xml" sizes="any"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script><style data-emotion="mui-global 1kft0z8">html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;-webkit-text-size-adjust:100%;}*,*::before,*::after{box-sizing:inherit;}strong,b{font-weight:700;}body{margin:0;color:#ffffff;font-family:"Ubuntu","Roboto","Helvetica","Arial",sans-serif;font-weight:400;font-size:1rem;line-height:1.5;background-color:#16181c;}@media print{body{background-color:#fff;}}body::backdrop{background-color:#16181c;}body{scrollbar-color:#313338 #16181c;}body::-webkit-scrollbar,body *::-webkit-scrollbar{background-color:#16181c;width:8px;}body::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{border-radius:8px;background-color:#313338;min-height:24px;}body::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background-color:#26282e;}</style></head><body class="__className_1d908f"><div id="__next"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--></div><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/33a864272e2b3e97-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3ecd40fce058ee61-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/70d2fd2b9078a5a3-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/c99b890c5ded8d2e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"6:I[39943,[],\"\"]\n8:I[68067,[],\"ClientPageRoot\"]\n9:I[52791,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"7220\",\"static/chunks/7220-4d1d72de4109ad9b.js\",\"8006\",\"static/chunks/8006-219c9bbc650b079e.js\",\"7294\",\"static/chunks/7294-ffa0013d4b0fa40a.js\",\"8696\",\"static/chunks/8696-8adf1e9b1a84f5c0.js\",\"1071\",\"static/chunks/1071-235049df1c3caba7.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"6189\",\"static/chunks/6189-d8557db379604b3e.js\",\"4840\",\"static/chunks/4840-5802e869ffd1d2a9.js\",\"5511\",\"static/chunks/5511-7a419d84918a8d64.js\",\"55\",\"static/chunks/55-cc17f03142ace10c.js\",\"310\",\"static/chunks/310-72d3b802b3cefa99.js\",\"8347\",\"static/chunks/8347-d55cd74fb316fad0.js\",\"4278\",\"static/chunks/4278-9a6acf769f296866.js\",\"9654\",\"static/chunks/9654-84c0d7b06321aab9.js\",\"2022\",\"static/chunks/2022-6da2f9a847a5d61c.js\",\"8918\",\"static/chunks/8918-bae025d477685e7d.js\",\"406\",\"static/chunks/406-64ea09489141e436.js\",\"4743\",\"static/chunks/app/(main)/audit-logs/page-7a5d1441bb2811cf.js\"],\"default\",1]\na:I[14224,[],\"\"]\nb:I[2863,[],\"\"]\nc:I[6453,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"7220\",\"static/chunks/7220-4d1d72de4109ad9b.js\",\"8006\",\"static/chunks/8006-219c9bbc650b079e.js\",\"7294\",\"static/chunks/7294-ffa0013d4b0fa40a.js\",\"8696\",\"static/chunks/8696-8adf1e9b1a84f5c0.js\",\"1071\",\"static/chunks/1071-235049df1c3caba7.js\",\"55\",\"static/chunks/55-cc17f03142ace10c.js\",\"3543\",\"static/chunks/3543-1ec838cbe59f6baa.js\",\"8347\",\"static/chunks/8347-d55cd74fb316fad0.js\",\"2149\",\"static/chunks/2149-ba1bdd1d726ab70c.js\",\"2542\",\"static/chunks/2542-6ea12719b9ca1b7c.js\",\"8322\",\"static/chunks/8322-8ae826d4c9b38acc.js\",\"8918\",\"static/chunks/8918-bae025d477685e7d.js\",\"212\",\"static/chunks/212-b904d9ae152f2360.js\",\"4095\",\"static/chunks/app/(main)/layout-692cb1da92b73287.js\"],\"default\",1]\ne:I[89083,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"default\"]\nf:I[48283,[\"6812\",\"static/chunks/6812-f5924f14ef"])</script><script>self.__next_f.push([1,"351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"ThemeProvider\"]\n10:I[22237,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"QueryProvider\"]\n11:\"$Sreact.suspense\"\n12:I[3454,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"LoadingProvider\"]\n18:I[19253,[],\"\"]\nd:{}\n13:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n14:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n15:{\"display\":\"inline-block\"}\n16:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n19:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L6\",null,{\"buildId\":\"ddlfT0dafY0G-jGkapBmi\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"audit-logs\"],\"initialTree\":[\"\",{\"children\":[\"(main)\",{\"children\":[\"audit-logs\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"(main)\",{\"children\":[\"audit-logs\",{\"children\":[\"__PAGE__\",{},[[\"$L7\",[\"$\",\"$L8\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$9\"}],null],null],null]},[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(main)\",\"children\",\"audit-logs\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(main)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$d\"}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_1d908f\",\"children\":[\"$\",\"div\",null,{\"id\":\"__next\",\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$11\",null,{\"fallback\":null,\"children\":[\"$\",\"$L12\",null,{\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$13\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$14\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$15\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$16\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L17\"],\"globalErrorComponent\":\"$18\",\"missingSlots\":\"$W19\"}]\n"])</script><script>self.__next_f.push([1,"17:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Minecraft Server Manager\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Web-based management console for Minecraft server infrastructure\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/icon.svg?0f68875a168deab8\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"meta\",\"5\",{\"name\":\"next-size-adjust\"}]]\n7:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/33a864272e2b3e97-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/3ecd40fce058ee61-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/70d2fd2b9078a5a3-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c99b890c5ded8d2e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/8dfdea5f9ccf5da4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c5f126aae1eac753.js"/><script src="/_next/static/chunks/3b518dcd-5724e59d48f01b72.js" async=""></script><script src="/_next/static/chunks/2757-058492b5c236cb62.js" async=""></script><script src="/_next/static/chunks/main-app-666bf3e0c0f3dee2.js" async=""></script><script src="/_next/static/chunks/6812-f5924f14ef351036.js" async=""></script><script src="/_next/static/chunks/7220-4d1d72de4109ad9b.js" async=""></script><script src="/_next/static/chunks/8006-219c9bbc650b079e.js" async=""></script><script src="/_next/static/chunks/7294-ffa0013d4b0fa40a.js" async=""></script><script src="/_next/static/chunks/8696-8adf1e9b1a84f5c0.js" async=""></script><script src="/_next/static/chunks/1071-235049df1c3caba7.js" async=""></script><script src="/_next/static/chunks/540-4b925f2c57833962.js" async=""></script><script src="/_next/static/chunks/6189-d8557db379604b3e.js" async=""></script><script src="/_next/static/chunks/4840-5802e869ffd1d2a9.js" async=""></script><script src="/_next/static/chunks/5511-7a419d84918a8d64.js" async=""></script><script src="/_next/static/chunks/55-cc17f03142ace10c.js" async=""></script><script src="/_next/static/chunks/310-72d3b802b3cefa99.js" async=""></script><script src="/_next/static/chunks/8347-d55cd74fb316fad0.js" async=""></script><script src="/_next/static/chunks/4278-9a6acf769f296866.js" async=""></script><script src="/_next/static/chunks/9654-84c0d7b06321aab9.js" async=""></script><script src="/_next/static/chunks/2022-6da2f9a847a5d61c.js" async=""></script><script src="/_next/static/chunks/8918-bae025d477685e7d.js" async=""></script><script src="/_next/static/chunks/406-64ea09489141e436.js" async=""></script><script src="/_next/static/chunks/app/(main)/audit-logs/page-7a5d1441bb2811cf.js" async=""></script><script src="/_next/static/chunks/3543-1ec838cbe59f6baa.js" async=""></script><script src="/_next/static/chunks/2149-ba1bdd1d726ab70c.js" async=""></script><script src="/_next/static/chunks/2542-6ea12719b9ca1b7c.js" async=""></script><script src="/_next/static/chunks/8322-8ae826d4c9b38acc.js" async=""></script><script src="/_next/static/chunks/212-b904d9ae152f2360.js" async=""></script><script src="/_next/static/chunks/app/(main)/layout-692cb1da92b73287.js" async=""></script><script src="/_next/static/chunks/5645-d306bb768b5907c8.js" async=""></script><script src="/_next/static/chunks/app/layout-e0e626ece42c56d9.js" async=""></script><title>Minecraft Server Manager</title><meta name="description" content="Web-based management console for Minecraft server infrastructure"/><link rel="icon" href="/icon.svg?0f68875a168deab8" type="image/svg+xml" sizes="any"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script><style data-emotion="mui-global 1kft0z8">html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;-webkit-text-size-adjust:100%;}*,*::before,*::after{box-sizing:inherit;}strong,b{font-weight:700;}body{margin:0;color:#ffffff;font-family:"Ubuntu","Roboto","Helvetica","Arial",sans-serif;font-weight:400;font-size:1rem;line-height:1.5;background-color:#16181c;}@media print{body{background-color:#fff;}}body::backdrop{background-color:#16181c;}body{scrollbar-color:#313338 #16181c;}body::-webkit-scrollbar,body *::-webkit-scrollbar{background-color:#16181c;width:8px;}body::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{border-radius:8px;background-color:#313338;min-height:24px;}body::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background-color:#26282e;}</style></head><body class="__className_1d908f"><div id="__next"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--></div><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/33a864272e2b3e97-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3ecd40fce058ee61-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/70d2fd2b9078a5a3-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/c99b890c5ded8d2e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"6:I[39943,[],\"\"]\n8:I[68067,[],\"ClientPageRoot\"]\n9:I[52791,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"7220\",\"static/chunks/7220-4d1d72de4109ad9b.js\",\"8006\",\"static/chunks/8006-219c9bbc650b079e.js\",\"7294\",\"static/chunks/7294-ffa0013d4b0fa40a.js\",\"8696\",\"static/chunks/8696-8adf1e9b1a84f5c0.js\",\"1071\",\"static/chunks/1071-235049df1c3caba7.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"6189\",\"static/chunks/6189-d8557db379604b3e.js\",\"4840\",\"static/chunks/4840-5802e869ffd1d2a9.js\",\"5511\",\"static/chunks/5511-7a419d84918a8d64.js\",\"55\",\"static/chunks/55-cc17f03142ace10c.js\",\"310\",\"static/chunks/310-72d3b802b3cefa99.js\",\"8347\",\"static/chunks/8347-d55cd74fb316fad0.js\",\"4278\",\"static/chunks/4278-9a6acf769f296866.js\",\"9654\",\"static/chunks/9654-84c0d7b06321aab9.js\",\"2022\",\"static/chunks/2022-6da2f9a847a5d61c.js\",\"8918\",\"static/chunks/8918-bae025d477685e7d.js\",\"406\",\"static/chunks/406-64ea09489141e436.js\",\"4743\",\"static/chunks/app/(main)/audit-logs/page-7a5d1441bb2811cf.js\"],\"default\",1]\na:I[14224,[],\"\"]\nb:I[2863,[],\"\"]\nc:I[6453,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"7220\",\"static/chunks/7220-4d1d72de4109ad9b.js\",\"8006\",\"static/chunks/8006-219c9bbc650b079e.js\",\"7294\",\"static/chunks/7294-ffa0013d4b0fa40a.js\",\"8696\",\"static/chunks/8696-8adf1e9b1a84f5c0.js\",\"1071\",\"static/chunks/1071-235049df1c3caba7.js\",\"55\",\"static/chunks/55-cc17f03142ace10c.js\",\"3543\",\"static/chunks/3543-1ec838cbe59f6baa.js\",\"8347\",\"static/chunks/8347-d55cd74fb316fad0.js\",\"2149\",\"static/chunks/2149-ba1bdd1d726ab70c.js\",\"2542\",\"static/chunks/2542-6ea12719b9ca1b7c.js\",\"8322\",\"static/chunks/8322-8ae826d4c9b38acc.js\",\"8918\",\"static/chunks/8918-bae025d477685e7d.js\",\"212\",\"static/chunks/212-b904d9ae152f2360.js\",\"4095\",\"static/chunks/app/(main)/layout-692cb1da92b73287.js\"],\"default\",1]\ne:I[89083,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"default\"]\nf:I[48283,[\"6812\",\"static/chunks/6812-f5924f14ef"])</script><script>self.__next_f.push([1,"351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"ThemeProvider\"]\n10:I[22237,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"QueryProvider\"]\n11:\"$Sreact.suspense\"\n12:I[3454,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"LoadingProvider\"]\n18:I[19253,[],\"\"]\nd:{}\n13:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n14:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n15:{\"display\":\"inline-block\"}\n16:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n19:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L6\",null,{\"buildId\":\"ZVkcx2OmeAN6P00KKasi0\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"audit-logs\"],\"initialTree\":[\"\",{\"children\":[\"(main)\",{\"children\":[\"audit-logs\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"(main)\",{\"children\":[\"audit-logs\",{\"children\":[\"__PAGE__\",{},[[\"$L7\",[\"$\",\"$L8\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$9\"}],null],null],null]},[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(main)\",\"children\",\"audit-logs\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(main)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":\"$d\"}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_1d908f\",\"children\":[\"$\",\"div\",null,{\"id\":\"__next\",\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$11\",null,{\"fallback\":null,\"children\":[\"$\",\"$L12\",null,{\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$13\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$14\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$15\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$16\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L17\"],\"globalErrorComponent\":\"$18\",\"missingSlots\":\"$W19\"}]\n"])</script><script>self.__next_f.push([1,"17:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Minecraft Server Manager\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Web-based management console for Minecraft server infrastructure\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/icon.svg?0f68875a168deab8\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"meta\",\"5\",{\"name\":\"next-size-adjust\"}]]\n7:null\n"])</script></body></html>
@@ -13,6 +13,6 @@ d:{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Appl
13
13
  e:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"}
14
14
  f:{"display":"inline-block"}
15
15
  10:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0}
16
- 0:["ddlfT0dafY0G-jGkapBmi",[[["",{"children":["(main)",{"children":["audit-logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(main)",{"children":["audit-logs",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(main)","children","audit-logs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(main)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/8dfdea5f9ccf5da4.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1d908f","children":["$","div",null,{"id":"__next","children":["$","$L8",null,{"children":["$","$L9",null,{"children":["$","$La",null,{"children":["$","$b",null,{"fallback":null,"children":["$","$Lc",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$d","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$e","children":"404"}],["$","div",null,{"style":"$f","children":["$","h2",null,{"style":"$10","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]}]}]}]}]}]],null],null],["$L11",null]]]]
16
+ 0:["ZVkcx2OmeAN6P00KKasi0",[[["",{"children":["(main)",{"children":["audit-logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(main)",{"children":["audit-logs",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(main)","children","audit-logs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(main)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/8dfdea5f9ccf5da4.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1d908f","children":["$","div",null,{"id":"__next","children":["$","$L8",null,{"children":["$","$L9",null,{"children":["$","$La",null,{"children":["$","$b",null,{"fallback":null,"children":["$","$Lc",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$d","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$e","children":"404"}],["$","div",null,{"style":"$f","children":["$","h2",null,{"style":"$10","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]}]}]}]}]}]],null],null],["$L11",null]]]]
17
17
  11:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Minecraft Server Manager"}],["$","meta","3",{"name":"description","content":"Web-based management console for Minecraft server infrastructure"}],["$","link","4",{"rel":"icon","href":"/icon.svg?0f68875a168deab8","type":"image/svg+xml","sizes":"any"}],["$","meta","5",{"name":"next-size-adjust"}]]
18
18
  1:null