npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anura-gate/watcher-jira

v0.2.6

Published

GATE Watcher — Self-hosted Jira event monitor with OAuth 2.0. Credentials never leave your machine.

Downloads

783

Readme

GATE Watcher — Jira

Self-hosted daemon that monitors your Jira Cloud projects for issue updates, comments, and transitions, pushing them to GATE for security processing. Your Jira credentials never leave your machine.

How it works

Your Machine (Watcher)              GATE Cloud
┌─────────────────────┐        ┌──────────────────┐
│ Jira API polling     │───────>│ Security pipeline │
│ (creds stay HERE)    │<───────│ (redact, policy,  │
│                      │ poll   │  audit, forward)  │
└─────────────────────┘        └──────────────────┘

Quick Start (CLI)

cd gate-watcher-jira
npm install

# Create .env (or pass env vars directly)
cp .env.example .env
# Fill in GATE_KEY, GATE_INTEGRATION_ID, and Jira credentials

npm start

On first run with OAuth, the browser opens automatically — click Allow, and you're connected.

Auth Modes

OAuth 2.0 (recommended)

Browser-based authorization. No manual tokens or emails needed.

  1. Register an app at developer.atlassian.com/console/myapps
  2. Set callback URL to http://localhost:*/callback
  3. Enable scopes: read:jira-work, write:jira-work, read:jira-user, offline_access
  4. Set JIRA_CLIENT_ID and JIRA_CLIENT_SECRET in .env
  5. Run the watcher — browser opens, click Allow, done

Tokens are stored in ~/.gate/jira-oauth.json and auto-refresh. Use --auth to re-authorize or --logout to clear stored tokens.

API Token (headless / CI)

For environments without a browser.

  1. Create an API token at id.atlassian.com/manage-profile/security/api-tokens
  2. Set JIRA_DOMAIN, JIRA_EMAIL, and JIRA_TOKEN in .env

Embed in Your App (SDK)

npm install @anura-gate/watcher-jira

With OAuth

const { GateJiraWatcher } = require("@anura-gate/watcher-jira");

const watcher = new GateJiraWatcher({
  gateKey: "gk-xxx",
  integrationId: "int_xxx",
  oauth: {
    accessToken: "eyJ...",
    cloudId: "abcd-1234-...",
    siteUrl: "https://yourcompany.atlassian.net",
  },
  projects: ["PROJ", "ENG"], // optional — omit to watch all projects
});

await watcher.start();

With API Token

const watcher = new GateJiraWatcher({
  gateKey: "gk-xxx",
  integrationId: "int_xxx",
  jiraDomain: "yourcompany.atlassian.net",
  jiraEmail: "[email protected]",
  jiraToken: "ATATT3x...",
  projects: ["PROJ", "ENG"],
});

await watcher.start();

Listening to Events

watcher.on("ready", (displayName) => {
  console.log(`Jira connected: ${displayName}`);
});

watcher.on("event", (event, result) => {
  console.log(`Event: ${event.eventType}, Issue: ${event.content.metadata.issueKey}`);
  console.log(`Security actions: ${result.securityActions}`);
});

watcher.on("action_result", ({ action, success, error }) => {
  console.log(`${action}: ${success ? "done" : error}`);
});

// Later...
await watcher.stop();

Detected Events

| Event Type | Trigger | |---|---| | issue_transitioned | Status changed (e.g. To Do → In Progress) | | issue_assigned | Assignee changed | | issue_resolved | Resolution set (Done, Won't Fix, etc.) | | comment_added | New comment on an issue | | priority_changed | Priority changed | | labels_changed | Labels added or removed | | sprint_changed | Issue moved to a different sprint | | issue_updated | Summary, description, or other field changed |

Outbound Actions

GATE can queue actions for the watcher to execute locally:

| Action | Required Params | Optional Params | |---|---|---| | create_issue | project, summary | description, issueType, assignee, priority, labels | | add_comment | issueKey, body | — | | transition_issue | issueKey, transition | — | | assign_issue | issueKey | accountId (null = unassign) | | update_issue | issueKey | summary, description, priority, labels |

SDK Events

| Event | Args | Description | |---|---|---| | ready | (displayName) | Connected to Jira | | event | (event, result) | Jira event processed by GATE | | action | (action) | Outbound action received from GATE queue | | action_result | ({ actionId, action, success, result, error }) | Outbound action completed | | gate_error | ({ path, status, error }) | GATE API call failed | | jira_error | ({ path, error }) | Jira API call failed | | limit_reached | (type) | Plan limit hit | | stopped | — | Watcher fully shut down |

SDK Options

| Option | Required | Default | Description | |---|---|---|---| | gateKey | Yes | — | Virtual key (gk-xxx) | | integrationId | Yes | — | Integration ID (int_xxx) | | oauth | * | — | OAuth credentials ({ accessToken, cloudId, siteUrl }) | | jiraDomain | * | — | Jira Cloud domain (yourcompany.atlassian.net) | | jiraEmail | * | — | Atlassian account email | | jiraToken | * | — | Jira API token | | gateUrl | No | "https://anuragate.com" | GATE cloud URL | | projects | No | [] | Project keys to watch. Empty = all | | pollInterval | No | 30000 | ms between Jira API polls | | heartbeatInterval | No | 30000 | ms between heartbeats | | sessionId | No | — | Session ID for multi-tenant use | | sessionLabel | No | — | Human-readable session label | | sessionMetadata | No | {} | Arbitrary metadata for the session |

* Either oauth or all three of jiraDomain + jiraEmail + jiraToken are required.

Environment Variables

| Variable | Required | Description | |---|---|---| | GATE_KEY | Yes | Your GATE virtual key | | GATE_INTEGRATION_ID | Yes | Integration ID from the dashboard | | JIRA_CLIENT_ID | OAuth | Atlassian OAuth app client ID | | JIRA_CLIENT_SECRET | OAuth | Atlassian OAuth app client secret | | JIRA_DOMAIN | API Token | Jira Cloud domain (yourcompany.atlassian.net) | | JIRA_EMAIL | API Token | Atlassian account email | | JIRA_TOKEN | API Token | Jira API token | | JIRA_PROJECTS | No | Comma-separated project keys: PROJ,ENG | | GATE_URL | No | Custom GATE cloud URL | | WEB_PORT | No | Port for the dev dashboard (CLI only) |

CLI Flags

| Flag | Description | |---|---| | --auth | Force re-authorization (discard stored OAuth tokens) | | --logout | Clear stored OAuth tokens and exit |

Security Model

  • Jira credentials stored locally on YOUR machine (.env or ~/.gate/jira-oauth.json)
  • GATE cloud never sees or stores your Jira credentials
  • All event content passes through GATE's security pipeline (redaction, policies, audit)
  • Billing, limits, and security enforced server-side