@rip-lang/server 1.1.0 → 1.1.1
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 +2 -2
- package/server.rip +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Pure Rip application server — multi-worker, hot reload, HTTPS, mDNS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.rip",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"rip-lang": "^3.0.0",
|
|
42
|
-
"@rip-lang/api": "^1.1.
|
|
42
|
+
"@rip-lang/api": "^1.1.1"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"bin/",
|
package/server.rip
CHANGED
|
@@ -125,7 +125,7 @@ INTERNAL_HEADERS = new Set(['rip-worker-busy', 'rip-worker-id'])
|
|
|
125
125
|
|
|
126
126
|
stripInternalHeaders = (h) ->
|
|
127
127
|
out = new Headers()
|
|
128
|
-
for [k, v]
|
|
128
|
+
for [k, v] as h.entries()
|
|
129
129
|
continue if INTERNAL_HEADERS.has(k.toLowerCase())
|
|
130
130
|
out.append(k, v)
|
|
131
131
|
out
|
|
@@ -247,7 +247,7 @@ parseFlags = (argv) ->
|
|
|
247
247
|
process.exit(2)
|
|
248
248
|
|
|
249
249
|
getKV = (prefix) ->
|
|
250
|
-
for f
|
|
250
|
+
for f as rawFlags
|
|
251
251
|
return f.slice(prefix.length) if f.startsWith(prefix)
|
|
252
252
|
undefined
|
|
253
253
|
|
|
@@ -390,7 +390,7 @@ runWorker = ->
|
|
|
390
390
|
unless h
|
|
391
391
|
try
|
|
392
392
|
api = import!('@rip-lang/api')
|
|
393
|
-
h = api?.startHandler
|
|
393
|
+
h = api?.startHandler?.()
|
|
394
394
|
catch
|
|
395
395
|
null
|
|
396
396
|
|
|
@@ -644,7 +644,7 @@ class Manager
|
|
|
644
644
|
|
|
645
645
|
retiring = new Set(pairs.map((p) -> p.old.id))
|
|
646
646
|
@workers = @workers.filter((w) -> not retiring.has(w.id))
|
|
647
|
-
@retiringIds.delete(id) for id
|
|
647
|
+
@retiringIds.delete(id) for id as retiring
|
|
648
648
|
|
|
649
649
|
shutdown: ->
|
|
650
650
|
return if @shuttingDown
|
|
@@ -744,7 +744,7 @@ class Server
|
|
|
744
744
|
try @httpsServer?.stop() catch then null
|
|
745
745
|
try @control?.stop() catch then null
|
|
746
746
|
|
|
747
|
-
for [host, proc]
|
|
747
|
+
for [host, proc] as @mdnsProcesses
|
|
748
748
|
try
|
|
749
749
|
proc.kill()
|
|
750
750
|
console.log "rip-server: stopped advertising #{host} via mDNS"
|