Skip to content

relizy / getNpmRegistry

Function: getNpmRegistry()

getNpmRegistry(cwd?): string

Defined in: src/core/npm.ts:26

Resolve the effective npm registry from the environment (.npmrc files, env variables, npm/pnpm defaults) via npm config get registry. Falls back to the public registry when npm is unavailable or returns nothing.

Used when the user did not set publish.registry, so Relizy honors a custom registry (e.g. a corporate proxy) configured in the user's .npmrc instead of forcing the public registry.

Parameters

cwd?

string = ...

Returns

string

Released under the MIT License.