@rip-lang/server 1.3.64 → 1.3.66
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/middleware.rip +2 -2
- package/package.json +2 -2
- package/server.rip +1 -1
package/middleware.rip
CHANGED
|
@@ -487,7 +487,7 @@ export serve = (opts = {}) ->
|
|
|
487
487
|
appDir = opts.dir or '.'
|
|
488
488
|
routesDir = "#{appDir}/#{opts.routes or 'routes'}"
|
|
489
489
|
componentDirs = (opts.components or ['components']).map (d) -> "#{appDir}/#{d}"
|
|
490
|
-
enableWatch = opts.watch
|
|
490
|
+
enableWatch = if opts.watch? then opts.watch else process.env.SOCKET_PREFIX?
|
|
491
491
|
appState = opts.state or null
|
|
492
492
|
appTitle = opts.title or null
|
|
493
493
|
|
|
@@ -559,7 +559,7 @@ export serve = (opts = {}) ->
|
|
|
559
559
|
# Register watch directories with rip-server via control socket
|
|
560
560
|
if enableWatch and process.env.SOCKET_PREFIX
|
|
561
561
|
ctl = "/tmp/#{process.env.SOCKET_PREFIX}.ctl.sock"
|
|
562
|
-
dirs = [
|
|
562
|
+
dirs = [appDir].filter existsSync
|
|
563
563
|
body = JSON.stringify({ op: 'watch', prefix, dirs })
|
|
564
564
|
fetch('http://localhost/watch', { method: 'POST', body, headers: { 'content-type': 'application/json' }, unix: ctl }).catch (e) ->
|
|
565
565
|
console.warn "[Rip] Watch registration failed: #{e.message}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/server",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.66",
|
|
4
4
|
"description": "Pure Rip web framework and application server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "api.rip",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"author": "Steve Shreeve <steve.shreeve@gmail.com>",
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"rip-lang": ">=3.13.
|
|
48
|
+
"rip-lang": ">=3.13.82"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"api.rip",
|
package/server.rip
CHANGED
|
@@ -567,7 +567,7 @@ class Manager
|
|
|
567
567
|
return unless filename.endsWith(watchExt)
|
|
568
568
|
else
|
|
569
569
|
return unless filename is @flags.watch or filename.endsWith("/#{@flags.watch}")
|
|
570
|
-
return if filename is entryBase
|
|
570
|
+
return if filename is entryBase
|
|
571
571
|
# Touch entry file to trigger rolling restart
|
|
572
572
|
try
|
|
573
573
|
now = new Date()
|