CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-libnpmorg

tessl install tessl/npm-libnpmorg@8.0.0

Programmatic API for managing npm organization memberships and roles

Agent Success

Agent success rate when using this tile

74%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.97x

Baseline

Agent success rate without this tile

76%

task.mdevals/scenario-9/

Registry Release Tool

A small CLI helper that releases a package version to the registry and can quickly undo the release if needed. The tool must rely on the npm CLI dependency for all registry interactions.

Capabilities

Publishes a package version

  • Given a package directory, target version, auth token, and optional registry URL, it publishes the package and returns a summary with version, tag, access level, and registry used. @test
  • When provided a custom dist-tag and access flag, those settings are applied to the published version and reflected in the returned summary. @test

Supports dry runs

  • With a dryRun option set, it simulates the publish using the registry CLI's dry-run behavior, leaves the registry unchanged, and returns the same summary fields plus a dryRun indicator. @test

Rolls back recent releases

  • In rollback mode, if the target version was published within the last 24 hours, it removes that version from the registry and returns confirmation including package name, version, and registry URL. @test
  • If rollback is requested for a version older than 24 hours, it aborts with a clear error stating the rollback window has expired. @test

Implementation

@generates

API

export async function runRelease(options);
/**
 * options.packageDir: string - path to the package root
 * options.version: string - semver being published or rolled back
 * options.tag?: string - optional dist-tag to apply when publishing (default "latest")
 * options.access?: "public" | "restricted" - access level when publishing scoped packages
 * options.registry?: string - registry URL to target
 * options.token: string - auth token used by the registry CLI
 * options.otp?: string - one-time password for two-factor flows
 * options.dryRun?: boolean - true to simulate publish without uploading artifacts
 * options.rollback?: boolean - true to remove a recently published version instead of publishing
 * options.now?: Date - injectable clock for testing rollback windows
 * Returns an object describing the action taken and the registry URL used.
 */

Dependencies { .dependencies }

npm { .dependency }

Provides the CLI to publish or remove package versions from the registry.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/libnpmorg@8.0.x
tile.json