vuer 0.0.29rc11__py3-none-any.whl → 0.0.31rc1__py3-none-any.whl

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.

Potentially problematic release.


This version of vuer might be problematic. Click here for more details.

Binary file
Binary file
vuer/base.py CHANGED
@@ -51,6 +51,7 @@ async def handle_file_request(request, root, filename=None):
51
51
 
52
52
  class Server:
53
53
  """Base TCP server"""
54
+
54
55
  host = Proto(env="HOST", default="localhost")
55
56
  cors = Proto(help="Enable CORS", default="*")
56
57
  port = Proto(env="PORT", default=8012)
@@ -59,10 +60,19 @@ class Server:
59
60
  key = Proto(None, dtype=str, help="the path to the SSL key")
60
61
  ca_cert = Proto(None, dtype=str, help="the trusted root CA certificates")
61
62
 
62
- WEBSOCKET_MAX_SIZE = 2**28
63
+ WEBSOCKET_MAX_SIZE: int = Proto(
64
+ 2**28,
65
+ env="WEBSOCKET_MAX_SIZE",
66
+ help="maximum size for websocket requests.",
67
+ )
68
+ REQUEST_MAX_SIZE: int = Proto(
69
+ 2**28,
70
+ env="REQUEST_MAX_SIZE",
71
+ help="maximum size for requests.",
72
+ )
63
73
 
64
74
  def __post_init__(self):
65
- self.app = web.Application()
75
+ self.app = web.Application(client_max_size=self.REQUEST_MAX_SIZE)
66
76
 
67
77
  default = aiohttp_cors.ResourceOptions(
68
78
  allow_credentials=True,
@@ -104,9 +114,13 @@ class Server:
104
114
 
105
115
  def run(self):
106
116
  async def init_server():
117
+ runner = web.AppRunner(self.app)
118
+ await runner.setup()
119
+ if not self.cert:
120
+ site = web.TCPSite(runner, self.host, self.port)
121
+ return await site.start()
122
+
107
123
  ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
108
- print(self.cert)
109
- print(self.key)
110
124
  ssl_context.load_cert_chain(certfile=self.cert, keyfile=self.key)
111
125
  if self.ca_cert:
112
126
  ssl_context.load_verify_locations(self.ca_cert)
@@ -114,18 +128,8 @@ class Server:
114
128
  else:
115
129
  ssl_context.verify_mode = ssl.CERT_OPTIONAL
116
130
 
117
- runner = web.AppRunner(self.app)
118
- await runner.setup()
119
- if self.cert:
120
- site = web.TCPSite(
121
- runner, self.host, self.port, ssl_context=ssl_context
122
- )
123
- else:
124
- site = web.TCPSite(runner, self.host, self.port)
125
- await site.start()
126
-
127
- # This print has been very confusing to the user. Remove. - Ge
128
- # print(f"Serving on http://{self.host}:{self.port}")
131
+ site = web.TCPSite(runner, self.host, self.port, ssl_context=ssl_context)
132
+ return await site.start()
129
133
 
130
134
  event_loop = asyncio.get_event_loop()
131
135
 
@@ -6,7 +6,7 @@
6
6
  </head>
7
7
  <body>
8
8
  <div id="page-view"><h1>404 Page Not Found</h1><p>This page could not be found.</p></div>
9
- <script type="module" src="/assets/entries/entry-client-routing.eed5a391.js" defer></script>
9
+ <script type="module" src="/assets/entries/entry-client-routing.366b6f36.js" defer></script>
10
10
  <link rel="modulepreload" href="/assets/entries/renderer_error.page.4485c2ac.js" as="script" type="text/javascript">
11
11
  <link rel="modulepreload" href="/assets/chunks/chunk-0c07adda.js" as="script" type="text/javascript">
12
12
  <link rel="modulepreload" href="/assets/entries/renderer_default.page.client.98b62a91.js" as="script" type="text/javascript">
@@ -0,0 +1 @@
1
+ import{_ as u}from"./chunk-cf010ec4.js";import{n as l,o as c}from"./chunk-f1f5ab43.js";import{r as a}from"./chunk-0c07adda.js";import"./chunk-ceb3463c.js";const m={all:255,foregrounds:2,backgrounds:1};let s=!1;async function p(e=t=>{s=t}){if(typeof window>"u")return;const{LumaSplatsThree:o}=await u(()=>import("./chunk-296fa6e9.js"),["assets/chunks/chunk-296fa6e9.js","assets/chunks/chunk-f1f5ab43.js","assets/chunks/chunk-0c07adda.js","assets/chunks/chunk-cf010ec4.js","assets/chunks/chunk-ceb3463c.js"]);c({LumaSplats:o}),e(!0)}function L({src:e,semantics:t="all",...o}){const[n,i]=a.useState(s);return a.useEffect(()=>{s||(async()=>{console.log("registering LumaSplats component. This should occur only once."),await p(r=>{i(r),s=r})})()},[]),n?l.jsx("lumaSplats",{semanticsMask:m[t],source:e,...o}):null}export{L as default};