@rip-lang/server 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.rip +5 -2
package/package.json
CHANGED
package/server.rip
CHANGED
|
@@ -817,11 +817,14 @@ class Server
|
|
|
817
817
|
|
|
818
818
|
return @status() if url.pathname is '/status'
|
|
819
819
|
|
|
820
|
-
# SSE hot-reload: intercept /{prefix}/watch
|
|
820
|
+
# SSE hot-reload: intercept /{prefix}/watch
|
|
821
821
|
path = url.pathname
|
|
822
822
|
if path.endsWith('/watch')
|
|
823
823
|
watchPrefix = path.slice(0, -6) # strip '/watch'
|
|
824
|
-
|
|
824
|
+
if @watchGroups.has(watchPrefix)
|
|
825
|
+
return @handleWatch(watchPrefix)
|
|
826
|
+
else
|
|
827
|
+
return new Response('', { status: 503, headers: { 'Retry-After': '2' } })
|
|
825
828
|
|
|
826
829
|
if url.pathname is '/server'
|
|
827
830
|
headers = new Headers({ 'content-type': 'text/plain' })
|