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

ohmyxbar

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ohmyxbar - npm Package Compare versions

Comparing version

to
0.0.9

build/plugins/github.js

9

build/index.js

@@ -7,5 +7,7 @@ "use strict";

const jira_1 = __importDefault(require("./plugins/jira"));
const github_1 = __importDefault(require("./plugins/github"));
const utils_1 = require("./utils");
const PLUGINS = {
jira: jira_1.default,
github: github_1.default,
};

@@ -21,5 +23,10 @@ exports.default = async (config) => {

if (PLUGINS[name]) {
(0, utils_1.logObject)(await PLUGINS[name](pluginConfig));
try {
(0, utils_1.logObject)(await PLUGINS[name](pluginConfig));
}
catch (e) {
console.log('e', e); // eslint-disable-line
}
}
}
};

10

build/plugins/jira.js

@@ -37,3 +37,4 @@ "use strict";

ticketsByStatus: 10,
group: false,
groupDepth: 'flat',
itemLength: 45,
}, cfg);

@@ -84,3 +85,3 @@ const jqlLink = (jql) => `${config.host}/issues/?jql=${encodeURIComponent(jql)}`;

projectData.byStatus[status].push({
title: (0, utils_1.truncate)(`${ticket.key} - ${ticket.fields.summary}`, 40),
title: (0, utils_1.truncate)(`${ticket.key} - ${ticket.fields.summary}`, config.itemLength),
status: ticket.fields.status.name.toLocaleLowerCase(),

@@ -92,3 +93,2 @@ href: `${config.host}/browse/${ticket.key}`,

const result = config.groupDepth === 'flat' ? [] : [];
const prjsIndicies = {};
Object.values(byProject).forEach((byProjectData) => {

@@ -99,8 +99,8 @@ const { title, href, byStatus } = byProjectData;

const res = result;
const idx = res.push({
res.push({
title,
href,
pad: 0,
size: 32,
});
prjsIndicies[title] = idx;
statusEntries.forEach(([status, byStatusArr]) => {

@@ -107,0 +107,0 @@ const statusData = statusMap[status];

{
"name": "ohmyxbar",
"version": "0.0.8",
"version": "0.0.9",
"description": "",

@@ -27,2 +27,7 @@ "main": "build/index.js",

},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"devDependencies": {

@@ -29,0 +34,0 @@ "@types/node": "^17.0.24"

# Oh My Xbar
OhMyXbar is a all-in-one plugin for xBar which allows to show your tickets from Jira, activity in Github and custom links directly on Mac's menu bar.
### Requirements
- OSX >= 13
- [npx](https://www.npmjs.com/package/npx)
### Install
```bash
curl https://raw.githubusercontent.com/zefirka/ohmyxbar/master/install.sh | bash
```
### Configuration
Configuration by default stored in `~/.ohmyxbar.js`
- `header` - symbol to draw in header (🤔 by default)
- `quickLinks` - nested map of links, where key is title, value is link or other map
- `plugins` - plugins configs
#### Jira config
```ts
{
host: "jira-host.atlassian.net",
email: "your-email@example.com",
token: "jira token",
// custom user id, by default: currentUser()
userId?: "1234-20-32-30",
// custom JQL to grab tickets
jql?: "asignee = currentUser() and priority = High",
// order key
order?: "key",
// list of statuses to exclude
excludeStatuses?: ["closed"],
// statuses map
statuses?: {
groupTitle: string;
statuses: string[];
color: string;
}[] | [status: string, color: string][];
// make projects as links to project jql
linkToProjectFilter?: boolean;
// make statuses header as links to project jql
linkToStatusFilter?: boolean;
// count of tickets by status (by default: 10)
ticketsByStatus?: number;
// draw separators between groups (applicable only in flat mode)
useSeparators?: boolean;
// how to group tickets
groupDepth?: 'flat' | 'by-project' | 'by-status';
}
```