Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodecaf-run

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodecaf-run - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

CHANGELOG.md

@@ -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

6

lib/main.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc