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-8/

NPM Registry Auth Setup

Configure npm CLI defaults for registries and authentication tokens so installs use the right endpoints with persistent credentials.

Capabilities

Configure default registry

  • When provided a registry URL and an always-auth flag, it writes user-level npm config entries so installs use that registry and always-auth behavior. @test
  • If a config file path is given, it updates that file instead of the global default. @test

Configure scoped registry

  • When given a scope and scoped registry URL, it links that scope to the registry and leaves the default registry untouched. @test

Persist authentication

  • When provided an auth token, it stores it under the registry host entry expected by npm so subsequent authenticated commands succeed. @test

Verify identity (optional)

  • When login verification is requested and credentials are valid, it returns the authenticated username after configuration is applied. @test

Implementation

@generates

API

/**
 * Configures npm registry settings and authentication.
 * @param {object} options - Registry and auth preferences.
 * @param {string} options.registryUrl - Default registry URL to apply.
 * @param {boolean} [options.alwaysAuth=false] - Whether installs should always send credentials.
 * @param {string} [options.scope] - Optional package scope to map to a scoped registry.
 * @param {string} [options.scopedRegistryUrl] - Registry URL to use for the provided scope.
 * @param {string} [options.authToken] - Auth token to store for the relevant registry host.
 * @param {string} [options.configPath] - Optional override path for the npm config file to write.
 * @param {boolean} [options.verifyLogin=false] - Whether to check the authenticated username after writing config.
 * @returns {Promise<{ configPath: string, username?: string }>} Details about where config was written and, if requested, who is authenticated.
 */
export async function configureNpm(options);

Dependencies { .dependencies }

npm { .dependency }

Command-line client for the Node package registry; use it to write configuration and authenticate with registries. @satisfied-by

Version

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