Skip to content

Instantly share code, notes, and snippets.

@axemclion
Last active February 17, 2017 07:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axemclion/2ff3a6888c8387b991ea to your computer and use it in GitHub Desktop.
Save axemclion/2ff3a6888c8387b991ea to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export Drawing1.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="11in" height="8.5in" viewBox="0 0 792 612"
xml:space="preserve" color-interpolation-filters="sRGB" class="st17">
<v:documentProperties v:langID="1033" v:viewMarkup="false">
<v:userDefs>
<v:ud v:nameU="msvNoAutoConnect" v:prompt="" v:val="VT0(1):26"/>
</v:userDefs>
</v:documentProperties>
<style type="text/css">
<![CDATA[
.st1 {fill:#5b9bd5;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st2 {fill:#ffffff;font-family:Calibri;font-size:1.16666em}
.st3 {stroke:#5592c9;stroke-dasharray:3.5,2.5;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st4 {fill:#ffffff;font-family:Calibri;font-size:1.00001em;font-weight:bold}
.st5 {marker-end:url(#mrkr4-75);stroke:#6ca43d;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st6 {fill:#6ca43d;fill-opacity:1;stroke:#6ca43d;stroke-opacity:1;stroke-width:0.13368983957219}
.st7 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2}
.st8 {fill:#53802e;font-family:Calibri;font-size:0.75em}
.st9 {font-size:1em}
.st10 {fill:#53802e;font-family:Calibri;font-size:0.666664em}
.st11 {fill:#ffffff;stroke:none;stroke-linecap:butt}
.st12 {marker-end:url(#mrkr3-114);stroke:#6ca43d;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st13 {fill:none}
.st14 {stroke:#4271c6;stroke-dasharray:3.5,2.5;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st15 {fill:#4271c5;font-family:Calibri;font-size:0.666664em}
.st16 {marker-end:url(#mrkr3-114);stroke:#6ca43d;stroke-dasharray:3.5,2.5;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5}
.st17 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
]]>
</style>
<defs id="Markers">
<g id="lend4">
<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"/>
</g>
<marker id="mrkr4-75" class="st6" v:arrowType="4" v:arrowSize="3" v:setback="14.96" refX="-14.96" orient="auto"
markerUnits="strokeWidth" overflow="visible">
<use xlink:href="#lend4" transform="scale(-7.48,-7.48) "/>
</marker>
<g id="lend3">
<path d="M 2 1 L 0 0 L 2 -1 " style="stroke-linecap:round;stroke-linejoin:round;fill:none"/>
</g>
<marker id="mrkr3-114" class="st6" v:arrowType="3" v:arrowSize="3" orient="auto" markerUnits="strokeWidth"
overflow="visible">
<use xlink:href="#lend3" transform="scale(-7.48,-7.48) "/>
</marker>
</defs>
<g v:mID="0" v:index="1" v:groupContext="foregroundPage">
<v:userDefs>
<v:ud v:nameU="msvThemeOrder" v:val="VT0(0):26"/>
</v:userDefs>
<title>Page-1</title>
<v:pageProperties v:drawingScale="1" v:pageScale="1" v:drawingUnits="0" v:shadowOffsetX="9" v:shadowOffsetY="-9"/>
<v:layer v:name="Connector" v:index="0"/>
<g id="group6-1" transform="translate(337.733,-523.8)" v:mID="6" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
<v:ud v:nameU="ShowActor" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline</title>
<desc>Packager</desc>
<g id="shape7-2" v:mID="7" v:groupContext="shape" transform="translate(24.8666,0)">
<title>Sheet.7</title>
<desc>Packager</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="31.2668" cy="599.4" width="62.54" height="25.2"/>
<rect x="0" y="586.8" width="62.5337" height="25.2" class="st1"/>
<text x="5.58" y="603.6" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager</text> </g>
<g id="shape8-5" v:mID="8" v:groupContext="shape" transform="translate(47.1334,-28.8)">
<title>Sheet.8</title>
<path d="M9 612 a0 0 0 1 1 0 0 a0 0 0 1 1 0 0 Z" class="st1"/>
</g>
<g id="shape9-7" v:mID="9" v:groupContext="shape" transform="translate(37.4223,523.8)">
<title>Sheet.9</title>
</g>
<g id="shape10-9" v:mID="10" v:groupContext="shape" transform="translate(668.133,612) rotate(90)">
<title>Sheet.10</title>
<path d="M0 612 L505.8 612" class="st3"/>
</g>
<g id="shape6-12" v:mID="6" v:groupContext="groupContent">
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="599.4" width="112.27" height="25.2"/>
<rect x="0" y="586.8" width="112.267" height="25.2" class="st1"/>
<text x="33.63" y="603" class="st4" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager</text> </g>
</g>
<g id="group16-15" transform="translate(490.733,-523.8)" v:mID="16" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
<v:ud v:nameU="ShowActor" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline.16</title>
<desc>Chrome - UI Thread</desc>
<g id="shape17-16" v:mID="17" v:groupContext="shape" transform="translate(24.8666,0)">
<title>Sheet.17</title>
<desc>Packager</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="31.2668" cy="599.4" width="62.54" height="25.2"/>
<rect x="0" y="586.8" width="62.5337" height="25.2" class="st1"/>
<text x="5.58" y="603.6" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager</text> </g>
<g id="shape18-19" v:mID="18" v:groupContext="shape" transform="translate(47.1334,-28.8)">
<title>Sheet.18</title>
<path d="M9 612 a0 0 0 1 1 0 0 a0 0 0 1 1 0 0 Z" class="st1"/>
</g>
<g id="shape19-21" v:mID="19" v:groupContext="shape" transform="translate(37.4223,523.8)">
<title>Sheet.19</title>
</g>
<g id="shape20-23" v:mID="20" v:groupContext="shape" transform="translate(668.133,612) rotate(90)">
<title>Sheet.20</title>
<path d="M0 612 L505.8 612" class="st3"/>
</g>
<g id="shape16-26" v:mID="16" v:groupContext="groupContent">
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="599.4" width="112.27" height="25.2"/>
<rect x="0" y="586.8" width="112.267" height="25.2" class="st1"/>
<text x="7.53" y="603" class="st4" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Chrome - UI Thread</text> </g>
</g>
<g id="group21-29" transform="translate(643.733,-523.8)" v:mID="21" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
<v:ud v:nameU="ShowActor" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline.21</title>
<desc>Chrome Worker</desc>
<g id="shape22-30" v:mID="22" v:groupContext="shape" transform="translate(24.8666,0)">
<title>Sheet.22</title>
<desc>Packager</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="31.2668" cy="599.4" width="62.54" height="25.2"/>
<rect x="0" y="586.8" width="62.5337" height="25.2" class="st1"/>
<text x="5.58" y="603.6" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager</text> </g>
<g id="shape23-33" v:mID="23" v:groupContext="shape" transform="translate(47.1334,-28.8)">
<title>Sheet.23</title>
<path d="M9 612 a0 0 0 1 1 0 0 a0 0 0 1 1 0 0 Z" class="st1"/>
</g>
<g id="shape24-35" v:mID="24" v:groupContext="shape" transform="translate(37.4223,523.8)">
<title>Sheet.24</title>
</g>
<g id="shape25-37" v:mID="25" v:groupContext="shape" transform="translate(668.133,612) rotate(90)">
<title>Sheet.25</title>
<path d="M0 612 L505.8 612" class="st3"/>
</g>
<g id="shape21-40" v:mID="21" v:groupContext="groupContent">
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="599.4" width="112.27" height="25.2"/>
<rect x="0" y="586.8" width="112.267" height="25.2" class="st1"/>
<text x="16.29" y="603" class="st4" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Chrome Worker</text> </g>
</g>
<g id="group26-43" transform="translate(184.733,-523.8)" v:mID="26" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
<v:ud v:nameU="ShowActor" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline.26</title>
<desc>App on device</desc>
<g id="shape27-44" v:mID="27" v:groupContext="shape" transform="translate(24.8666,0)">
<title>Sheet.27</title>
<desc>Packager</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="31.2668" cy="599.4" width="62.54" height="25.2"/>
<rect x="0" y="586.8" width="62.5337" height="25.2" class="st1"/>
<text x="5.58" y="603.6" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager</text> </g>
<g id="shape28-47" v:mID="28" v:groupContext="shape" transform="translate(47.1334,-28.8)">
<title>Sheet.28</title>
<path d="M9 612 a0 0 0 1 1 0 0 a0 0 0 1 1 0 0 Z" class="st1"/>
</g>
<g id="shape29-49" v:mID="29" v:groupContext="shape" transform="translate(37.4223,523.8)">
<title>Sheet.29</title>
</g>
<g id="shape30-51" v:mID="30" v:groupContext="shape" transform="translate(668.133,612) rotate(90)">
<title>Sheet.30</title>
<path d="M0 612 L505.8 612" class="st3"/>
</g>
<g id="shape26-54" v:mID="26" v:groupContext="groupContent">
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="599.4" width="112.27" height="25.2"/>
<rect x="0" y="586.8" width="112.267" height="25.2" class="st1"/>
<text x="20.82" y="603" class="st4" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>App on device</text> </g>
</g>
<g id="group31-57" transform="translate(90,-523.8)" v:mID="31" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
<v:ud v:nameU="ShowActor" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Actor lifeline</title>
<desc>User</desc>
<g id="shape32-58" v:mID="32" v:groupContext="shape">
<title>Sheet.32</title>
<rect x="0" y="586.8" width="54" height="25.2" class="st1"/>
</g>
<g id="shape33-60" v:mID="33" v:groupContext="shape" transform="translate(18,-28.8)">
<title>Sheet.33</title>
<path d="M3.6 612 L3.6 594 L3.6 601.2 L0 601.2 L0 586.8 L1.8 585 L16.2 585 L18 586.8 L18 601.2 L14.4 601.2 L14.4
594 L14.4 612 L9 612 L9 597.6 L9 612 L3.6 612 ZM12.6 579.6 A3.6 3.6 -180 1 0 5.4 579.6 A3.6 3.6 -180
1 0 12.6 579.6 Z" class="st1"/>
</g>
<g id="shape34-62" v:mID="34" v:groupContext="shape" transform="translate(18,523.8)">
<title>Sheet.34</title>
</g>
<g id="shape35-64" v:mID="35" v:groupContext="shape" transform="translate(639,612) rotate(90)">
<title>Sheet.35</title>
<path d="M0 612 L505.8 612" class="st3"/>
</g>
<g id="shape31-67" v:mID="31" v:groupContext="groupContent">
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="27" cy="599.4" width="54" height="25.2"/>
<rect x="0" y="586.8" width="54" height="25.2" class="st1"/>
<text x="15.54" y="603" class="st4" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>User</text> </g>
</g>
<g id="shape38-70" v:mID="38" v:groupContext="shape" v:layerMember="0" transform="translate(117,-505.8)">
<title>Message</title>
<desc>Shakes Phone Selects &#34;Debug in Chrome&#34;</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="63" cy="639" width="108.44" height="29.6036"/>
<path d="M0 612 L116.46 628.92" class="st5"/>
<rect v:rectContext="textBkgnd" x="13.801" y="628.2" width="98.3979" height="21.5997" class="st7"/>
<text x="37.69" y="636.3" class="st8" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Shakes Phone<v:newlineChar/><tspan
x="13.8" dy="1.2em" class="st9">Selects </tspan>&#34;Debug in Chrome&#34;</text> </g>
<g id="shape39-79" v:mID="39" v:groupContext="shape" v:layerMember="0" transform="translate(231.867,-487.8)">
<title>Self Message</title>
<desc>Enable &#34;Proxy&#34; Mode</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="38.1334" cy="621" width="79.28" height="17.6036"/>
<path d="M9 612 L27 612 L27 630 L16.48 630" class="st5"/>
<rect v:rectContext="textBkgnd" x="3.40341" y="616.2" width="69.4602" height="9.59985" class="st7"/>
<text x="3.4" y="623.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Enable &#34;Proxy&#34; Mode</text> </g>
<g id="shape40-86" v:mID="40" v:groupContext="shape" v:layerMember="0" transform="translate(240.867,-451.8)">
<title>Message.40</title>
<desc>&#39;/launch-chrome-devtools</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="65.1334" cy="630" width="94.07" height="17.6036"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="23.0052" y="625.2" width="84.2566" height="9.59985" class="st7"/>
<text x="23.01" y="632.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>&#39;/launch-chrome-devtools</text> </g>
<g id="shape41-93" v:mID="41" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-433.8)">
<title>Message.41</title>
<desc>Open Chrome /debugger-ui</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="74.1334" cy="603" width="55.16" height="27.2035"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="51.4638" y="593.4" width="45.3395" height="19.1997" class="st11"/>
<text x="51.46" y="600.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Open Chrome<v:newlineChar/><tspan
x="52.9" dy="1.2em" class="st9">/</tspan>debugger-ui</text> </g>
<g id="shape43-101" v:mID="43" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-397.8)">
<title>Message.43</title>
<desc>Create websocket connection to packager</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-87.8666" cy="612" width="106.2" height="27.2035"/>
<path d="M0 612 L-145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-136.057" y="602.4" width="96.3814" height="19.1997" class="st7"/>
<text x="-136.06" y="609.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Create websocket connection<v:newlineChar/><tspan
x="-106.93" dy="1.2em" class="st9">to packager</tspan></text> </g>
<g id="shape44-109" v:mID="44" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-361.8)">
<title>Asynchronous Message</title>
<desc>Web socket connection opened</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(1):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="110.133" cy="612" width="72.72" height="27.2035"/>
<path d="M0 612 L153 630" class="st12"/>
<rect v:rectContext="textBkgnd" x="78.6809" y="602.4" width="62.9052" height="19.1997" class="st7"/>
<text x="91.07" y="609.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Web socket <v:newlineChar/><tspan
x="78.68" dy="1.2em" class="st9">connection opened</tspan></text> </g>
<g id="shape45-118" v:mID="45" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-343.8)">
<title>Message.45</title>
<desc>prepareJSRuntime</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="76.5" cy="621" width="69.46" height="17.6036"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="46.6802" y="616.2" width="59.6398" height="9.59985" class="st11"/>
<text x="46.68" y="623.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>prepareJSRuntime</text> </g>
<g id="shape46-125" v:mID="46" v:groupContext="shape" v:layerMember="0" transform="translate(537.867,-325.8)">
<title>Self Message.46</title>
<desc>Set SessionID, and reload page</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="621" width="62.31" height="27.2035"/>
<path d="M9 612 L27 612 L27 630 L16.48 630" class="st5"/>
<rect v:rectContext="textBkgnd" x="29.8857" y="611.4" width="52.4957" height="19.1997" class="st7"/>
<text x="33.51" y="618.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Set SessionID, <v:newlineChar/><tspan
x="29.89" dy="1.2em" class="st9">and reload page</tspan></text> </g>
<g id="shape47-133" v:mID="47" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-289.8)">
<title>Asynchronous Message.47</title>
<desc>ws.opened</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(1):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="110.133" cy="621" width="45.47" height="17.6036"/>
<path d="M0 612 L153 630" class="st12"/>
<rect v:rectContext="textBkgnd" x="92.3056" y="616.2" width="35.6559" height="9.59985" class="st7"/>
<text x="92.31" y="623.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>ws.opened</text> </g>
<g id="shape48-140" v:mID="48" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-271.8)">
<title>Asynchronous Message.48</title>
<desc>Connection Established</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(1):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-42.8666" cy="630" width="47.01" height="27.2035"/>
<path d="M0 612 L-153 630" class="st12"/>
<rect v:rectContext="textBkgnd" x="-61.4619" y="620.4" width="37.1909" height="19.1997" class="st11"/>
<text x="-61.46" y="627.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Connection<v:newlineChar/><tspan
x="-61.34" dy="1.2em" class="st9">Established</tspan></text> </g>
<g id="shape51-148" v:mID="51" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-235.8)">
<title>Message.51</title>
<desc>executeApplicationScript(filename)</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="47.1334" cy="630" width="124.26" height="17.6036"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-10.0899" y="625.2" width="114.447" height="9.59985" class="st7"/>
<text x="-10.09" y="632.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>executeApplicationScript(filename)</text> </g>
<g id="shape54-155" v:mID="54" v:groupContext="shape" v:layerMember="0" transform="translate(690.867,-199.8)">
<title>Self Message.54</title>
<desc>Load required JS files in worker</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="56.1334" cy="603" width="57.04" height="36.8035"/>
<path d="M9 612 L27 612 L27 630 L16.48 630" class="st5"/>
<rect v:rectContext="textBkgnd" x="33.4285" y="588.6" width="45.4098" height="28.7996" class="st7"/>
<text x="33.43" y="595.8" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Load required <v:newlineChar/><tspan
x="45.5" dy="1.2em" class="st9">JS files<v:newlineChar/></tspan><tspan x="40.64" dy="1.2em" class="st9">in worker</tspan></text> </g>
<g id="shape55-164" v:mID="55" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-307.8)">
<title>Message.55</title>
<desc>Open WS://</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-105.867" cy="612" width="48.42" height="17.6036"/>
<path d="M0 612 L-145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-125.169" y="607.2" width="38.6054" height="9.59985" class="st11"/>
<text x="-125.17" y="614.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Open WS://</text> </g>
<g id="shape56-171" v:mID="56" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-217.8)">
<title>Message.56</title>
<desc>executeApplicationScript(filename)</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="47.1334" cy="630" width="124.26" height="17.6036"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-10.0899" y="625.2" width="114.447" height="9.59985" class="st11"/>
<text x="-10.09" y="632.4" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>executeApplicationScript(filename)</text> </g>
<g id="shape58-178" v:mID="58" v:groupContext="shape" transform="translate(18,-99)">
<title>Interaction operand</title>
<desc>Done initializing debug session</desc>
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="54.7003" cy="553.602" width="109.41" height="27.2035"/>
<path d="M0 612 L756 612 L756 540 L0 540 L0 612 Z" class="st13"/>
<path d="M756 540 L0 540" class="st14"/>
<text x="4" y="551.2" class="st15" v:langID="1033"><v:paragraph/><v:tabList/>Done initializing debug session<v:newlineChar/></text> </g>
<g id="shape59-182" v:mID="59" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-258.3)">
<title>Return Message</title>
<desc>Sort of like reload app, so reload sources</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-186.867" cy="625.5" width="83.46" height="27.2035"/>
<path d="M0 616.5 L-150.87 625.5" class="st16"/>
<rect v:rectContext="textBkgnd" x="-223.687" y="615.9" width="73.6403" height="19.1997" class="st7"/>
<text x="-223.69" y="623.1" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Sort of like reload app,<v:newlineChar/><tspan
x="-216.1" dy="1.2em" class="st9"> </tspan>so reload sources</text> </g>
<g id="shape60-190" v:mID="60" v:groupContext="shape" v:layerMember="0" transform="translate(243,-249.3)">
<title>Return Message.60</title>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<path d="M0 616.5 L150.87 625.5" class="st16"/>
</g>
<g id="shape61-195" v:mID="61" v:groupContext="shape" v:layerMember="0" transform="translate(117,-163.8)">
<title>Message.61</title>
<desc>User action or event</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="61.9333" cy="621" width="46.81" height="27.2035"/>
<path d="M0 612 L116.46 628.92" class="st5"/>
<rect v:rectContext="textBkgnd" x="43.4375" y="611.4" width="36.9918" height="19.1997" class="st7"/>
<text x="43.44" y="618.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>User action<v:newlineChar/><tspan
x="48.3" dy="1.2em" class="st9">or event</tspan></text> </g>
<g id="shape62-203" v:mID="62" v:groupContext="shape" v:layerMember="0" transform="translate(240.867,-145.8)">
<title>Message.62</title>
<desc>Execute JS Call Sent to Packager since app is in proxy mode</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="76.5" cy="621" width="76.93" height="46.4035"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="43.8479" y="601.8" width="65.3041" height="38.3997" class="st7"/>
<text x="52.89" y="609" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Execute JS Call<v:newlineChar/><tspan
x="49.3" dy="1.2em" class="st9">Sent to Packager <v:newlineChar/></tspan><tspan x="43.85" dy="1.2em"
class="st9">since app is in proxy <v:newlineChar/></tspan><tspan x="67.1" dy="1.2em" class="st9">mode</tspan></text> </g>
<g id="shape63-213" v:mID="63" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-127.8)">
<title>Message.63</title>
<desc>method sent over to Chrome</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="76.5" cy="621" width="69.51" height="27.2035"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="47.5569" y="611.4" width="57.8861" height="19.1997" class="st7"/>
<text x="47.56" y="618.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>method sent over <v:newlineChar/><tspan
x="59.22" dy="1.2em" class="st9">to Chrome</tspan></text> </g>
<g id="shape64-221" v:mID="64" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-109.8)">
<title>Message.64</title>
<desc>sent to worker since UI thread has no hander</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="76.5" cy="621" width="88.68" height="27.2035"/>
<path d="M0 612 L145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="37.0666" y="611.4" width="78.867" height="19.1997" class="st7"/>
<text x="43.51" y="618.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>sent to worker since <v:newlineChar/><tspan
x="37.07" dy="1.2em" class="st9">UI thread has no hander</tspan></text> </g>
<g id="shape65-229" v:mID="65" v:groupContext="shape" v:layerMember="0" transform="translate(690.867,-91.8)">
<title>Self Message.65</title>
<desc>__fbBatchedBridge [object.method].apply</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(1):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="47.1334" cy="594" width="82.51" height="27.2035"/>
<path d="M9 612 L27 612 L27 630 L16.48 630" class="st5"/>
<rect v:rectContext="textBkgnd" x="10.7862" y="584.4" width="72.6946" height="19.1997" class="st7"/>
<text x="16.05" y="591.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>__fbBatchedBridge<v:newlineChar/><tspan
x="10.79" dy="1.2em" class="st9">[</tspan>object.method].apply</text> </g>
<g id="shape67-237" v:mID="67" v:groupContext="shape" v:layerMember="0" transform="translate(699.867,-73.8)">
<title>Message.67</title>
<desc>Result sent to main thread</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-65.3666" cy="639" width="56.3" height="27.2035"/>
<path d="M0 612 L-145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-87.7061" y="629.4" width="44.6789" height="19.1997" class="st7"/>
<text x="-87.71" y="636.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Result sent to <v:newlineChar/><tspan
x="-85.25" dy="1.2em" class="st9">main thread</tspan></text> </g>
<g id="shape68-245" v:mID="68" v:groupContext="shape" v:layerMember="0" transform="translate(546.867,-55.8)">
<title>Message.68</title>
<desc>Result sent to packager</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-78.8666" cy="603" width="56.3" height="27.2035"/>
<path d="M0 612 L-145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-101.206" y="593.4" width="44.6789" height="19.1997" class="st11"/>
<text x="-101.21" y="600.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Result sent to <v:newlineChar/><tspan
x="-93.58" dy="1.2em" class="st9">packager</tspan></text> </g>
<g id="shape69-253" v:mID="69" v:groupContext="shape" v:layerMember="0" transform="translate(393.867,-37.8)">
<title>Message.69</title>
<desc>Packager proxies resultto app</desc>
<v:userDefs>
<v:ud v:nameU="IsReturn" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="IsAsync" v:prompt="" v:val="VT0(0):26"/>
<v:ud v:nameU="IsSelfMessage" v:prompt="" v:val="VT0(0):5"/>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
</v:userDefs>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="-87.8666" cy="603" width="66.41" height="27.2035"/>
<path d="M0 612 L-145.57 629.13" class="st5"/>
<rect v:rectContext="textBkgnd" x="-115.257" y="593.4" width="54.7809" height="19.1997" class="st7"/>
<text x="-115.26" y="600.6" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Packager proxies <v:newlineChar/><tspan
x="-107.65" dy="1.2em" class="st9">resultto app</tspan></text> </g>
</g>
</svg>
/* Run npm install request@2.74.0 websocket@1.0.23 flatten-source-map@0.0.2*/
// To toggle debugger in Android
// adb shell am broadcast -a "com.rnapp.RELOAD_APP_ACTION" --ez jsproxy true
var PACKAGER = 'localhost:8081';
var vm = require('vm');
var url = require('url');
var path = require('path');
var fs = require('fs');
var request = require('request'); // request@2.74.0
var WebSocket = require('websocket').w3cwebsocket; //websocket@1.0.23
var flattenSourceMap = require('flatten-source-map'); //flatten-source-map@0.0.2
function importScripts(scriptUrlStr, cb) {
var scriptUrl = url.parse(scriptUrlStr);
console.log('Fetching script from ', scriptUrl.href);
request(scriptUrl.href, function (error, response, scriptBody) {
if (!error && response.statusCode == 200) {
var sourceMapUrl = sourceMapUtil.getSourceMapURL(scriptUrl, scriptBody);
console.log('Fetching SourceMaps from ', sourceMapUrl.href);
request(sourceMapUrl.href, function (err, resp, sourceMapBody) {
scriptBody = sourceMapUtil.updateScriptPaths(scriptBody, sourceMapUrl);
sourceMapBody = sourceMapUtil.updateSourceMapFile(sourceMapBody, scriptUrl);
fs.writeFileSync(path.join(__dirname, scriptUrl.pathname), scriptBody);
fs.writeFileSync(path.join(__dirname, sourceMapUrl.pathname), sourceMapBody);
try {
vm.runInThisContext(scriptBody, {
filename: path.join(__dirname, scriptUrl.pathname.substr(1))
});
}
catch (e) { console.log(e); }
finally {
cb();
}
});
}
});
}
(function start() {
console.log('trying to start debugger');
var ws = new WebSocket('ws://' + PACKAGER + '/debugger-proxy?role=debugger&name=Custom');
ws.onclose = function () { setTimeout(start, 10000) };
ws.onopen = function () { console.log('Connection established'); };
ws.onmessage = function (e) {
var message = JSON.parse(e.data);
if (message.$event === 'client-disconnected' || message.method === '$disconnected') {
console.log('Client disconnected, quitting');
process.exit(0);
}
// Quitting if App goes in background
if (message.arguments && message.arguments.length === 3 && message.arguments[2].length === 2 && typeof message.arguments[2][1] === 'object' && message.arguments[2][1].app_state === "background") {
console.log('Client went to background, quitting');
process.exit(0);
}
if (!message.method) {
return;
}
//console.log('Executing', message.method);
var sendReply = function (result) {
ws.send(JSON.stringify({ replyID: message.id, result: result }));
};
switch (message.method) {
case 'prepareJSRuntime':
sendReply();
break;
case 'executeApplicationScript':
for (var key in message.inject) {
global[key] = JSON.parse(message.inject[key]);
}
message.url = message.url.replace('localhost:8081', PACKAGER);
importScripts(message.url, function () { sendReply() });
break;
default:
var returnValue = [[], [], [], 0];
try {
if (typeof __fbBatchedBridge === 'object' && typeof __fbBatchedBridge[message.method] === 'function') {
returnValue = __fbBatchedBridge[message.method].apply(null, message.arguments);
}
} finally {
sendReply(JSON.stringify(returnValue));
}
}
}
}());
// Needed to make sourcemaps work with VSCode
var sourceMapUtil = {
SourceMapURLRegex: /\/\/(#|@) sourceMappingURL=(.+?)\s*$/m,
getSourceMapURL: function (scriptUrl, scriptBody) {
var sourceMappingRelativeUrl = scriptBody.match(this.SourceMapURLRegex); // sourceMappingRelativeUrl = "/index.ios.map?platform=ios&dev=true"
if (sourceMappingRelativeUrl) {
var sourceMappingUrl = url.parse(sourceMappingRelativeUrl[2]);
sourceMappingUrl.protocol = scriptUrl.protocol;
sourceMappingUrl.host = scriptUrl.host;
return url.parse(url.format(sourceMappingUrl)); // parse() repopulates all the properties of the URL
}
return null;
},
updateScriptPaths: function (scriptBody, sourceMapUrl) {
return scriptBody
.replace(/GLOBAL/g, '__XX__')
.replace(this.SourceMapURLRegex, "//# sourceMappingURL=" + sourceMapUrl.pathname.substr(1));
},
updateSourceMapFile: function (sourceMapBody, scriptUrl) {
var sourcesRootPath = __dirname;
var sourceMap = JSON.parse(sourceMapBody);
if (sourceMap.sections) {
sourceMap.sections = sourceMap.sections.filter(function (value, index, array) {
return value.map != null;
});
sourceMap = flattenSourceMap(sourceMap);
}
if (sourceMap.sources) {
sourceMap.sources = sourceMap.sources.map(function (sourcePath) {
return path.posix.join.apply(null, path.relative(sourcesRootPath, sourcePath).split(path.sep));
});
}
delete sourceMap.sourcesContent;
sourceMap.sourceRoot = "";
sourceMap.file = scriptUrl.pathname.substr(1);
return JSON.stringify(sourceMap);
}
}
process.on('exit', function () {
if (typeof emitTTDLog === 'function') {
emitTTDLog(path.join(__dirname, 'logs'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment