rlsbl.registries.npm
npm registry adapter for rlsbl.
DEPRECATED: This module is retained for backward compatibility with code that imports bare functions (e.g. npm.read_version()) or patches module-level symbols (e.g. rlsbl.registries.npm.run). New code should use rlsbl.targets.NpmTarget instead. Scheduled for removal in the next major version.
Functions
read_version
def read_version(dir_path)
Read the version from package.json in the given directory.
write_version
def write_version(dir_path, version)
Write a new version to package.json, preserving formatting.
get_version_file
def get_version_file()
Returns the filename that holds the version for this registry.
get_template_dir
def get_template_dir()
Returns path to the npm-specific template directory.
get_shared_template_dir
def get_shared_template_dir()
Returns path to the shared template directory.
get_template_vars
def get_template_vars(dir_path)
Extract template variables from the target project's package.json.
get_template_mappings
def get_template_mappings()
Returns npm-specific template mappings (template file -> target path).
get_shared_template_mappings
def get_shared_template_mappings()
Returns shared template mappings.
check_project_exists
def check_project_exists(dir_path)
Returns True if a package.json exists in the given directory.
get_project_init_hint
def get_project_init_hint()
Hint for users who haven't initialized their project yet.