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

@b64hub/sfpm-validation

v0.2.0

Published

Local metadata validation for SFPM

Readme

@b64hub/sfpm-validation

Local, best-effort validation for Salesforce package builds via the Nimbus local Apex runtime.

Not a source of truth. A real org deployment is the only authoritative signal. This package gives fast, cheap, local feedback — nothing more.


Wiring example

import {
  createNimbusValidator,
  createNimbusGraphProvider,
  withNimbusDaemon,
  buildOwnershipIndex,
  findPackageBoundaryViolations,
  type NimbusAdapterConfig,
  type ValidationContext,
} from '@b64hub/sfpm-validation';

// 1. Implement Logger and ValidationEventBus structurally (no hard dep on pino)
const logger = pinoLogger.child({ component: 'validation' });
const eventBus = myOrchestratorEventBus; // must have .emit(event, payload)

// 2. Config — ship with daemon off and autoInstall off
const config: NimbusAdapterConfig = {
  pinnedVersion: '1.2.3',           // pin to the version validated against fixtures
  supportedVersionRange: '^1.2.0',
  autoInstall: false,
  daemon: { enabled: false, autoStart: false, autoStop: true },
};

const deps = { logger, eventBus, config };

// 3. Compile / test a single package
const validator = createNimbusValidator(deps);

const ctx: ValidationContext = {
  packageId: 'my-package',
  packagePath: '/project/force-app/my-package',
  projectRoot: '/project',
  timeoutMs: 60_000,
};

const availability = await validator.checkAvailability(ctx);
if (availability.available && availability.compatible !== false) {
  const result = await validator.run('compile', ctx);
  console.log(result.status, result.diagnostics);
}

// 4. Boundary-check a set of packages (optional, requires nimbus graph)
const graphProvider = createNimbusGraphProvider(deps);
const ownershipIndex = buildOwnershipIndex(allPackageManifests);

const violations = await withNimbusDaemon(deps, '/project', () =>
  findPackageBoundaryViolations(myPkg, ownershipIndex, graphProvider, {
    projectRoot: '/project',
    packageId: myPkg.packageId,
  }),
);

Default config

const defaultNimbusConfig: NimbusAdapterConfig = {
  pinnedVersion: '<pin to the version validated against fixtures>',
  supportedVersionRange: '^<same major.minor>',
  autoInstall: false,
  daemon: {
    enabled: false,   // opt-in per-environment; requires Nimbus Pro license
    autoStart: false,
    autoStop: true,
  },
};

Ship with daemon.enabled: false and autoInstall: false. Both are safe to flip per-team once daemon subcommands are confirmed with the Nimbus maintainer and Pro licenses are verified (see Open Questions in the implementation plan).


Open questions (block Phase 6/7 ship)

  1. Do nimbus daemon start / nimbus daemon status --json exist as named? Only daemon stop is confirmed.
  2. Does a non-zero daemon start exit distinguish "no Pro license" from other failures?
  3. Does nimbus graph support whole-package mode, or only per-class?
  4. What does a failing nimbus test --json test case look like exactly?
  5. Does nimbus validate/nimbus test accept the glob pattern style shown (*, class name)?