nodecaf-run
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -8,2 +8,10 @@ # Nodecaf Run Changelog | ||
## [v0.1.1] - 2020-08-10 | ||
### Added | ||
- support to Nodecaf v0.11.x | ||
### Fixed | ||
- bug trying to reload on changes to `main.js` | ||
## [v0.1.0] - 2020-08-10 | ||
@@ -45,1 +53,2 @@ | ||
[v0.1.0]: https://gitlab.com/nodecaf/run/-/tags/v0.1.0 | ||
[v0.1.1]: https://gitlab.com/nodecaf/run/-/tags/v0.1.1 |
@@ -87,4 +87,4 @@ const path = require('path'); | ||
// Invalidate changed file and all parents up to init function | ||
var nm = {}; | ||
while(!nm.exports || nm.exports.name != 'init'){ | ||
var nm = require.cache[path]; | ||
while(nm.parent && nm.parent.exports.name != 'run'){ | ||
nm = require.cache[path].parent; | ||
@@ -98,7 +98,5 @@ delete require.cache[path]; | ||
//newApp.debugEvents = app.debugEvents; | ||
newApp.log.debug({ class: 'app' }, 'Reloaded'); | ||
await newApp.start(); | ||
//newApp.debugEvents.emit('reloaded', newApp); | ||
} | ||
@@ -105,0 +103,0 @@ |
{ | ||
"name": "nodecaf-run", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A module to run standalone Nodecaf apps as opposed to requiring them.", | ||
@@ -40,3 +40,3 @@ "main": "lib/main.js", | ||
"muhb": "^3.0.3", | ||
"nodecaf": "^0.10.1", | ||
"nodecaf": "^0.11.0", | ||
"tempper": "^0.1.1", | ||
@@ -43,0 +43,0 @@ "toml": "^3.0.0" |
@@ -5,5 +5,6 @@ | ||
module.exports = () => new Nodecaf({ | ||
conf: { port: 80 }, | ||
api({ get }){ | ||
get('/bar', ({ res, conf }) => { | ||
res.set('Content-Type', 'text/plain'); | ||
res.type('text'); | ||
res.end(conf.name || conf.key || 'foo'); | ||
@@ -10,0 +11,0 @@ }); |
@@ -60,4 +60,2 @@ const assert = require('assert'); | ||
// TODO fix cryptic error EPERM on writing and closing the watched file | ||
@@ -97,7 +95,3 @@ /* | ||
}); | ||
});*/ | ||
}); | ||
@@ -104,0 +98,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15418
213