Module: services/pipenv-helpers

Common functions and utilities for tasks related to pipenv

Source:

Members

(inner, constant) isDependency :Joi

Joi schema for validating dependency.

Type:
  • Joi
Source:

(inner, constant) isLockfile :Joi

Joi schema for validating lock file object. Checks if the lock file object has required properties and the properties are valid.

Type:
  • Joi
Source:

Methods

(inner) getDependencyVersion(attrs) → {object}

Determines the dependency version based on the dependency type.

Parameters:
Name Type Description
attrs object

Refer to individual attributes

Properties
Name Type Description
kind string

Wanted dependency type ('dev' or 'default'), defaults to 'default'

wantedDependency string

Name of the wanted dependency

lockfileData object

Object containing lock file data

Source:
Throws:
    • Error if unknown dependency type provided
    Type
    Error
    • Error if wanted dependency is not present in lock file data
    Type
    InvalidParameter
    • Error if version or ref is not present for the wanted dependency
    Type
    InvalidParameter
Returns:

Object containing wanted dependency version or ref

Type
object