o
    VhB                     @  sl   d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 er,d dlmZ G dd	 d	e
Zd
S )    )annotations)Path)TYPE_CHECKING)ClassVar)option)Command)Optionc                   @  s   e Zd ZU dZdZedddddedd	d
ddedddddedddddedddddeddddddedddedddedddg	Zded< dZd gZ	d!ed"< d'd%d&Z
dS )(PublishCommandpublishz+Publishes a package to a remote repository.
repositoryrz)The repository to publish the package to.F)flagusernameuz&The username to access the repository.passwordpz&The password to access the repository.certNz/Certificate authority to access the repository.client-certz,Client certificate to access the repository.dist-dirzBDist directory where built artifact are stored. Default is `dist`.dist)defaultr   buildz$Build the package before publishing.dry-runz.Perform all actions except upload the package.skip-existingz<Ignore errors from files already existing in the repository.zClassVar[list[Option]]optionsa  The publish command builds and uploads the package to a remote repository.

By default, it will upload to PyPI but if you pass the --repository option it will
upload to it instead.

The --repository option should match the name of a configured repository using
the config command.
zpoetry.publishing.publisherzClassVar[list[str]]loggersreturnintc                 C  s  ddl m} | jjs| d dS | d}|| j| jt|}| drE|jr;| 	dt
|j ds;| d	 dS | jdd
| d |j}|sQ| d dS | d | drbt| dnd }| drpt| dnd }|| d| d| d||| d| d dS )Nr   )	Publisherz9Publishing a package is not possible in non-package mode.   r   r   zThere are <info>z1</info> files ready for publishing. Build anyway?z<error>Aborted!</error>z	--output )argszU<error>No files to publish. Run poetry build first or use the --build option.</error> r   r   r   r   r   r   r   )poetry.publishing.publisherr   poetryis_package_mode
line_errorr   ior   filesconfirmlencallliner
   )selfr   dist_dir	publisherr'   r   client_cert r0   s/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/poetry/console/commands/publish.pyhandle>   sB   






zPublishCommand.handle)r   r   )__name__
__module____qualname__namedescriptionr   r   __annotations__helpr   r2   r0   r0   r0   r1   r	      sF   
 

	r	   N)
__future__r   pathlibr   typingr   r   cleo.helpersr   poetry.console.commands.commandr   cleo.io.inputs.optionr   r	   r0   r0   r0   r1   <module>   s    