xbp 0.3.5

XBP is a build pack and deployment management tool to deploy, rust, nextjs etc and manage the NGINX configs below it
Documentation
�

54�h���>�SSKrSSKrSSKrSSKrSSKrSSKJr Srg)�N)�parse_nextjs_logsc	���# �[R"5 [R"S5n[R"S5n[R"S5n[	X4U/5(d[S5eSU3n[R"USS9 [RRX`S35n[S	U35 [R"X4US
9IShv�Nn[SU35 URU5IShv�Nn	[R"USS
S9IShv�Nn
U	RShv�Nn[!X�S9IShv�NnU(a[S5 U	R#5  O9UR%5n[U5 U
R'US-5IShv�N MwU	R(Shv�Nn[!X�S9IShv�NnU(a[S5 U	R#5  O9UR%5n[U5 U
R'US-5IShv�N MwSSS5IShv�N [SU35 SSS5IShv�N gGN�GN\GN@GN.GN N�
N�N�N�NL
NJN>!,IShv�N(df   NS=fN<!,IShv�N(df   g=f![*a>n
[S[-U
5R/S
SS9R1S
535 Sn
A
gSn
A
ff=f7f)N�XLX_SSH_HOST�XLX_SSH_USER�XLX_SSH_PASSz0Missing SSH credentials in environment variablesz./logs/deployment_T)�exist_okz.txtzOutput file path: )�username�passwordzExecuting command: �wzutf-8)�encoding)�deployment_dataz*Deployment completed. Terminating process.�
zOutput saved to: z,SSH connection or command execution failed: �replace)�errors)�dotenv�load_dotenv�os�getenv�all�
ValueError�makedirs�path�join�print�asyncssh�connect�create_process�aiofiles�open�stdoutr�	terminate�strip�write�stderr�	Exception�str�encode�decode)�
deployment_id�command�
deployment�hostr	r
�log_dir�output_file_path�conn�process�file�line�result�es              �1c:\Users\floris\Documents\GitHub\xbp\ssh_shell.py�execute_ssh_commandr6
s����
����
�9�9�^�$�D��y�y��(�H��y�y��(�H����)�*�*��K�L�L�#�=�/�2�G��K�K��$�'��w�w�|�|�G��d�-C�D��	��/�0�
1�2�,
��#�#�D�-5�7�7�:>��'��y�1�2� �/�/��8�8�G� �}�}�%5�s�.5�7�7�:>�")�.�.�2�$�#4��$:�:�F���J�K��)�)�+���:�:�<�D��$�K��*�*�T�D�[�1�1�1�")�.�.�2�$�#4��$:�:�F���J�K��)�)�+���:�:�<�D��$�K��*�*�T�D�[�1�1�1�77�7�:
�%�&6�%7�8�9�K7�7�7�
9�7�2�:�2�#1�2�:�2�#1�!7�7�7�7��7�7�7�7��N�
�
�:�3�q�6�=�=��Yb�=�;c�;j�;j�kr�;s�:t�u�	
�	
��
�sp�B?K9�J.�I�J.�#J�I�J�!I!�"J�%
I8�2I,�6I$
�7I,�:
I8�I'
�AI8�"I*
�#I8�5I4�9I.
�:I4�=
I8�
I0
�AI8�%I2
�&I8�,J�7I6�8J�
J.�J�J.�K9�J.�J�!J�$I,�'I8�*I8�,I8�.I4�0I8�2I8�4I8�6J�8J	�>J�?J	�J�J.�J+�J�J+�'J.�*K9�+J.�.
K6�84K1�,K9�1K6�6K9)rr�asynciorr�log_parser.nextjsrr6��r5�<module>r;s��	�
����/�>
r: