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

eavesdocker

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eavesdocker - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

10

CHANGELOG.md

@@ -8,2 +8,11 @@ # Eavesdocker Changelog

## [v0.1.11] - 2021-08-18
### Added
- feature to filter log entries by level
### Fixed
- docker log sockets not being closed correctly
- mongo transport loosing entries because of queue swapping
## [v0.1.10] - 2021-08-10

@@ -118,1 +127,2 @@

[v0.1.10]: https://gitlab.com/GCSBOSS/eavesdocker/-/tags/v0.1.10
[v0.1.11]: https://gitlab.com/GCSBOSS/eavesdocker/-/tags/v0.1.11

13

lib/docker.js

@@ -17,3 +17,3 @@ const http = require('http');

let eol = HEADER_LENGTH + this.buffer.slice(0, HEADER_LENGTH).readUInt32BE(4);
const eol = HEADER_LENGTH + this.buffer.slice(0, HEADER_LENGTH).readUInt32BE(4);
if(this.buffer.length < eol)

@@ -33,3 +33,3 @@ return setTimeout(cb, 0);

return new Promise((resolve, reject) => {
let req = http.request({ ...conf, path: '/events' }, res => {
const req = http.request({ ...conf, path: '/events' }, res => {
res.setEncoding('utf8');

@@ -53,5 +53,5 @@ let body = '';

logs(id, cb){
let path = '/containers/' + id + '/logs?follow=true&stdout=true&stderr=true&tail=0';
const path = '/containers/' + id + '/logs?follow=true&stdout=true&stderr=true&tail=0';
return new Promise((resolve, reject) => {
let req = http.request({ ...conf, path }, res => {
const req = http.request({ ...conf, path }, res => {
let body = '';

@@ -66,5 +66,6 @@

let demuxer = new Demuxer();
const demuxer = new Demuxer();
demuxer.setEncoding('utf8');
demuxer.on('data', cb);
demuxer.on('close', () => res.destroy());
res.pipe(demuxer);

@@ -80,3 +81,3 @@ resolve(demuxer);

return new Promise((resolve, reject) => {
let req = http.request({ ...conf, path }, res => {
const req = http.request({ ...conf, path }, res => {
let body = '';

@@ -83,0 +84,0 @@ res.setEncoding('utf8');

@@ -64,2 +64,6 @@

let level;
if(typeof task.level == 'string')
level = { from: task.level, to: 'unlimited' };
var transform = task.transform ? (container, input) => {

@@ -71,3 +75,3 @@ for(let stage of task.transform)

this.global.tasks[name] = { transports, services, stack, transform };
this.global.tasks[name] = { level, transports, services, stack, transform };
}

@@ -74,0 +78,0 @@ },

@@ -15,5 +15,6 @@ const assert = require('assert');

let queue = [];
const it = setInterval(async function(){
queue.length > 0 && await coll.insertMany(queue);
const it = setInterval(function(){
const readyDocs = queue;
queue = [];
readyDocs.length > 0 && coll.insertMany(readyDocs);
}, 1500);

@@ -109,3 +110,3 @@ return {

// assignee_id:
title, labels, created_at: new Date(),
title, labels, 'created_at': new Date(),
description: markdownObject.call(ctx, data)

@@ -112,0 +113,0 @@ });

{
"name": "eavesdocker",
"version": "0.1.10",
"version": "0.1.11",
"main": "lib/main.js",

@@ -5,0 +5,0 @@ "scripts": {

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