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

swifton

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swifton - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

52

app.js

@@ -12,5 +12,24 @@ #!/usr/bin/env node

var spinner = new Spinner('Talking to Serve Swifton.me…');
var app = require('commander');
// prompt
var prompt = Promise.promisifyAll(require('prompt'));
prompt.message = ""
prompt.delimiter = ""
var viewLogs = function viewLogs (containerId) {
request
.get({
uri: 'https://serve.swifton.me/' + containerId + '/logs'
})
.on('response', function (response) {
spinner.stop(true);
})
.on('error', function (err) {
spinner.stop(true);
console.error(chalk.bold.red('An error occured when trying to stream your App\'s logs:'), err);
})
.pipe(process.stdout);
};
app

@@ -51,2 +70,20 @@ .version('0.0.1')

console.log(message);
prompt.getAsync({
properties: {
showLogs: {
description: 'Would you now like to see your App\'s logs now?',
type: 'boolean',
default: true,
required: true
}
}
})
.then(function (result) {
if (result.showLogs) {
viewLogs(response.body.container_id);
}
})
.catch(function (err) {
// nothing to do here
});
})

@@ -88,14 +125,3 @@ .catch(function (err) {

spinner.start();
request
.getAsync({
uri: 'https://serve.swifton.me/' + containerId + '/logs'
})
.then(function (response) {
spinner.stop(true);
console.log(response.body);
})
.catch(function (err) {
spinner.stop(true);
console.error(chalk.bold.red('An error occured when trying to stream your App\'s logs:'), err);
});
viewLogs(containerId);
});

@@ -102,0 +128,0 @@

{
"name": "swifton",
"version": "0.0.5",
"version": "0.0.6",
"description": "The official CLI for Swifton.me",

@@ -36,2 +36,3 @@ "main": "app.js",

"commander": "^2.9.0",
"prompt": "^0.2.14",
"request": "^2.67.0",

@@ -38,0 +39,0 @@ "validator": "^4.5.1"

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