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

@syncrona/jira

v1.0.0

Published

Shared Jira read client for SyncroNow AI (Cloud and Server/Data Center auto-detection, issue context fetch) used by the core CLI and the MCP server.

Readme

@syncrona/jira

| npm | node | license | CI | coverage | TypeScript | |:--:|:--:|:--:|:--:|:--:|:--:|

Shared read-only Jira client for SyncroNow AI. It fetches rich issue context (summary, description, status, type, priority, assignee/reporter, labels, components, parent, subtasks, links, fix versions and recent comments) and is consumed by both the core CLI (syncrona jira) and the MCP server (jira_get_issue tool).

It supports Jira Cloud and Jira Server / Data Center, auto-detecting the deployment flavour from the base URL and rendering Cloud ADF (Atlassian Document Format) descriptions/comments down to plain text.

This package is read-only — it never writes to Jira.

Deployment detection

| Base URL host | Detected deployment | REST API | Auth | | --------------------------------- | ------------------- | -------- | --------------------------------- | | *.atlassian.net, *.jira.com | cloud | /rest/api/3 (ADF bodies) | HTTP Basic: email:token (base64) | | anything else (self-hosted) | server | /rest/api/2 (text/wiki) | Bearer personal access token (PAT) |

Detection is a pure URL check (no network call). You can override it explicitly (via JIRA_DEPLOYMENT or the jira-login prompt) — the chosen value is then stored, and lookups never re-guess.

Configuration

Configuration is resolved into a JiraConfig (baseUrl, deployment, token, optional email) via resolveJiraConfig / resolveJiraConfigSync.

Environment variables

| Variable | Required | Purpose | | ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------- | | JIRA_BASE_URL | yes | Jira base URL, e.g. https://acme.atlassian.net (Cloud) or https://jira.acme.com (Server / DC). A trailing / is stripped. | | JIRA_TOKEN | yes | Cloud API token, or a Server / Data Center Personal Access Token (PAT). Whitespace is not trimmed — surrounding whitespace can be significant. | | JIRA_EMAIL | Cloud only | Atlassian account email; paired with JIRA_TOKEN as HTTP Basic for Cloud. Omit for Server / DC (PAT is sent as a Bearer token). | | JIRA_DEPLOYMENT | no | Force the deployment type: cloud or server. Any other value (or unset) falls back to auto-detection from JIRA_BASE_URL. |

An env config is only used when both JIRA_BASE_URL and JIRA_TOKEN are set; otherwise it is ignored and resolution falls through to stored credentials.

Stored credentials & profiles

syncrona jira-login saves credentials in the same encrypted global CredentialStore used for ServiceNow logins (AES-256-GCM at rest). Each login is keyed by a profile name (default: default); pass --profile <name> to jira-login, jira-logout and jira to keep several Jira sites side by side. jira-logout --all removes every stored Jira profile.

Resolution precedence

resolveJiraConfig({ profile }) picks the first usable source:

  • With an explicit --profile <name> — the named stored profile wins (a deliberate choice); only if it has no usable credentials does it fall back to the environment variables.
  • Without an explicit profile — environment variables win first (so CI / one-off runs need no stored login), then the default stored profile.

Returns null when nothing is configured.

Issue-key resolution from git branches

syncrona jira (with no key argument) derives the issue key from the current git branch via extractIssueKey. It matches the first ([A-Z][A-Z0-9]+)-(\d+) token (case-insensitively), so feature/SCRUM-123-add-widget resolves to SCRUM-123.

Programmatic use

import { resolveJiraConfig, getIssue, verifyAuth } from "@syncrona/jira";

const config = await resolveJiraConfig({ profile: "default" });
if (!config) throw new Error("No Jira configuration");

await verifyAuth(config);            // throws on bad credentials
const issue = await getIssue(config, "SCRUM-123");

Key exports: resolveJiraConfig / resolveJiraConfigSync, getIssue, verifyAuth, buildAuthHeader, detectDeployment, restApiBase, extractIssueKey, adfToText, normalizeIssue, plus the types and message helpers.

See also