File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/npm.cpython-310.pyc
o
�N�gi, � @ sR d Z ddlZddlmZmZ dd� Z ddd�Zdd d
�Zddd
�Zddd�Z dS )a�
Installation of NPM Packages
============================
These states manage the installed packages for node.js using the Node Package
Manager (npm). Note that npm must be installed for these states to be
available, so npm states should include a requisite to a pkg.installed state
for the package which provides npm (simply ``npm`` in most cases). Example:
.. code-block:: yaml
npm:
pkg.installed
yaml:
npm.installed:
- require:
- pkg: npm
� N)�CommandExecutionError�CommandNotFoundErrorc C s dt v rddfS ddfS )z>
Only load if the npm module is available in __salt__
�npm.listZnpmFz 'npm' binary not found on system)�__salt__� r r �C/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/npm.py�__virtual__ s
��r Fc
s� | ddi d�}|r|n| g}zt d |||dd�} W n$ ttfy> }
zd|d<