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

cabal-cli

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cabal-cli - npm Package Compare versions

Comparing version 7.1.5 to 8.0.2

.cabal.yml

55

cli.js

@@ -57,22 +57,23 @@ #!/usr/bin/env node

Options:
--seed Start a headless seed for the specified cabal key
--seed Start a headless seed for the specified cabal key
--new Start a new cabal
--nick Your nickname
--alias Save an alias for the specified cabal, use with --key
--aliases Print out your saved cabal aliases
--forget Forgets the specified alias
--clear Clears out all aliases
--key Specify a cabal key. Used with --alias
--join Only join the specified cabal, disregarding whatever is in the config
--config Specify a full path to a cabal config
--new Start a new cabal
--nick Your nickname
--alias Save an alias for the specified cabal, use with --key
--aliases Print out your saved cabal aliases
--forget Forgets the specified alias
--clear Clears out all aliases
--key Specify a cabal key. Used with --alias
--join Only join the specified cabal, disregarding whatever is in the config
--config Specify a full path to a cabal config
--temp Start the cli with a temporary in-memory database. Useful for debugging
--version Print out which version of cabal you're running
--help Print this help message
--temp Start the cli with a temporary in-memory database. Useful for debugging
--version Print out which version of cabal you're running
--help Print this help message
--message Publish a single message; then quit after \`timeout\`
--channel Channel name to publish to for \`message\` option; default: "default"
--timeout Delay in milliseconds to wait on swarm before quitting for \`message\` option; default: 5000
--type Message type set to message for \`message\` option; default: "chat/text"
--message Publish a single message; then quit after \`timeout\`
--channel Channel name to publish to for \`message\` option; default: "default"
--timeout Delay in milliseconds to wait on swarm before quitting for \`message\` option; default: 5000
--type Message type set to message for \`message\` option; default: "chat/text"
--offline Disable networking

@@ -274,12 +275,16 @@ Work in progress! Learn more at https://github.com/cabal-club

})
setTimeout(() => {
if (!args.offline) {
setTimeout(() => {
cabals.forEach((cabal) => {
cabal.swarm()
})
}, 300)
}
} else {
if (!args.offline) {
cabals.forEach((cabal) => {
console.log('Seeding', cabal.key)
cabal.swarm()
})
}, 300)
} else {
cabals.forEach((cabal) => {
console.log('Seeding', cabal.key)
cabal.swarm()
})
}
}

@@ -331,5 +336,5 @@ }

})
cabal.swarm()
if (!args.offline) cabal.swarm()
setTimeout(function () { process.exit(0) }, timeout || 5000)
})
}

@@ -160,3 +160,3 @@ var util = require('./util')

line = line.trim()
if (line !== '' && self.channel !== "!status") {
if (line !== '' && self.channel !== '!status') {
self.cabal.publish({

@@ -163,0 +163,0 @@ type: 'chat/text',

@@ -1,3 +0,3 @@

var ansiEscapes = require("ansi-escapes")
var supportsHyperlinks = require("supports-hyperlinks")
var ansiEscapes = require('ansi-escapes')
var supportsHyperlinks = require('supports-hyperlinks')

@@ -7,3 +7,3 @@ var linkPattern = /(\[(.+?)\]\((\S+)\))/

function linkify (text, url) {
return supportsHyperlinks.stdout ? ansiEscapes.link(text, url) : `${text} (${url})`
return supportsHyperlinks.stdout ? ansiEscapes.link(text, url) : `${text} (${url})`
}

@@ -10,0 +10,0 @@

var Cabal = require('cabal-core')
var chalk = require('chalk')
var stripAnsi = require('strip-ansi')
var collect = require('collect-stream')

@@ -11,4 +10,2 @@ var Commander = require('./commands.js')

var yaml = require('js-yaml')
var emojiRegex = require('emoji-regex')
var emojiPattern = emojiRegex()
var util = require('./util')

@@ -439,7 +436,5 @@

/* sanitize input to prevent interface from breaking */
// emojis.break the cli: replace them with a cabal symbol
var msgtxt = msg.value.content.text.replace(emojiPattern, '➤')
var msgtxt = msg.value.content.text
if (msg.key !== 'status') {
msgtxt = stripAnsi(msgtxt) // strip non-visible sequences
msgtxt = msgtxt.replace(/[\u0000-\u0009]|[\u000b-\u001f]/g, '') // keep newline (aka LF aka ascii character 10 aka \u000a)
msgtxt = util.sanitizeString(msgtxt)
}

@@ -446,0 +441,0 @@

{
"name": "cabal-cli",
"version": "7.1.5",
"version": "8.0.2",
"description": "p2p chat",

@@ -11,3 +11,3 @@ "main": "index.js",

"ansi-escapes": "^4.2.0",
"cabal-core": "^6.0.0",
"cabal-core": "^7.0.0",
"cabal-dns": "^1.0.1",

@@ -14,0 +14,0 @@ "chalk": "^2.4.1",

@@ -0,1 +1,5 @@

var stripAnsi = require('strip-ansi')
var emojiRegex = require('emoji-regex')
var emojiPattern = emojiRegex()
function log (err, result) {

@@ -6,2 +10,8 @@ if (err) { console.error('hyperdb failed with', err) }

function sanitizeString (str) {
// emojis.break the cli: replace them with a cabal symbol
str = str.replace(emojiPattern, '➤')
str = stripAnsi(str) // strip non-visible sequences
return str.replace(/[\u0000-\u0009]|[\u000b-\u001f]/g, '') // keep newline (aka LF aka ascii character 10 aka \u000a)
}
// Character-wrap text containing ANSI escape codes.

@@ -104,2 +114,2 @@ // String, Int -> [String]

module.exports = { cmpUser, log, wrapAnsi, strlenAnsi, centerText, rightAlignText, wrapStatusMsg }
module.exports = { cmpUser, log, wrapAnsi, strlenAnsi, centerText, rightAlignText, wrapStatusMsg, sanitizeString }

@@ -166,3 +166,3 @@ var output = require('./output')

var topic = state.topic || state.channel
var line = '➤ ' + topic
var line = '➤ ' + util.sanitizeString(topic)
line = line.substring(0, width - 1)

@@ -169,0 +169,0 @@ if (line.length === width - 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