@rip-lang/server 0.7.6 → 0.7.7
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 +7 -0
package/package.json
CHANGED
package/server.rip
CHANGED
|
@@ -615,6 +615,11 @@ class Server
|
|
|
615
615
|
@httpsActive = false
|
|
616
616
|
@hostRegistry = new Set(['localhost', '127.0.0.1', 'rip.local'])
|
|
617
617
|
@mdnsProcesses = new Map()
|
|
618
|
+
try
|
|
619
|
+
pkg = JSON.parse(readFileSync(import.meta.dir + '/package.json', 'utf8'))
|
|
620
|
+
@serverVersion = pkg.version
|
|
621
|
+
catch
|
|
622
|
+
@serverVersion = 'unknown'
|
|
618
623
|
|
|
619
624
|
for alias in @flags.appAliases
|
|
620
625
|
host = if alias.includes('.') then alias else "#{alias}.local"
|
|
@@ -729,8 +734,10 @@ class Server
|
|
|
729
734
|
uptime = Math.floor((nowMs() - @startedAt) / 1000)
|
|
730
735
|
healthy = @sockets.length > 0
|
|
731
736
|
hosts = Array.from(@hostRegistry.values())
|
|
737
|
+
version = @serverVersion
|
|
732
738
|
body = JSON.stringify
|
|
733
739
|
status: if healthy then 'healthy' else 'degraded'
|
|
740
|
+
version: version
|
|
734
741
|
app: @flags.appName
|
|
735
742
|
workers: @sockets.length
|
|
736
743
|
ports: { http: @flags.httpPort or undefined, https: @flags.httpsPort or undefined }
|