Merge pull request #30 from waterflier/main
Submission of Basic Component Code for Better Understanding of MVP Design (1/3)
This commit is contained in:
@@ -0,0 +1,377 @@
|
|||||||
|
<mxfile host="Electron" modified="2023-08-16T01:50:21.024Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.8 Chrome/114.0.5735.289 Electron/25.5.0 Safari/537.36" etag="Fe0e1JctHMBM0bOF_cEU" version="21.6.8" type="device" pages="2">
|
||||||
|
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||||
|
<mxGraphModel dx="848" dy="810" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-2" value="" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-3" target="WIyWlLk6GJQsqaUBKTNV-6" edge="1">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-3" value="download and<br>install/upgrade pkg&nbsp;" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="195" y="260" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-4" value="Yes" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-6" target="WIyWlLk6GJQsqaUBKTNV-10" edge="1">
|
||||||
|
<mxGeometry y="20" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-5" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-6" target="WIyWlLk6GJQsqaUBKTNV-7" edge="1">
|
||||||
|
<mxGeometry y="10" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-6" value="exist in pkg index_db?" style="rhombus;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=12;align=center;strokeWidth=1;spacing=6;spacingTop=-4;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="205" y="340" width="100" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-7" value="failed" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="355" y="360" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-8" value="Yes" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-10" target="WIyWlLk6GJQsqaUBKTNV-11" edge="1">
|
||||||
|
<mxGeometry x="0.3333" y="20" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-9" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-10" target="WIyWlLk6GJQsqaUBKTNV-12" edge="1">
|
||||||
|
<mxGeometry y="10" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-10" value="no depend /<br>jump depend check?" style="rhombus;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=12;align=center;strokeWidth=1;spacing=6;spacingTop=-4;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="190" y="470" width="130" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-11" value="Start Install<br>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="195" y="660" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-12" value="check dpend pkg in index_db" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||||
|
<mxGeometry x="375" y="490" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="wHlDFXOGKIaXFOMDR_Es-0" value="pkg not found?(include in parent env)<br>instll depend pkg" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="375" y="580" width="120" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="wHlDFXOGKIaXFOMDR_Es-1" value="check depend failed" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="595" y="490" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="wHlDFXOGKIaXFOMDR_Es-2" value="error occur" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-12" target="wHlDFXOGKIaXFOMDR_Es-1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="535" y="510" as="sourcePoint" />
|
||||||
|
<mxPoint x="585" y="460" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-0" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-12" target="wHlDFXOGKIaXFOMDR_Es-0">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="555" y="700" as="sourcePoint" />
|
||||||
|
<mxPoint x="605" y="650" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-1" value="install depend failed" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="600" y="595" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-2" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="wHlDFXOGKIaXFOMDR_Es-0" target="lUqpj-z38_llIR96-J4U-1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="515" y="700" as="sourcePoint" />
|
||||||
|
<mxPoint x="565" y="650" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-4" value="error occur" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="lUqpj-z38_llIR96-J4U-2">
|
||||||
|
<mxGeometry x="0.1747" y="2" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-3" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="wHlDFXOGKIaXFOMDR_Es-0" target="WIyWlLk6GJQsqaUBKTNV-11">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="425" y="730" as="sourcePoint" />
|
||||||
|
<mxPoint x="475" y="680" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="435" y="680" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-5" value="target pkg_media ==<br>source pkg_media?" style="rhombus;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=12;align=center;strokeWidth=1;spacing=6;spacingTop=-4;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="170" y="750" width="170" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-7" value="ndnclient download pkg to /pkg/$cid" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="190" y="890" width="130" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-8" value="ndnclient download pkg to /.ndncache/$cid" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="435" y="770" width="150" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-9" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-11" target="lUqpj-z38_llIR96-J4U-5">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="315" y="750" as="sourcePoint" />
|
||||||
|
<mxPoint x="365" y="700" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-10" value="verfiy downloaded pkg" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="440" y="890" width="140" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-11" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-8" target="lUqpj-z38_llIR96-J4U-10">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="555" y="880" as="sourcePoint" />
|
||||||
|
<mxPoint x="605" y="830" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-12" value="transform to target media<br>/pkg/$cid" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="437.5" y="980" width="145" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-13" value="Yes" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-5" target="lUqpj-z38_llIR96-J4U-7">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="325" y="910" as="sourcePoint" />
|
||||||
|
<mxPoint x="375" y="860" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-14" value="verfiy downloaded pkg" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="190" y="980" width="130" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-15" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-7" target="lUqpj-z38_llIR96-J4U-14">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="225" y="1090" as="sourcePoint" />
|
||||||
|
<mxPoint x="275" y="1040" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-16" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-10" target="lUqpj-z38_llIR96-J4U-12">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="605" y="980" as="sourcePoint" />
|
||||||
|
<mxPoint x="655" y="930" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-17" value="Save state pkg,<br>create version soft link<br>/pkg/$version =&gt; /pkg$cid" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="315" y="1090" width="145" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-18" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-14" target="lUqpj-z38_llIR96-J4U-17">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="210" y="1120" as="sourcePoint" />
|
||||||
|
<mxPoint x="260" y="1070" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-19" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-12" target="lUqpj-z38_llIR96-J4U-17">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="560" y="1120" as="sourcePoint" />
|
||||||
|
<mxPoint x="610" y="1070" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-20" value="pkg can load?<br>(not depend on index_db)<br>no parent env" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="147.5" y="45" width="215" height="90" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-21" value="load by cid?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="443.75" y="60" width="110" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-22" value="force install?" style="rhombus;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=12;align=center;strokeWidth=1;spacing=6;spacingTop=-4;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="640" y="55" width="100" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-23" value="upgrade pkg" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="630" y="260" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-24" value="can get cid <br>from index_db?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="436.25" y="150" width="127.5" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-26" value="For verify,download must by CID!<br>Need CID,need index-db" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="553.75" y="670" width="200" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-27" value="No" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-20" target="WIyWlLk6GJQsqaUBKTNV-3">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="190" y="210" as="sourcePoint" />
|
||||||
|
<mxPoint x="240" y="160" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-28" value="Yes" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-20" target="lUqpj-z38_llIR96-J4U-21">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="340" y="200" as="sourcePoint" />
|
||||||
|
<mxPoint x="390" y="150" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-29" value="Yes" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-21" target="lUqpj-z38_llIR96-J4U-22">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="580" y="90" as="sourcePoint" />
|
||||||
|
<mxPoint x="630" y="40" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-30" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-22" target="lUqpj-z38_llIR96-J4U-23">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="640" y="360" as="sourcePoint" />
|
||||||
|
<mxPoint x="690" y="310" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-31" value="No" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-5" target="lUqpj-z38_llIR96-J4U-8">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="370" y="790" as="sourcePoint" />
|
||||||
|
<mxPoint x="420" y="740" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-32" value="No" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-21" target="lUqpj-z38_llIR96-J4U-24">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="570" y="180" as="sourcePoint" />
|
||||||
|
<mxPoint x="620" y="130" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-33" value="download , install with backup(no remove)" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="440" y="260" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-34" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-24" target="lUqpj-z38_llIR96-J4U-33">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="590" y="330" as="sourcePoint" />
|
||||||
|
<mxPoint x="640" y="280" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-35" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="lUqpj-z38_llIR96-J4U-34">
|
||||||
|
<mxGeometry x="-0.0613" y="1" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-36" value="" style="endArrow=classic;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-33" target="WIyWlLk6GJQsqaUBKTNV-3">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="290" y="380" as="sourcePoint" />
|
||||||
|
<mxPoint x="340" y="330" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-37" value="No" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="lUqpj-z38_llIR96-J4U-24" target="WIyWlLk6GJQsqaUBKTNV-7">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="570" y="370" as="sourcePoint" />
|
||||||
|
<mxPoint x="620" y="320" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="600" y="190" />
|
||||||
|
<mxPoint x="600" y="310" />
|
||||||
|
<mxPoint x="600" y="380" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="lUqpj-z38_llIR96-J4U-38" value="if upgrade, target is /pkg/$cid.upgrade<br>after verify, remove old version,rename $cid.upgrade to $cid&nbsp;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||||
|
<mxGeometry x="600" y="957.5" width="210" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
<diagram id="TOYXUel0h6b4Yd0VOcvu" name="Page-2">
|
||||||
|
<mxGraphModel dx="848" dy="810" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0" />
|
||||||
|
<mxCell id="1" parent="0" />
|
||||||
|
<mxCell id="yIAdUxezwQbCnBzwHmIZ-1" value="parse pkg_name" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="180" y="150" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-1" target="4NanrWthPztIr26KfMBc-5">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-1" value="have content_id?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="132.5" y="230" width="215" height="90" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-2" value="load(pkg_name)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="180" y="70" width="120" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-5" target="4NanrWthPztIr26KfMBc-9">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-5" value="<span style="color: rgb(240, 240, 240); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(27, 29, 30); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">exact version?</span>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="440" y="235" width="135" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-9" target="4NanrWthPztIr26KfMBc-12">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-9" value="get version from local which match" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="662.5" y="245" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-12" value="get exact version" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="662.5" y="350" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-14" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-12" target="4NanrWthPztIr26KfMBc-16">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="720" y="510" as="sourcePoint" />
|
||||||
|
<mxPoint x="567.5" y="460" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-15" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-5" target="4NanrWthPztIr26KfMBc-16">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="480" y="420" as="sourcePoint" />
|
||||||
|
<mxPoint x="567.5" y="460" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-16" value="calc pkg full path with version (might be a soft link)&nbsp;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="427.5" y="470" width="160" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-17" value="Try Load" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="300" y="620" width="152" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-18" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-16" target="4NanrWthPztIr26KfMBc-17">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="320" y="670" as="sourcePoint" />
|
||||||
|
<mxPoint x="370" y="620" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-19" value="calc pkg full path with cid&nbsp;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="170" y="390" width="160" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-20" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.435;entryY=0.019;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-1" target="4NanrWthPztIr26KfMBc-19">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="320" y="360" as="sourcePoint" />
|
||||||
|
<mxPoint x="370" y="310" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-21" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-19" target="4NanrWthPztIr26KfMBc-17">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="250" y="540" as="sourcePoint" />
|
||||||
|
<mxPoint x="300" y="490" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-22" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-2" target="yIAdUxezwQbCnBzwHmIZ-1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="360" y="180" as="sourcePoint" />
|
||||||
|
<mxPoint x="410" y="130" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-23" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="yIAdUxezwQbCnBzwHmIZ-1" target="4NanrWthPztIr26KfMBc-1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="310" y="240" as="sourcePoint" />
|
||||||
|
<mxPoint x="360" y="190" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-32" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-24" target="4NanrWthPztIr26KfMBc-31">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-39" value="No" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4NanrWthPztIr26KfMBc-32">
|
||||||
|
<mxGeometry x="-0.0706" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-33" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-24" target="4NanrWthPztIr26KfMBc-26">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-40" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4NanrWthPztIr26KfMBc-33">
|
||||||
|
<mxGeometry x="-0.2874" y="2" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-24" value="Load Success?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="303.5" y="750" width="145" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-25" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-17" target="4NanrWthPztIr26KfMBc-24">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="430" y="740" as="sourcePoint" />
|
||||||
|
<mxPoint x="480" y="690" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-26" value="Return" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="316" y="890" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-35" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-31" target="4NanrWthPztIr26KfMBc-34">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-38" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4NanrWthPztIr26KfMBc-35">
|
||||||
|
<mxGeometry x="-0.1494" y="1" relative="1" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-37" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4NanrWthPztIr26KfMBc-31" target="4NanrWthPztIr26KfMBc-36">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-31" value="Have Parent Env?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="510" y="750" width="145" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-34" value="Return parent.load" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="522.5" y="890" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="4NanrWthPztIr26KfMBc-36" value="failed" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="710" y="760" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[authors]
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
from .agent_manager import agent_manager,agent_manager_client
|
||||||
|
from .agent import ai_agent
|
||||||
|
from .templete import ai_agent_templete
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
class ai_agent:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
from .agent import ai_agent
|
||||||
|
from .templete import ai_agent_templete
|
||||||
|
|
||||||
|
class agent_manager:
|
||||||
|
_instance = None
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def __new__(cls):
|
||||||
|
if cls._instance is None:
|
||||||
|
cls._instance = super(agent_manager, cls).__new__(cls)
|
||||||
|
return cls._instance
|
||||||
|
|
||||||
|
|
||||||
|
def initial(self,root_dir:str) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def get(self,agent_id) -> ai_agent:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def get_templete(self,templete_id) -> ai_agent_templete:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def install(self,templete_id) -> int:
|
||||||
|
|
||||||
|
installer = None
|
||||||
|
#installer.install(templete_id)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create(self,template,agent_name,agent_last_name,agent_introduce) -> ai_agent:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class agent_manager_client:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
class ai_agent_templete:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from .cid import content_id
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class content_id:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create_from_str(cid_str:str):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
from .cid import content_id
|
||||||
|
|
||||||
|
class ndn_get_task:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
class ndn_client:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_file(cid:content_id,target_path:str,urls:{}=None,options:{}=None):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
|
||||||
|
import logging
|
||||||
|
import toml
|
||||||
|
|
||||||
|
from .pkg import pkg_info,pkg_media_info
|
||||||
|
from .installer import pkg_installer
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
class pkg_env_mgr:
|
||||||
|
_instance = None
|
||||||
|
def __new__(cls):
|
||||||
|
if cls._instance is None:
|
||||||
|
cls._instance = super(pkg_env_mgr, cls).__new__(cls)
|
||||||
|
return cls._instance
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
self._pkg_envs = {}
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_env(self,cfg_path:str) -> pkg_env:
|
||||||
|
if cfg_path in self._pkg_envs:
|
||||||
|
return self._pkg_envs[cfg_path]
|
||||||
|
else:
|
||||||
|
pkg_env = pkg_env(cfg_path)
|
||||||
|
self._pkg_envs[cfg_path] = pkg_env
|
||||||
|
return pkg_env
|
||||||
|
|
||||||
|
def get_user_env(self) -> pkg_env:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_system_env(self) -> pkg_env:
|
||||||
|
pass
|
||||||
|
|
||||||
|
class pkg_env:
|
||||||
|
def __init__(self,cfg_path:str) -> None:
|
||||||
|
self.pkg_dir : str = ""
|
||||||
|
self.pkg_obj_dir : str = ""
|
||||||
|
self.is_strict : bool = True
|
||||||
|
self.parent_envs : list[pkg_env] = None
|
||||||
|
self.index_dbs = None
|
||||||
|
|
||||||
|
self.cfg_path = cfg_path
|
||||||
|
self._load_pkg_cfg(cfg_path)
|
||||||
|
pass
|
||||||
|
|
||||||
|
def load(self,pkg_name:str,search_parent=True) -> pkg_media_info:
|
||||||
|
pkg_path = None
|
||||||
|
pkg_id,verion_str,cid = pkg_info.parse_pkg_name(pkg_name)
|
||||||
|
|
||||||
|
if cid is None:
|
||||||
|
if verion_str is None:
|
||||||
|
channel = self.get_pkg_channel_from_version(verion_str)
|
||||||
|
if channel is None:
|
||||||
|
pkg_path = f"{self.pkg_dir}{pkg_id}"
|
||||||
|
else:
|
||||||
|
pkg_path = f"{self.pkg_dir}{pkg_id}#{channel}"
|
||||||
|
else:
|
||||||
|
channel = self.get_pkg_channel_from_version(verion_str)
|
||||||
|
the_version = self.get_exact_version_from_installed(verion_str)
|
||||||
|
if the_version is None:
|
||||||
|
logger.warn(f"load {pkg_name} failed: no match version from {verion_str}")
|
||||||
|
return None
|
||||||
|
if channel is None:
|
||||||
|
pkg_path = f"{self.pkg_dir}{pkg_id}#{the_version}"
|
||||||
|
else:
|
||||||
|
pkg_path = f"{self.pkg_dir}{pkg_id}#{channel}#{the_version}"
|
||||||
|
else:
|
||||||
|
pkg_path = f"{self.pkg_obj_dir}.{pkg_id}/{cid}"
|
||||||
|
|
||||||
|
media_info = self.try_load_pkg_media_info(pkg_id,pkg_path)
|
||||||
|
if media_info is None:
|
||||||
|
if search_parent:
|
||||||
|
for parent_env in self.parent_envs:
|
||||||
|
media_info = parent_env.load(pkg_id,cid,False)
|
||||||
|
if media_info is not None:
|
||||||
|
return media_info
|
||||||
|
|
||||||
|
logger.warn(f"load {pkg_id}#{cid} error,not found ,search_parent={search_parent}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get_exact_version_from_installed(self,verion_str:str) -> str:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_pkg_channel_from_version(self,pkg_version:str) -> str:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_pkg_media_info(self,pkg_name:str)->pkg_media_info:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def try_load_pkg_media_info(self,pkg_full_path:str) -> pkg_media_info:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def get_installed_pkg_info(self,pkg_name:str) -> pkg_info:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def lookup(self,pkg_id:str,version_str:str) -> pkg_info:
|
||||||
|
# to make sure pkg.cid is correct, we MUST verfiy eveything here
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_installer(self) -> pkg_installer:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def is_valied_media(pkg_full_path:str) -> bool:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_pkg_media_trans(self,pkg_info:pkg_info,source_path:str,target_path:str) -> bool:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _load_pkg_cfg(self,cfg_path:str):
|
||||||
|
if cfg_path is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
cfg = None
|
||||||
|
if len(cfg_path) < 1:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
cfg = toml.load(cfg_path)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"read pkg cfg from {cfg_path} failed! unexpected error occurred: {str(e)}")
|
||||||
|
return
|
||||||
|
|
||||||
|
if cfg:
|
||||||
|
if cfg.env:
|
||||||
|
if cfg.env.is_strict is not None:
|
||||||
|
self.is_strict = cfg.env.is_strict
|
||||||
|
|
||||||
|
if cfg.env.prefixs is not None:
|
||||||
|
self.prefixs = self._preprocess_prefixs(cfg.env.prefixs)
|
||||||
|
|
||||||
|
|
||||||
|
def _preprocess_prefixs(self,prefixs):
|
||||||
|
pass
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
# installer download pkg by cid, than install it to target dir
|
||||||
|
import logging
|
||||||
|
import asyncio
|
||||||
|
import aiohttp
|
||||||
|
import aiofiles
|
||||||
|
import os
|
||||||
|
|
||||||
|
from ndn_client import content_id,ndn_client
|
||||||
|
from .pkg import pkg_info,pkg_media_info
|
||||||
|
from .env import pkg_env
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
INSTALL_TASK_STATE_DONE = 0
|
||||||
|
INSTALL_TASK_STATE_CHECK_DEPENDENCY = 1
|
||||||
|
INSTALL_TASK_STATE_INSTALL_DEPENDENCY = 2
|
||||||
|
INSTALL_TASK_STATE_DOWNLOADING = 3
|
||||||
|
INSTALL_TASK_STATE_INSTALLING = 4
|
||||||
|
INSTALL_TAKS_STATE_ERROR = 5
|
||||||
|
|
||||||
|
class install_task:
|
||||||
|
def __init__(self,owner:pkg_env) -> None:
|
||||||
|
self.owner = owner
|
||||||
|
self.state = INSTALL_TASK_STATE_CHECK_DEPENDENCY
|
||||||
|
|
||||||
|
self.pkg_media_info = None
|
||||||
|
self.working_task = None
|
||||||
|
self.dependency_tasks = None
|
||||||
|
self.error_str = None
|
||||||
|
|
||||||
|
class pkg_installer:
|
||||||
|
def __init__(self,owner_env:pkg_env) -> None:
|
||||||
|
self.all_tasks = {}
|
||||||
|
self.owner_env = owner_env
|
||||||
|
|
||||||
|
def install(self,pkg_name:str,
|
||||||
|
install_from_dependency = False, can_upgrade = True,skip_depends = False,options = None)->Tuple[install_task,str]:
|
||||||
|
|
||||||
|
the_pkg_info : pkg_info = None
|
||||||
|
is_upgrade : bool = False
|
||||||
|
need_backup : bool = False
|
||||||
|
|
||||||
|
pkg_id,version_str,cid = pkg_info.parse_pkg_name(pkg_name)
|
||||||
|
media_info : pkg_media_info = self.owner_env.get_media_info(pkg_name) # must use index-db?
|
||||||
|
if media_info is not None:
|
||||||
|
if cid is not None:
|
||||||
|
if can_upgrade:
|
||||||
|
is_upgrade = True
|
||||||
|
else:
|
||||||
|
error_str = f"{pkg_name},{cid} already installed!"
|
||||||
|
logger.error(error_str)
|
||||||
|
return None,error_str
|
||||||
|
else:
|
||||||
|
the_pkg_info = self.owner_env.lookup(pkg_id,version_str,None)
|
||||||
|
if the_pkg_info is None:
|
||||||
|
error_str = f"{pkg_name} old version exist in local but not found in index db!"
|
||||||
|
logger.error(error_str)
|
||||||
|
return None,error_str
|
||||||
|
else:
|
||||||
|
is_upgrade = True
|
||||||
|
need_backup = True
|
||||||
|
|
||||||
|
if the_pkg_info is None:
|
||||||
|
the_pkg_info = self.owner_env.lookup(pkg_id,version_str,cid)
|
||||||
|
|
||||||
|
if the_pkg_info is None:
|
||||||
|
error_str = f"{pkg_name} ,cid:{cid} not found in index db"
|
||||||
|
logger.error(error_str)
|
||||||
|
return None,error_str
|
||||||
|
|
||||||
|
result_task = self.all_tasks.get(the_pkg_info.cid)
|
||||||
|
if result_task is not None:
|
||||||
|
return result_task,"already installing"
|
||||||
|
|
||||||
|
logger.info(f"start download&install {pkg_name},install_from_dependency={install_from_dependency},upgrade={is_upgrade},backup={need_backup},target_pkg_info={the_pkg_info}")
|
||||||
|
result_task = install_task()
|
||||||
|
self.all_tasks[the_pkg_info.cid] = result_task
|
||||||
|
async def download_and_install_pkg()->int:
|
||||||
|
# check dependency
|
||||||
|
if skip_depends is False:
|
||||||
|
result_task.dependency_tasks = {}
|
||||||
|
self.get_dependency_tasks(the_pkg_info,result_task.dependency_tasks)
|
||||||
|
result_task.state = INSTALL_TASK_STATE_INSTALL_DEPENDENCY
|
||||||
|
for depend_pkg_name in result_task.dependency_tasks:
|
||||||
|
# check pkg in local?
|
||||||
|
# install miss pkg
|
||||||
|
pass
|
||||||
|
|
||||||
|
result_task.state = INSTALL_TASK_STATE_DOWNLOADING
|
||||||
|
install_full_path = ""
|
||||||
|
target_full_path = ""
|
||||||
|
old_package_full_path = ""
|
||||||
|
is_download_directy = False
|
||||||
|
|
||||||
|
if the_pkg_info.target_media_type == the_pkg_info.source_media_type:
|
||||||
|
is_download_directy = True
|
||||||
|
if is_upgrade:
|
||||||
|
target_full_path = ""
|
||||||
|
else:
|
||||||
|
target_full_path = ""
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
|
urls = self.owner_env.get_pkg_urls(the_pkg_info)
|
||||||
|
#download
|
||||||
|
client = ndn_client() # set watch
|
||||||
|
download_result = await client.get_file(the_pkg_info.cid,urls,target_full_path,options)
|
||||||
|
if download_result !=0:
|
||||||
|
result_task.state = INSTALL_TAKS_STATE_ERROR
|
||||||
|
return result_task.state
|
||||||
|
|
||||||
|
result_task.state = INSTALL_TASK_STATE_INSTALLING
|
||||||
|
if is_download_directy is False:
|
||||||
|
install_media_result = False
|
||||||
|
install_media_result = await self.owner_env.do_pkg_media_trans(the_pkg_info,target_full_path,install_full_path)
|
||||||
|
if install_media_result is False:
|
||||||
|
result_task.state = INSTALL_TAKS_STATE_ERROR
|
||||||
|
result_task.error_str = "install media error,from {target_full_path} to {install_full_path}"
|
||||||
|
return result_task.state
|
||||||
|
|
||||||
|
# last step,save install flag : install by manual or install by dependency
|
||||||
|
## save cid dir
|
||||||
|
if is_upgrade:
|
||||||
|
os.rename(old_package_full_path, old_package_full_path + ".old" )
|
||||||
|
os.rename(target_full_path,install_full_path)
|
||||||
|
## update/create version link
|
||||||
|
|
||||||
|
## update pkg state
|
||||||
|
## remove old version
|
||||||
|
|
||||||
|
result_task.state = INSTALL_TASK_STATE_DONE
|
||||||
|
return result_task.state
|
||||||
|
|
||||||
|
|
||||||
|
result_task.working_task = asyncio.create_task(download_and_install_pkg())
|
||||||
|
return result_task,None
|
||||||
|
|
||||||
|
|
||||||
|
def uninstall(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_dependency_tasks(self,pkg:pkg_info,dependency_tasks):
|
||||||
|
pass
|
||||||
|
|
||||||
|
async def check_dependency(self,pkg:pkg_info,task_list:{}) -> bool:
|
||||||
|
for depend_pkg_name in pkg.depends:
|
||||||
|
depend_task = task_list.get(depend_pkg_name)
|
||||||
|
if depend_task is not None:
|
||||||
|
logger.debug(f"{pkg.name}'s depend pkg {depend_pkg_name} already in task list")
|
||||||
|
continue
|
||||||
|
depend_task = install_task()
|
||||||
|
task_list[depend_pkg_name] = depend_task
|
||||||
|
|
||||||
|
depend_pkg_info = self.owner_env.lookup(depend_pkg_name)
|
||||||
|
if depend_pkg_info is None:
|
||||||
|
logger.warn(f"{pkg.name}'s depend pkg {depend_pkg_name} not found in index db")
|
||||||
|
return False
|
||||||
|
|
||||||
|
if await self.check_dependency(depend_pkg_info,task_list) is False:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
class pkg_info:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
self.name = ""
|
||||||
|
self.cid = None
|
||||||
|
self.depends : list[str] = None
|
||||||
|
self.author = None
|
||||||
|
self.remote_urls = None
|
||||||
|
self.target_media_type = "dir"
|
||||||
|
self.source_media_type = "7z"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def parse_pkg_name(pkg_name:str) -> Tuple[str, str, str]:
|
||||||
|
#return pkg_id,version_str,cid
|
||||||
|
pass
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cid(self) -> str:
|
||||||
|
return self.cid
|
||||||
|
|
||||||
|
class pkg_media_info:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import sys
|
||||||
|
sys.path.append('../src/component/')
|
||||||
|
|
||||||
|
from agent_manager import agent_manager
|
||||||
|
|
||||||
|
def clean_agent():
|
||||||
|
print("clean_agent")
|
||||||
|
|
||||||
|
def clean_agent_templete():
|
||||||
|
print("clean_agent_templte")
|
||||||
|
|
||||||
|
def test_agent():
|
||||||
|
am = agent_manager()
|
||||||
|
am.initial("root_dir")
|
||||||
|
agent = am.get("english_teacher")
|
||||||
|
if agent is None:
|
||||||
|
agent_templete = am.get_templete("english_teacher")
|
||||||
|
|
||||||
|
if agent_templete is None :
|
||||||
|
op = am.install("english_teacher")
|
||||||
|
#wait install done
|
||||||
|
|
||||||
|
agent = am.create(agent_templete,"Tracy","Wang","Tracy Wang is my english teacher")
|
||||||
|
|
||||||
|
print("Agent Tracy Wang load success!");
|
||||||
|
|
||||||
|
#print(agent.get_introduce());
|
||||||
|
|
||||||
|
#chat_session = agent.get_default_chat_session("master");
|
||||||
|
#chat_session.chat("给我讲一个英文笑话!");
|
||||||
|
#chat_session.wait_response();
|
||||||
|
#print(chat_session.last_msg());
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
test_agent()
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
[authors]
|
||||||
|
"buckyos.org" = {public="aaaa",name="BuckyOS Core Dev Team"}
|
||||||
|
[authors."cyfs.com"]
|
||||||
|
public="bbbb"
|
||||||
|
name="CYFS Core Dev Team"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
is_strict = false
|
||||||
|
prefixs = ["default","../m/s","abc"]
|
||||||
|
obj2 = {k1="bb",k2=300}
|
||||||
|
[env.obj]
|
||||||
|
k1="aa"
|
||||||
|
k2=200
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
def test_main():
|
||||||
|
sm = service_manager()
|
||||||
|
|
||||||
|
knownlege_base_service = sm.get('knowlege_base')
|
||||||
|
knownlege_base_service.start()
|
||||||
|
|
||||||
|
email_spider = sm.get('email_spider')
|
||||||
|
email_spider.start()
|
||||||
|
|
||||||
|
doc_embeding_service = sm.get('doc_embeding_service')
|
||||||
|
doc_embeding_service.start()
|
||||||
|
|
||||||
|
ia = agents_manager().get("ai_info_assistor")
|
||||||
|
chat_session = ia.get_default_chat_session("master");
|
||||||
|
chat_session.chat("Who responded to my issue last week");
|
||||||
|
chat_session.wait_response();
|
||||||
|
#print(chat_session.last_msg());
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
test_main()
|
||||||
|
|
||||||
Reference in New Issue
Block a user