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

containership.plugin.logs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

containership.plugin.logs - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

9

application.js

@@ -20,2 +20,3 @@ var _ = require("lodash");

memory: 128,
container_port: 8000,
tags: {

@@ -28,3 +29,9 @@ constraints: {

}
}
},
volumes: [
{
host: "/var/run/docker.sock",
container: "/tmp/docker.sock"
}
]
}, function(){

@@ -31,0 +38,0 @@ core.loggers[application_name].log("verbose", ["Created ", application_name, "!"].join(""));

49

lib/logs.js
var _ = require("lodash");
var async = require("async");
var request = require("request");
var http = require("http");

@@ -10,3 +10,3 @@ module.exports = function(core){

register_route: function(){
core.api.server.server.get("/:api_version/logs/:application/containers/:container/:log_type", this.route_callback);
core.api.server.server.get("/:api_version/logs/:application/containers/:container", this.route_callback);
},

@@ -17,12 +17,3 @@

function(fn){
var valid_log_types = ["stderr", "stdout"];
if(!_.contains(valid_log_types, req.params.log_type)){
var err = new Error({ status: 400 });
return fn(err);
}
return fn();
},
function(fn){
self.get_container(req.params.application, req.params.container, function(err, container){
core.applications.get_container(req.params.application, req.params.container, function(err, container){
if(err){

@@ -47,6 +38,7 @@ var err = new Error({ status: 404 });

function(peer, fn){
self.get_containers("containership-logs", function(err, containers){
if(err)
core.applications.get_containers("containership-logs", function(err, containers){
if(err){
var err = new Error({ status: 404 });
return fn(err);
}

@@ -64,13 +56,30 @@ containers = _.indexBy(containers, "host");

}
], function(err){
], function(err, options){
if(err)
res.sendStatus(err.status);
else{
var options = {
baseUrl: [options.address, options.port].join(":"),
url: ["", "logs", ["name", [req.params.application, req.params.container].join(":")].join("-")].join("/"),
json: true
res.setHeader("Connection", "Transfer-Encoding");
res.setHeader("Content-Type", "text/html; charset=utf-8");
res.setHeader("Transfer-Encoding", "chunked");
options.path = ["", "logs", ["name", [req.params.application, req.params.container].join("-")].join(":")].join("/");
options.headers = {
Accept: "application/json"
}
request(options).pipe(res);
var request = http.request(options, function(response){
response.on("data", function(chunk){
res.write(chunk);
});
response.on("error", function(err){
res.end();
request.destroy();
});
}
request.end();
req.on("close", function(){
request.destroy();
)};
}

@@ -77,0 +86,0 @@ });

{
"name": "containership.plugin.logs",
"version": "0.0.1",
"version": "0.0.2",
"dependencies": {
"async": {
"version": "1.5.0",
"from": "async@",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz"
},
"containership.plugin": {

@@ -13,377 +18,4 @@ "version": "0.3.0",

"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz"
},
"request": {
"version": "2.67.0",
"from": "request@",
"resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz",
"dependencies": {
"bl": {
"version": "1.0.0",
"from": "bl@~1.0.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.0.0.tgz",
"dependencies": {
"readable-stream": {
"version": "2.0.4",
"from": "readable-stream@~2.0.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz",
"dependencies": {
"core-util-is": {
"version": "1.0.2",
"from": "core-util-is@~1.0.0",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
},
"inherits": {
"version": "2.0.1",
"from": "inherits@~2.0.1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
},
"isarray": {
"version": "0.0.1",
"from": "isarray@0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
},
"process-nextick-args": {
"version": "1.0.6",
"from": "process-nextick-args@~1.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz"
},
"string_decoder": {
"version": "0.10.31",
"from": "string_decoder@~0.10.x",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
},
"util-deprecate": {
"version": "1.0.2",
"from": "util-deprecate@~1.0.1",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
}
}
}
}
},
"caseless": {
"version": "0.11.0",
"from": "caseless@~0.11.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz"
},
"extend": {
"version": "3.0.0",
"from": "extend@~3.0.0",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz"
},
"forever-agent": {
"version": "0.6.1",
"from": "forever-agent@~0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
},
"form-data": {
"version": "1.0.0-rc3",
"from": "form-data@~1.0.0-rc3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz",
"dependencies": {
"async": {
"version": "1.5.0",
"from": "async@^1.4.0",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz"
}
}
},
"json-stringify-safe": {
"version": "5.0.1",
"from": "json-stringify-safe@~5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
},
"mime-types": {
"version": "2.1.8",
"from": "mime-types@~2.1.7",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.8.tgz",
"dependencies": {
"mime-db": {
"version": "1.20.0",
"from": "mime-db@~1.20.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.20.0.tgz"
}
}
},
"node-uuid": {
"version": "1.4.7",
"from": "node-uuid@~1.4.7",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz"
},
"qs": {
"version": "5.2.0",
"from": "qs@~5.2.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz"
},
"tunnel-agent": {
"version": "0.4.2",
"from": "tunnel-agent@~0.4.1",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz"
},
"tough-cookie": {
"version": "2.2.1",
"from": "tough-cookie@~2.2.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.1.tgz"
},
"http-signature": {
"version": "1.1.0",
"from": "http-signature@~1.1.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.0.tgz",
"dependencies": {
"assert-plus": {
"version": "0.1.5",
"from": "assert-plus@^0.1.5",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
},
"jsprim": {
"version": "1.2.2",
"from": "jsprim@^1.2.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz",
"dependencies": {
"extsprintf": {
"version": "1.0.2",
"from": "extsprintf@1.0.2",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
},
"json-schema": {
"version": "0.2.2",
"from": "json-schema@0.2.2",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"
},
"verror": {
"version": "1.3.6",
"from": "verror@1.3.6",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz"
}
}
},
"sshpk": {
"version": "1.7.1",
"from": "sshpk@^1.7.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.1.tgz",
"dependencies": {
"asn1": {
"version": "0.2.3",
"from": "asn1@>=0.2.3 <0.3.0",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz"
},
"assert-plus": {
"version": "0.2.0",
"from": "assert-plus@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz"
},
"dashdash": {
"version": "1.10.1",
"from": "dashdash@>=1.10.1 <2.0.0",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.10.1.tgz",
"dependencies": {
"assert-plus": {
"version": "0.1.5",
"from": "assert-plus@0.1.x",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
}
}
},
"jsbn": {
"version": "0.1.0",
"from": "jsbn@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz"
},
"tweetnacl": {
"version": "0.13.2",
"from": "tweetnacl@>=0.13.0 <1.0.0",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.2.tgz"
},
"jodid25519": {
"version": "1.0.2",
"from": "jodid25519@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz"
},
"ecc-jsbn": {
"version": "0.1.1",
"from": "ecc-jsbn@>=0.0.1 <1.0.0",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
}
}
}
}
},
"oauth-sign": {
"version": "0.8.0",
"from": "oauth-sign@~0.8.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.0.tgz"
},
"hawk": {
"version": "3.1.2",
"from": "hawk@~3.1.0",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.2.tgz",
"dependencies": {
"hoek": {
"version": "2.16.3",
"from": "hoek@2.x.x",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz"
},
"boom": {
"version": "2.10.1",
"from": "boom@2.x.x",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz"
},
"cryptiles": {
"version": "2.0.5",
"from": "cryptiles@2.x.x",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz"
},
"sntp": {
"version": "1.0.9",
"from": "sntp@1.x.x",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
}
}
},
"aws-sign2": {
"version": "0.6.0",
"from": "aws-sign2@~0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz"
},
"stringstream": {
"version": "0.0.5",
"from": "stringstream@~0.0.4",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
},
"combined-stream": {
"version": "1.0.5",
"from": "combined-stream@~1.0.5",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
"dependencies": {
"delayed-stream": {
"version": "1.0.0",
"from": "delayed-stream@~1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
}
}
},
"isstream": {
"version": "0.1.2",
"from": "isstream@~0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
},
"is-typedarray": {
"version": "1.0.0",
"from": "is-typedarray@~1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz"
},
"har-validator": {
"version": "2.0.3",
"from": "har-validator@~2.0.2",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz",
"dependencies": {
"chalk": {
"version": "1.1.1",
"from": "chalk@^1.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz",
"dependencies": {
"ansi-styles": {
"version": "2.1.0",
"from": "ansi-styles@^2.1.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz"
},
"escape-string-regexp": {
"version": "1.0.3",
"from": "escape-string-regexp@^1.0.2",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz"
},
"has-ansi": {
"version": "2.0.0",
"from": "has-ansi@^2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"dependencies": {
"ansi-regex": {
"version": "2.0.0",
"from": "ansi-regex@^2.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
}
}
},
"strip-ansi": {
"version": "3.0.0",
"from": "strip-ansi@^3.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz",
"dependencies": {
"ansi-regex": {
"version": "2.0.0",
"from": "ansi-regex@^2.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
}
}
},
"supports-color": {
"version": "2.0.0",
"from": "supports-color@^2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
}
}
},
"commander": {
"version": "2.9.0",
"from": "commander@^2.9.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
"dependencies": {
"graceful-readlink": {
"version": "1.0.1",
"from": "graceful-readlink@>= 1.0.0",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
}
}
},
"is-my-json-valid": {
"version": "2.12.3",
"from": "is-my-json-valid@^2.12.3",
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz",
"dependencies": {
"generate-function": {
"version": "2.0.0",
"from": "generate-function@^2.0.0",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
},
"generate-object-property": {
"version": "1.2.0",
"from": "generate-object-property@^1.1.0",
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
"dependencies": {
"is-property": {
"version": "1.0.2",
"from": "is-property@^1.0.0",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
}
}
},
"jsonpointer": {
"version": "2.0.0",
"from": "jsonpointer@2.0.0",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz"
},
"xtend": {
"version": "4.0.1",
"from": "xtend@^4.0.0",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz"
}
}
},
"pinkie-promise": {
"version": "2.0.0",
"from": "pinkie-promise@^2.0.0",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz",
"dependencies": {
"pinkie": {
"version": "2.0.1",
"from": "pinkie@^2.0.0",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.1.tgz"
}
}
}
}
}
}
}
}
}
{
"name": "containership.plugin.logs",
"version": "0.0.1",
"version": "0.0.2",
"description": "Official logging plugin for ContainerShip",

@@ -12,5 +12,5 @@ "main": "application.js",

"dependencies": {
"async": "^1.5.0",
"containership.plugin": "^0.3.0",
"lodash": "^3.0.0",
"request": "^2.67.0"
"lodash": "^3.0.0"
},

@@ -17,0 +17,0 @@ "keywords": [

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