§
    >xÅj¢
  ã                   ó  — d dl Z d dlmZ d dlmZ d dlmZ erd dlmZ  e j	        d¦  «        Z
 G d„ de¦  «        Zd	ed
edz  fd„Zdddœdedz  dedz  d
edz  fd„Zddddœdddedz  dedz  ded
ef
d„ZdZd	eded
dfd„ZdS )é    N)ÚPath)ÚTYPE_CHECKING)Ú	BaseModel)ÚFastAPIRichToolkitÚfastapi_clic                   ó$   — e Zd ZU eed<   eed<   dS )Ú	AppConfigÚapp_idÚteam_idN)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__© ó    úMC:\Projects\Historical\venv\Lib\site-packages\fastapi_cloud_cli/utils/apps.pyr	   r	      s"   € € € € € € Ø€K€K�KØ€L€L�L€L€Lr   r	   Úpath_to_deployÚreturnc                 ó2  — | dz  }t                                d|¦  «         |                     ¦   «         st                                d¦  «         d S t                                d¦  «         t                               |                     d¬¦  «        ¦  «        S )Nú.fastapicloud/cloud.jsonzLooking for app config at: %szApp config file doesn't existzApp config loaded successfullyúutf-8©Úencoding)ÚloggerÚdebugÚexistsr	   Úmodel_validate_jsonÚ	read_text)r   Úconfig_paths     r   Úget_app_configr!      s†   € Ø Ð#=Ñ=€KÝ
‡L‚LÐ0°+Ñ>Ô>Ð>à×ÒÑÔð Ý�ŠÐ4Ñ5Ô5Ð5Øˆtå
‡L‚LÐ1Ñ2Ô2Ð2Ý×(Ò(¨×)>Ò)>ÈÐ)>Ñ)PÔ)PÑQÔQÐQr   ©r
   Úpathr
   r#   c                 ód   — | �| S t          |pt          j        ¦   «         ¦  «        }|€d S |j        S )N)r!   r   Úcwdr
   )r
   r#   Ú
app_configs      r   Úresolve_app_idr'      s;   € ð ÐØˆå Ð 2­¬©
¬
Ñ3Ô3€JØÐØˆtàÔÐr   z>Pass --app-id or run `fastapi cloud apps create --link` first.)r
   r#   ÚhintÚtoolkitr   r(   c                ó\   — t          ||¬¦  «        }|€|                      dd|¬¦  «         |S )Nr"   Úmissing_required_inputzApp ID is required.)r(   )r'   Úfail)r)   r
   r#   r(   Útarget_app_ids        r   Úresolve_app_id_or_failr.   +   sH   € õ #¨&°tÐ<Ñ<Ô<€MàÐØ�ŠØ$Ø!Øð 	ñ 	
ô 	
ð 	
ð Ðr   u&  
> Why do I have a folder named ".fastapicloud" in my project? ðŸ¤”
The ".fastapicloud" folder is created when you link a directory to a FastAPI Cloud project.

> What does the "cloud.json" file contain?
The "cloud.json" file contains:
- The ID of the FastAPI app that you linked ("app_id")
- The ID of the team your FastAPI Cloud project is owned by ("team_id")

> Should I commit the ".fastapicloud" folder?
No, you should not commit the ".fastapicloud" folder to your version control system.
That's why there's a ".gitignore" file in this folder.
r&   c                 ó°  — | dz  }| dz  }| dz  }t                                d|¦  «         t                                d|¦  «         |j                             dd¬¦  «         |                     |                     ¦   «         d¬	¦  «         |                     t          d¬	¦  «         |                     d
¦  «         t                                d¦  «         d S )Nr   z.fastapicloud/README.mdz.fastapicloud/.gitignorezWriting app config to: %szApp config data: %sT)ÚparentsÚexist_okr   r   Ú*z%App config files written successfully)r   r   ÚparentÚmkdirÚ
write_textÚmodel_dump_jsonÚREADME)r   r&   r    Úreadme_pathÚgitignore_paths        r   Úwrite_app_configr:   M   sà   € Ø Ð#=Ñ=€KØ Ð#<Ñ<€KØ#Ð&@Ñ@€Nå
‡L‚LÐ,¨kÑ:Ô:Ð:Ý
‡L‚LÐ&¨
Ñ3Ô3Ð3àÔ×Ò T°DÐÑ9Ô9Ð9à×ÒØ×"Ò"Ñ$Ô$Øð ñ ô ð ð ×Ò�6¨GÐÑ4Ô4Ð4Ø×Ò˜cÑ"Ô"Ð"å
‡L‚LÐ8Ñ9Ô9Ð9Ð9Ð9r   )ÚloggingÚpathlibr   Útypingr   Úpydanticr   Úfastapi_cloud_cli.utils.clir   Ú	getLoggerr   r	   r!   r   r'   r.   r7   r:   r   r   r   ú<module>rA      s«  ðØ €€€Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð àð ?Ø>Ð>Ð>Ð>Ð>Ð>à	ˆÔ	˜=Ñ	)Ô	)€ðð ð ð ð �	ñ ô ð ð
	R 4ð 	R¨I¸Ñ,<ð 	Rð 	Rð 	Rð 	Rð !°dð
ð 
ð 
Ø�T‰zð
Ø(,¨t©ð
àˆ4�Zð
ð 
ð 
ð 
ð  ØØPðð ð Ø!ðð �$‰Jðð �‰+ð	ð
 ðð 	ðð ð ð ð&
€ð: Tð :°yð :ÀTð :ð :ð :ð :ð :ð :r   