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

@party-stack/salesforce-client

v0.1.1

Published

Authenticated Salesforce client for Party Stack adapters, backed by [`@jsforce/jsforce-node`](https://github.com/jsforce/jsforce).

Readme

salesforce-client

Authenticated Salesforce client for Party Stack adapters, backed by @jsforce/jsforce-node.

Describe/query return jsforce types (DescribeSObjectResult, QueryResult, Field, …). Flow invocable action helpers use hand-typed REST shapes because jsforce has no first-class Actions API.

import { createSalesforceClient } from "@party-stack/salesforce-client";
import type { DescribeSObjectResult, QueryResult } from "@party-stack/salesforce-client";

const client = createSalesforceClient({
    instanceUrl: process.env.SALESFORCE_INSTANCE_URL!,
    apiVersion: "61.0",
    tokenProvider: async () => process.env.SALESFORCE_ACCESS_TOKEN!,
});

const accounts: QueryResult = await client.query("SELECT Id, Name FROM Account LIMIT 10");
const accountDescribe: DescribeSObjectResult = await client.describeSObject("Account");

The client does not own OAuth flows. Callers supply a tokenProvider and an explicit API version.

Optional fetch replaces jsforce's default undici transport (useful in tests).

Real-org smoke test

Create a local External Client App in Salesforce Setup with:

  • OAuth enabled
  • Callback URL: http://localhost:1717/oauth/callback
  • Scopes: API access, refresh token/offline access, and OpenID
  • PKCE required
  • Consumer secret optional (this command is a public client)

Then copy the example environment file and fill in the External Client App consumer key and your org's My Domain URL:

cp packages/salesforce-client/.env.example packages/salesforce-client/.env
pnpm --filter @party-stack/salesforce-client smoke

The command opens Salesforce login in a browser and proves:

  1. Authorization Code + PKCE login and secure session restoration work.
  2. Global and Task describe calls succeed.
  3. A real SOQL query against Task succeeds.
  4. The Flow Actions endpoint is reachable, when the user has access.

The local .env and OAuth tokens are not committed. Tokens are persisted through the Node runtime's secret store.

Local demo dashboard

After the smoke test succeeds, launch the dashboard:

pnpm --filter @party-stack/salesforce-client demo

The command delegates to apps/salesforce-task-manager, opens the generated ontology through a Salesforce backend installation, and serves http://localhost:4173. Dashboard reads use the runtime Task and User collections; create, edit, delete, and drag operations use generated ontology actions. Access tokens remain in the local process.

For changes made outside the dashboard to appear automatically, enable Task in Salesforce Setup → Change Data Capture, then restart the demo. The local server subscribes to /data/TaskChangeEvent through jsforce and forwards notifications to the browser with Server-Sent Events. If CDC is unavailable, the dashboard remains usable with manual refresh.