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

docker-mock

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-mock - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

lib/index.js

@@ -20,2 +20,8 @@ var _ = require('lodash');

/**
* This GET is to retrieve the Docker Log stream from the container
*/
app.get('/containers/:id/logs',
mw.respondLogStream(204));
app.get('/containers/:id/top', mw.notYetImplemented);

@@ -22,0 +28,0 @@

20

lib/middleware.js

@@ -7,2 +7,4 @@ var _ = require('lodash');

var series = require('middleware-flow').series;
var testFile = './test.txt';
var fs = require('fs');

@@ -253,3 +255,3 @@ module.exports = {

'Id': container.Id,
'Image': container.Image,
'Image': container.Image
// TODO: extend with other data we may want

@@ -260,9 +262,17 @@ };

},
respondLogStream: function () {
return function (req, res, next) {
fs.writeFileSync(testFile, 'Just a bunch of text');
var stream = fs.createReadStream(testFile);
stream.pipe(res);
fs.unlinkSync(testFile);
};
},
getInfo: function (containers, images) {
return function (req, res, next) {
res.json({
'Containers': _.size(containers),
'Images': _.size(images),
'Mock': true,
// TODO: any other information we need?
'Containers': _.size(containers),
'Images': _.size(images),
'Mock': true
// TODO: any other information we need?
});

@@ -269,0 +279,0 @@ };

{
"name": "docker-mock",
"version": "0.1.0",
"version": "0.1.1",
"description": "Mock for Docker",

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

# docker-mock
# tony is cool and so is sundip

@@ -4,0 +3,0 @@ [![Build Status](https://travis-ci.org/Runnable/docker-mock.svg?branch=master)](https://travis-ci.org/Runnable/docker-mock) [![Dependency Status](https://david-dm.org/Runnable/docker-mock.svg)](https://david-dm.org/Runnable/docker-mock) [![devDependency Status](https://david-dm.org/Runnable/docker-mock/dev-status.svg)](https://david-dm.org/Runnable/docker-mock#info=devDependencies)

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