
    Gh0              	          S SK r S SKrS SKrS SKrS SKrS SKrS SKJr   S SKrS SKJr  S SKJr   S SKr/ SQr\R(                  " S5      r S!S\S	\\   S
\SS4S jjr\S:X  a  S SKr\R6                  " SS9r\R;                  SSSS9  \R;                  SS\SS9  \R;                  SSSS9  \R=                  5       r\" \R@                  5      S-  r!\!RE                  5       (       a5  Sr\#" \RH                  RK                  S5      5      S:  a  \S-  r\&" \5        g\" \R@                  \RN                  \RP                  S L 5        gg! \	 a    S SK
r GN0f = f! \ a    Sr\" \5      Sef = f)"    N)Optional)files)PathzNPlease install copier; you can use `pip install jupyterlab[upgrade-extension]`)z".github/workflows/binder-on-pr.ymlz.github/workflows/build.ymlz#.github/workflows/check-release.ymlz#.github/workflows/enforce-label.ymlz".github/workflows/prep-release.ymlz%.github/workflows/publish-release.ymlz..github/workflows/update-integration-tests.ymlzbinder/postBuild.eslintignore.eslintrc.jsz
.gitignorez.prettierignore.prettierrc.stylelintrcz
RELEASE.mdzbabel.config.jsconftest.pyjest.config.jspyproject.tomlsetup.pyztsconfig.jsonztsconfig.test.jsonzui-tests/README.mdz&ui-tests/jupyter_server_test_config.pyzui-tests/package.jsonzui-tests/playwright.config.jsz^jupyter_server([^\w]|$)targetvcs_refinteractivereturnc                    [        U 5      R                  5       n U S-  nU S-  nU S-  nUR                  5       (       d  SU < 3n[        U5      e[	        U5       n[
        R                  " U5      nSSS5        Sn	UR                  5       (       aE  [        R                  " UR                  5       5      n
U
R                  S0 5      R                  S5      n	U	c  UR                  5       (       aD  [        R                  " [        R                  SS/U S	9R                  S
5      R!                  5       n	OWS   n	SU	;   a  U	SS n	U	R#                  SS5      R#                  SS5      n	U S-  nUR                  5       (       a  [$        R&                  " U5        WR                  SS5      nSn[)        U[*        5      (       a%  UR                  SS5      nUR                  SU5      nOUnSnU S-  R                  5       (       a  SnO)UR                  S0 5      R                  SS5      (       a  SnU S-  R                  5       =(       d-    U S-  R                  5       =(       d    U S-  R                  5       nUUUUS   U	UR                  SS5      [-        UR                  S0 5      R                  S S5      5      [-        U S!-  R                  5       5      [-        U5      UR                  S"0 5      R                  S#S$5      S%.
nS&n[/        [0        R2                  R5                  S'5      5      S(:  a  [0        R6                  " UXUS)S*9  O[0        R8                  " UXUS)S)S+9  US-  R	                  5        n[
        R                  " U5      nSSS5        UR                  S,5      (       a&  WS,   R;                  5        H  u  nnUUS,   U'   M     OWS,   R=                  5       US,'   / nU(       a  [?        S-5      OS.nURA                  5       RC                  S/5      (       ag  URE                  S05        URG                  S10 5        US1   R;                  5        H  u  nnUUS1   U'   M     S2US1   ;   a  US1   S2	 S3US1   ;   a  US1   S3	 OURE                  S45        US   S5   US   S5'   S6S7S8S9S:.nUR;                  5        HV  u  nnUU;   d  M  UU   UU'   U U-  nUR                  5       (       d  M2  URI                  5         URE                  S;U 35        MX     [K        S5      RM                  S<5      nUR	                  5        n[
        R                  " U5      nSSS5        URG                  S=0 5        URG                  S,0 5        WS>   R;                  5        HJ  u  nnUUS=   ;   a  UR#                  S?S@5      US=   U'   UUS,   ;   d  M2  UR#                  S?S@5      US,   U'   ML     SA H:  nUU   (       a*  [+        [O        UU   R;                  5       5      5      UU'   M7  UU	 M<     URG                  SBSC5        [)        UR                  SD5      [P        5      (       a  SCUSD   ;  a  USD   RE                  SC5        SEU;   a  SCUSE   ;  a  USE   RE                  SC5        URS                  [
        RT                  " USFSG95        SHnURW                  SI5       GHo  nURY                  U5      n[[        U5      S:X  a  M&  UR]                  5       (       a  M=  U U-  n U R                  5       (       dG  U R^                  Ra                  S)S)SJ9  [$        R<                  " UU 5        U Rb                  S:X  a  S)nM  M  URe                  5       n!U Re                  5       n"U!U":X  a  M  URg                  5       [h        ;   a  S.OSKn#U(       a  [?        SLU< SMU# SN35      =(       d    U#OSKnURA                  5       RC                  S/5      (       a/  [$        R<                  " UU 5        U Rb                  S:X  a  S)nGMW  GMZ  URE                  SOU< 35        GMr     U(       Ga  U SP-  R                  5       (       Ga   SQSK5n$[l        Rn                  " 5       n%U SP-  R	                  5        n&U%Rq                  U&5        SSS5        U S-  n[        R                  " UR                  5       5      n
U%R                  SRSSSST9n'U'b%  [Q        [s        SU U'Ru                  5       5      5      n(O/ n(U
S   R                  S=/ 5      U(-   U
S   S='   U%Rw                  SV5      (       a  U%R;                  SV5       Hy  u  n)n*[Q        [s        SW U*Ru                  5       5      5      n+U)U
S   R                  SX0 5      ;   a+  U
S   R                  SX5      c  0 U
S   SX'   U
S   SX   U)   U+-   n+U+U
S   SX   U)'   M{     URS                  U$RU                  U
5      5        U SP-  RI                  5         URE                  SY5        U S[-  n,U,R                  5       (       a!  U,RI                  5         URE                  S\5        U H  n-[{        S]U-5        M     [{        S^5        g! , (       d  f       G
N= f! , (       d  f       GN= f! , (       d  f       GNG= f! , (       d  f       GN= f! [x         a    SZn[{        U5         Nf = f)_a  Update an extension to the current JupyterLab

target: str
    Path to the extension directory containing the extension
vcs_ref: str [default: None]
    Template vcs_ref to checkout
interactive: bool [default: true]
    Whether to ask before overwriting content

zpackage.jsonr   r   zNo package.json exists in Nprojectnamez--name)cwdutf8@   /_-_temp_extensionauthorz<author_name> emailfrontendzjupyter-configserver
jupyterlab	themePaththemer
   r   zui-testsdescriptionz<description>	schemaDirbinder
repositoryurlz<repository)
kindauthor_nameauthor_emaillabextension_namepython_nameproject_short_descriptionhas_settings
has_bindertestr(   z0https://github.com/jupyterlab/extension-template.80r6   T)r   datadefaults)r   r7   r8   unsafedevDependenciesz(Overwrite scripts in package.json? [n]: yYzUpdated scripts in package.jsonscriptszinstall-extpreparez-package.json scripts must be updated manually	outputDirr   r   r   r	   )eslintConfigeslintIgnoreprettier	stylelintzDELETED zstaging/package.jsondependenciesresolutions~^)r=   rD   r:   styleModulezstyle/index.jssideEffectsr      )indentF*)parentsexist_oknzoverwrite "z"? [z]: zskipped _temp_extension/z	setup.cfgr   optionsinstall_requires)fallbackc                 B    U =(       a    [         R                  U 5      S L $ N)JUPYTER_SERVER_REQUIREMENTmatchrs    oC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\jupyterlab/upgrade_extension.py<lambda>"update_extension.<locals>.<lambda>  s    a&W,F,L,LQ,OSW,W&W    zoptions.extras_requirec                     U $ rT    rW   s    rY   rZ   r[   ,  s    Qr\   zoptional-dependencieszDELETED setup.cfgz5To update pyproject.toml, you need to install tomli-wzMANIFEST.inzDELETED MANIFEST.inz**z2** Remove _temp_extensions directory when finished)>r   resolveexistsRuntimeErroropenjsonloadtomllibloads	read_textget
subprocesscheck_outputsys
executabledecodestripreplaceshutilrmtree
isinstancedictbooltuplecopier__version__splitrun_autorun_copyitemscopyinputupper
startswithappend
setdefaultunlinkr   joinpathsortedlist
write_textdumpsrglobrelative_tostris_dirparentmkdirr   
read_bytesas_posixRECOMMENDED_TO_OVERRIDEtomli_wconfigparserConfigParser	read_filefilter
splitlineshas_sectionImportErrorprint).r   r   r   package_filepyproject_file
setup_filemsgfidr7   r.   	pyproject
output_dirr   r,   r+   r*   has_testextra_contexttemplate	temp_datakeyvaluewarningschoicelintersfilelinter_fileroot_jlab_packageroot_jlab_dataoverride_pyprojectprelpathfile_targetold_datanew_datadefaultr   configsetup_cfg_filerequirements_rawrequirementsextradeps_rawdepsmanifest_inwarnings.                                                 rY   update_extensionr   ;   s8
   $ &\!!#FN*L..N*$J  *6*53 
l	syy~ 
 KMM.":":"<=	mmIr266v>''^^Z:   v,Kk!)!"o!))#s3;;CE++Jj! XXh0FL&$jj9zz'<8D!!))++	,	#	'	'R	8	8 
-	'') 	*%%--/	*Z'')  "$!&\"%)XXm_%MTXXlB7;;KLMFX-5578Xhh|R044UMJM BHV%%c*+o=*M\`ajPT]a	

 ~
%	+	+	-IIcN	 
. xx!""#$56<<>JC+0D"#C( ? #,,=">"C"C"E HBMU=>SVF||~  %%9:	2&#I.446JC#(DOC  7DO+Y.Y'Y	*GH '0&=k&JD{#
 ''!#	G ]]_	T)!#DI 4-K!!##""$(4& 12 % l+445KL				!S3 
" 	OONB'OO%r*$]399;
U$~&&(-c3(?D %$())+0==c+BD"#C(	 < >9VDIOO$567DIS		 > 	OOM#34$((=)4005ETR_M`5`]""#34$+4=@W-. DJJtA67 c"--
+w<>)88::w&!!##$$TD$AKK;'#33%)" 4 ||~H"--/H8#$--/3JJcPSG  WKtG9C@ALW 
 ||~((--A{+##'77)-& 8 ":7+ FG9 #< [ ((**)5
 &224{*002n$$^4 3 "(*:!:#MM.*B*B*DE	 $*::i9KVZ:#[ #/#'W,779$L $&L i(,,^R@<O )$^4
 %%&>??+1<<8P+Qx#F;8K8K8M$NO Ii$8$<$<=TVX$YY(3778OPXPR	) 45L M#,Y#78O#PQV#WZ^#^DOS	),-DEeL ,R ))'--	*BC+%--/ 34}, OO12 dG  

>?U 
	P 
.	-^ 
"	!L 32  Mc
sB   i,-i>9j j4 j",
i;>
j
j"
j14kk__main__zUpgrade a JupyterLab extension)r%   z
--no-input
store_truez!whether to prompt for information)actionhelppathstorezthe target path)r   typer   z	--vcs-refzthe template hash to checkout)r   r   z.copier-answers.ymlzrThis script won't do anything for copier template, instead execute in your extension directory:

    copier updater3   r4   z --trustF)NT))r   rc   rerp   ri   rk   typingr   re   r   tomliimportlib.resourcesr   pathlibr   rv   ModuleNotFoundErrorr   ra   r   compilerU   r   rt   r   __name__argparseArgumentParserparseradd_argument
parse_argsargsr   answer_filer`   ru   rw   rx   r   r   no_inputr^   r\   rY   <module>r      s     	   
  & & :  ZZ(CD  EIE@E@"3-E@=AE@	E@P z$$1QRF
\@cd
wS?PQ
*ISWXDtyy/$99K E##))#./?B:Cc
DLL$--52HI+ k	    &
ZC
s
%&s   E E 
EEE*