New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ldn-inbox-server

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldn-inbox-server - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

13

bin/ldn-inbox-server.js

@@ -20,3 +20,3 @@ #!/usr/bin/env node

.name('lnd-inbox-server')
.version('1.1.2')
.version('1.1.3')
.description('A demonstration Event Notifications Inbox server');

@@ -39,2 +39,3 @@

.command('handler')
.option('--loop <seconds>', 'run in a loop',0)
.option('--inbox <inbox>','inbox',INBOX_PATH)

@@ -58,5 +59,13 @@ .option('--outbox <outbox>','outbox',OUTBOX_PATH)

}
await handle_inbox(box,options);
if (options['loop']) {
while(1) {
await handle_inbox(box,options);
await new Promise(resolve => setTimeout(resolve, options['loop']*1000));
}
}
else {
await handle_inbox(box,options);
}
});
program.parse();

2

handler/demo_notification_handler.js

@@ -7,3 +7,3 @@ const fs = require('fs');

logger.info(`parsing notification ${path}`);
throw Error('eeee');
try {

@@ -10,0 +10,0 @@ const json = JSON.parse(fs.readFileSync(path, { encoding: 'utf-8'}));

@@ -19,7 +19,6 @@ const fs = require('fs');

const handler = dynamic_handler(options['notification_handler'],null);
console.log(glob);
fs.readdir(path, (err,files) => {
files.forEach( (file) => {
const fullPath = `${path}/${file}`;
console.log(file);
if (file.match(glob)) {

@@ -29,3 +28,9 @@ // Process

.then( async (release) => {
await handler(fullPath,options);
try {
await handler(fullPath,options);
}
catch (e) {
logger.error(e);
logger.error(`handler failed on ${fullPath}`);
}
return release();

@@ -32,0 +37,0 @@ })

{
"name": "ldn-inbox-server",
"version": "1.1.2",
"version": "1.1.3",
"description": "A demonstration Event Notifications Inbox server",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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