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

clubhouse-cli

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clubhouse-cli - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

4

package.json
{
"name": "clubhouse-cli",
"version": "1.2.0",
"version": "1.3.0",
"description": "A command line tool for viewing, creating and updating clubhouse.io stories",

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

"cli-spinner": "^0.2.6",
"clubhouse-lib": "^0.2.0",
"clubhouse-lib": "^0.3.0",
"commander": "^2.11.0",

@@ -35,0 +35,0 @@ "debug": "^3.1.0",

@@ -282,2 +282,7 @@ # clubhouse-cli

You may also provide a clubhouse API token via environment variable `CLUBHOUSE_API_TOKEN`.
~~~sh
$ CLUBHOUSE_API_TOKEN=foobar club story 3300
~~~
## Acknowledgments

@@ -284,0 +289,0 @@

@@ -8,5 +8,10 @@ const path = require('path');

const loadConfig = () => {
const envToken = process.env.CLUBHOUSE_API_TOKEN;
if (fs.existsSync(configFile)) {
try {
return JSON.parse(fs.readFileSync(configFile, 'utf8'));
const config = JSON.parse(fs.readFileSync(configFile, 'utf8'));
if (envToken) {
return Object.assign({}, config, { token: envToken });
}
return config;
} catch (e) {

@@ -17,2 +22,5 @@ console.error(e);

}
if (envToken) {
return { token: envToken };
}
return false;

@@ -19,0 +27,0 @@ };

const chalk = require('chalk');
const debug = require('debug')('club');
const client = require('./client.js');

@@ -11,2 +12,3 @@ const log = console.log;

const listStories = async (program) => {
debug('request workflows, members, projects, epics');
[ wfs, members, projects, epics ] = await Promise.all([

@@ -18,2 +20,3 @@ client.listWorkflows(),

]);
debug('response workflows, members, projects, epics');
wf = wfs[0]; // TODO: this is always getting the default workflow

@@ -25,3 +28,5 @@ let regexProject = new RegExp(program.project, 'i');

});
debug('filtering projects');
var stories = await Promise.all(filteredProjects.map(fetchStories));
debug('filtering stories');
return stories.map(filterStories(program, filteredProjects))

@@ -34,2 +39,3 @@ .reduce((a, b) => {

const fetchStories = async (project) => {
debug('request stories for project', project.id);
return client.listStories(project.id);

@@ -112,2 +118,3 @@ };

};
debug('sorting stories');
return (a, b) => {

@@ -114,0 +121,0 @@ return fields.reduce((acc, field) => {

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