Skip to content

Commit

Permalink
Deno http js naming refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite committed Jul 24, 2024
1 parent dde4dcd commit 4b439f8
Show file tree
Hide file tree
Showing 7 changed files with 333 additions and 386 deletions.
38 changes: 23 additions & 15 deletions Deno/Library/Components/DenoHTTP.gcomp/Complete Request.gvi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<SourceFile Checksum="33A724B860771CCF751D455A6738629EB259E866289ECAE035A4F7BFFE209554E9353231C0D16643505DB3BC54F9BC26F4E3D7AEBAE7C32B9F2C4D924AD80578" Timestamp="1D95E17FD061926" xmlns="http://www.ni.com/PlatformFramework">
<SourceFile Checksum="A94BBA59C3E584D35E4386210042EDE0522DE90D7208C1B09F2C6645485E1B827A0008E6D5CFF7B69BFA33C628A12F0F522E93C6F21C50945395E1BFF19C909E" Timestamp="1DADD7B3376A52C" xmlns="http://www.ni.com/PlatformFramework">
<SourceModelFeatureSet>
<ParsableNamespace AssemblyFileVersion="9.5.0.49854" FeatureSetName="LabVIEW Controls" Name="http://www.ni.com/Controls.LabVIEW.Design" OldestCompatibleVersion="8.1.0.49152" Version="8.1.0.49152" />
<ParsableNamespace AssemblyFileVersion="9.5.0.49854" FeatureSetName="LabVIEW Virtual Instrument" Name="http://www.ni.com/LabVIEW.VI" OldestCompatibleVersion="8.1.0.49152" Version="8.1.0.49152" />
Expand Down Expand Up @@ -64,7 +64,7 @@
<BlockDiagram Id="44f4113858ce49c285f4977516530683">
<CloseReference Bounds="330 350 40 40" Id="744b2590b725474aac807050d66fae1c" />
<Wire Id="b7cd81fba6bc48c9a4539d1d2ae17eea" Joints="N(38e7337a4d95413c81105108f68bbf3d:R3)|(315,385) N(744b2590b725474aac807050d66fae1c:error in)|(330,385)" xmlns="http://www.ni.com/PlatformFramework" />
<MethodCall Bounds="275 350 40 40" Id="38e7337a4d95413c81105108f68bbf3d" ResolveFailedHint="CompleteRequest" Signature="@f2e457618dc04cc8a354223369205c75" Target="DenoHTTP::Support::DenoHTTP.jsli::CompleteRequest" xmlns="http://www.ni.com/MocCommon">
<MethodCall Bounds="275 350 40 40" Id="38e7337a4d95413c81105108f68bbf3d" ResolveFailedHint="HTTPWriteResponse" Signature="@0b87c11a21d64763bd7d71b2fd3f2bdb" Target="DenoHTTP::Support::DenoHTTP.jsli::HTTPWriteResponse" xmlns="http://www.ni.com/MocCommon">
<p.MethodDeclaration>
<MethodDeclaration xmlns="http://www.ni.com/PlatformFramework">
<Parameter Id="L0" Desc="requestHandler" />
Expand Down Expand Up @@ -149,8 +149,8 @@
</AttributeValues>
</Attributed>
</p.TypeReference>
<p.TypeReference TypeId="f2e457618dc04cc8a354223369205c75">
<Attributed AttributedType="@81df1be390c34a14a1c3fd15bbb3c732">
<p.TypeReference TypeId="0b87c11a21d64763bd7d71b2fd3f2bdb">
<Attributed AttributedType="@b721338773f8427eb9a4c8e36d675e12">
<AttributeValues>
<AttributeValue Name="NationalInstruments.Compiler.ParameterCallIndex" Value="[ParameterCallIndexFields]0|1|2|0" />
<AttributeValue Name="NI.ConnectorPaneHeight" Value="[int]40" />
Expand All @@ -161,25 +161,25 @@
<p.TypeReference TypeId="e954979a712f445f984cd718323f5e1e">
<Composite Id="1" Name="NI.JavaScriptReference" ReferenceClass="" GenericTypeDefinition="Void" BaseType="Void" />
</p.TypeReference>
<p.TypeReference TypeId="81df1be390c34a14a1c3fd15bbb3c732">
<Function Id="1" IsStatic="True" IsConstructor="False" Name="CompleteRequest" ReturnType="Void" GenericTypeDefinition="Void">
<p.TypeReference TypeId="b721338773f8427eb9a4c8e36d675e12">
<Function Id="1" IsStatic="True" IsConstructor="False" Name="HTTPWriteResponse" ReturnType="Void" GenericTypeDefinition="Void">
<Parameters>
<Attributed AttributedType="@ad895689e4e34439af7434b947dd50f0">
<AttributeValues>
<AttributeValue Name="NI.UserDefinedName" Value="[string]requestHandler" />
</AttributeValues>
</Attributed>
<Attributed AttributedType="@ea5d9770489d4b5da5519b9b3eac84a3">
<Attributed AttributedType="@069cf77559a645a087566635e390a7da">
<AttributeValues>
<AttributeValue Name="NI.UserDefinedName" Value="[string]body" />
</AttributeValues>
</Attributed>
<Attributed AttributedType="@c8673e7cf8e94cd2ae35a07aa3155074">
<Attributed AttributedType="@c9d9e4dab77e47f58c733cc1b24a4831">
<AttributeValues>
<AttributeValue Name="NI.UserDefinedName" Value="[string]error in" />
</AttributeValues>
</Attributed>
<Attributed AttributedType="@c27a50a076a8430d805ee0d675e7a358">
<Attributed AttributedType="@6daf20b6ab874d938a177bcdc44f6d9c">
<AttributeValues>
<AttributeValue Name="NI.UserDefinedName" Value="[string]error out" />
</AttributeValues>
Expand All @@ -190,30 +190,38 @@
<p.TypeReference TypeId="ad895689e4e34439af7434b947dd50f0">
<Parameter InputParameterPassingRule="Required" OutputParameterPassingRule="NotAllowed" Name="L0" DataType="@f0339782ce4245348acaaf0c922501e8" />
</p.TypeReference>
<p.TypeReference TypeId="ea5d9770489d4b5da5519b9b3eac84a3">
<p.TypeReference TypeId="069cf77559a645a087566635e390a7da">
<Parameter InputParameterPassingRule="Recommended" OutputParameterPassingRule="NotAllowed" Name="L1" DataType="String" />
</p.TypeReference>
<p.TypeReference TypeId="c8673e7cf8e94cd2ae35a07aa3155074">
<p.TypeReference TypeId="c9d9e4dab77e47f58c733cc1b24a4831">
<Parameter InputParameterPassingRule="Recommended" OutputParameterPassingRule="NotAllowed" Name="L3" DataType="Error" />
</p.TypeReference>
<p.TypeReference TypeId="c27a50a076a8430d805ee0d675e7a358">
<p.TypeReference TypeId="6daf20b6ab874d938a177bcdc44f6d9c">
<Parameter InputParameterPassingRule="NotAllowed" OutputParameterPassingRule="Recommended" Name="R3" DataType="Error" />
</p.TypeReference>
</DataTypeReferenceTable>
<IconTable xmlns="http://www.ni.com/PlatformFramework">
<p.IconModel Target="DenoHTTP::Support::DenoHTTP.jsli::CompleteRequest">
<p.IconModel Target="DenoHTTP::Support::DenoHTTP.jsli::HTTPWriteResponse">
<MergeScript>
<MergeItem Path="." IsPrimary="True">
<Icon ListViewIconCrop="0 0 40 40">
<IconPanel Height="[float]40" Left="[float]0" PanelSizeMode="Resize" Top="[float]0" Width="[float]40">
<IconTemplate ClipMargin="[SMThickness]3,3,3,3" Height="[float]40" Left="[float]0" TemplateName="[string]Gray" Top="[float]0" Width="[float]40">
<Rectangle Fill="[SMSolidColorBrush]#ff727272" IsHitTestVisible="[bool]False" Left="[float]0" RadiusX="[float]4" RadiusY="[float]4" Top="[float]0" />
<Rectangle Fill="[SMSolidColorBrush]#ffe5e5e5" IsHitTestVisible="[bool]False" Left="[float]0" Margin="[SMThickness]1,1,1,1" RadiusX="[float]2.5" RadiusY="[float]2.5" Stroke="[SMSolidColorBrush]#fff2f2f2" Top="[float]0" />
<FileNameText Attached="[bool]True" Left="[float]0" Margin="[SMThickness]2,2,2,2" SizeMode="[TextModelSizeMode]AutoFont" Text="[string]CompleteRequest" TextAlignment="[TextAlignment]Center" TextWrapping="[TextWrapping]Wrap" Top="[float]0" VerticalScrollBarVisibility="[ScrollBarVisibility]Hidden">
<FileNameText Attached="[bool]True" Left="[float]0" Margin="[SMThickness]2,2,2,2" SizeMode="[TextModelSizeMode]AutoFont" Text="[string]HTTPWriteResponse" TextAlignment="[TextAlignment]Center" TextWrapping="[TextWrapping]Wrap" Top="[float]0" VerticalScrollBarVisibility="[ScrollBarVisibility]Hidden">
<FontSetting FontFamily="Segoe UI" FontSize="6" />
</FileNameText>
</IconTemplate>
<IconTemplate Height="[float]40" IsHitTestVisible="[bool]False" Left="[float]0" TemplateName="[string][Comp]DenoHTTP.gcomp" Top="[float]0" Width="[float]40" />
<IconTemplate ClipMargin="[SMThickness]3,3,3,3" Height="[float]40" HorizontalAlignment="[HorizontalAlignment]Stretch" IsHitTestVisible="[bool]False" Left="[float]0" TemplateName="[string][Comp]DenoHTTP.gcomp" Top="[float]0" VerticalAlignment="[VerticalAlignment]Stretch" Width="[float]40">
<Path Data="[PathGeometry]M 0,11 L 0,2 C 0,0.899999976 0.899999976,0 2,0 L 2,11 L 0,11 Z" Fill="[SMSolidColorBrush]#ff000000" Height="[float]11" HorizontalAlignment="[HorizontalAlignment]Left" IsHitTestVisible="[bool]False" Left="[float]0" Margin="[SMThickness]2,2,2,2" MinHeight="[float]1" MinWidth="[float]1" Top="[float]0" VerticalAlignment="[VerticalAlignment]Top" Width="[float]2" />
<Rectangle Fill="[SMSolidColorBrush]#ff000000" Height="[float]11" IsHitTestVisible="[bool]False" Left="[float]0" Margin="[SMThickness]4,2,4,2" MinHeight="[float]1" MinWidth="[float]1" Top="[float]0" VerticalAlignment="[VerticalAlignment]Top" Width="[float]NaN" />
<Path Data="[PathGeometry]M 2,11 L 2,2 C 2,0.899999976 1.10000002,0 0,0 L 0,11 L 2,11 Z" Fill="[SMSolidColorBrush]#ff000000" Height="[float]11" HorizontalAlignment="[HorizontalAlignment]Right" IsHitTestVisible="[bool]False" Left="[float]0" Margin="[SMThickness]2,2,2,2" MinHeight="[float]1" MinWidth="[float]1" Top="[float]0" VerticalAlignment="[VerticalAlignment]Top" Width="[float]2" />
<Text Foreground="[SMColor]#ffffffff" Height="[float]11" HorizontalAlignment="[HorizontalAlignment]Left" Left="[float]6" SizeMode="[TextModelSizeMode]Fixed" Text="[string]HTTP" TextAlignment="[TextAlignment]Left" TextWrapping="[TextWrapping]Wrap" Top="[float]2" VerticalAlignment="[VerticalAlignment]Top" VerticalScrollBarVisibility="[ScrollBarVisibility]Hidden" Width="[float]30">
<FontSetting FontFamily="Segoe UI" FontSize="6" FontStyle="Bold" />
</Text>
<Image BaseName="[string]Image" Height="[float]25" HorizontalAlignment="[HorizontalAlignment]Left" IsHitTestVisible="[bool]False" Left="[float]19" Source="[EmbeddedDrawingImage]&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#xA;&lt;svg&#xA; width=&quot;16&quot;&#xA; height=&quot;16&quot;&#xA; viewBox=&quot;0 0 16 16&quot;&#xA; version=&quot;1.1&quot;&#xA; id=&quot;svg4&quot;&#xA; xmlns=&quot;http://www.w3.org/2000/svg&quot;&#xA; xmlns:svg=&quot;http://www.w3.org/2000/svg&quot;&#xA; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&#xA; xmlns:cc=&quot;http://creativecommons.org/ns#&quot;&#xA; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;&#xA; &lt;defs&#xA; id=&quot;defs4&quot; /&gt;&#xA; &lt;title&#xA; id=&quot;title1&quot;&gt;Deno logo&lt;/title&gt;&#xA; &lt;metadata&#xA; id=&quot;metadata4&quot;&gt;&#xA; &lt;rdf:RDF&gt;&#xA; &lt;cc:Work&#xA; rdf:about=&quot;&quot;&gt;&#xA; &lt;dc:title&gt;Deno logo&lt;/dc:title&gt;&#xA; &lt;/cc:Work&gt;&#xA; &lt;/rdf:RDF&gt;&#xA; &lt;/metadata&gt;&#xA; &lt;rect&#xA; style=&quot;fill:#ffffff;opacity:0.01&quot;&#xA; id=&quot;rect4&quot;&#xA; width=&quot;16.009045&quot;&#xA; height=&quot;15.462394&quot;&#xA; x=&quot;-0.15618579&quot;&#xA; y=&quot;0.15618579&quot; /&gt;&#xA; &lt;g&#xA; id=&quot;g4&quot;&#xA; transform=&quot;matrix(0.00111453,0,0,0.00111453,5.3035248,5.2751833)&quot;&gt;&#xA; &lt;path&#xA; d=&quot;M 2361.2079,-39.758412 C 4034.8622,-103.8076 5374.0146,1739.3775 4795.9126,3311.3251 c -456.2732,1611.5321 -2623.0673,2315.5662 -3939.43495,1280 -1391.66196,-931.9324 -1391.66196,-3210.2346 0,-4142.16702 C 1289.7932,132.86885 1824.7381,-40.945263 2361.2079,-39.758412 Z&quot;&#xA; id=&quot;path1&quot; /&gt;&#xA; &lt;path&#xA; fill=&quot;#ffffff&quot;&#xA; d=&quot;m 2460,1449 c -541.1743,-8.0103 -1148.4375,282.0632 -1297.625,839.4121 -116.5297,385.8117 120.2743,803.1341 487.0981,946.4345 299.6568,137.0653 636.2703,162.5598 961.5269,146.1534 -50.8745,82.8687 32.6164,166.9391 39,254 94.3976,397.0863 153.6668,801.5892 214,1205 536.3266,-69.3759 1042.9676,-337.7223 1404,-740 C 4106.6591,3508.3622 3956.8185,2913.3177 3786.5239,2324.2852 3603.8854,1766.2474 3031.3488,1431.0892 2460,1449 Z m -654,2669 c -175.1239,-25.6253 -167.0778,183.4843 -209.4723,297.7542 C 1576.4256,4550.8707 1425.034,4749.3706 1756,4715 c 51.8855,-26.4364 112.1425,-298.7657 80.7939,-230.7773 15.7211,-113.813 113.3565,-246.4266 13.2061,-344.8946 z m 697,-305 c -175.7968,-26.3757 -168.1704,183.127 -210.5916,297.722 C 2254.877,4251.8506 2215.2251,4392.6982 2179,4534 c 37.2398,293.0595 297.9179,74.6607 287.2733,-105.7776 38.5511,-166.3767 101.609,-331.0574 126.017,-498.4482 C 2580.5131,3880.2526 2583.1202,3820.3625 2503,3813 Z M 1318,3164 c -65.2647,216.8475 -118.725,437.7585 -180,656 32.4967,297.9459 298.1215,77.5585 287.1778,-104.8033 C 1461.4519,3580.4644 1497.7259,3445.7322 1534,3311 c -77.2504,-40.5966 -150.2009,-89.6144 -216,-147 z M 913,2439 C 737.25276,2413.8314 744.66526,2621.9436 702.40835,2736.722 664.87698,2877.8506 625.22511,3018.6982 589,3160 c 32.50065,297.947 298.07472,77.5459 287.27332,-104.7776 38.80379,-171.9123 106.98605,-339.3139 126.86728,-514.1286 C 996.36441,2493.3859 959.84528,2451.2841 913,2439 Z m 3811,-143 c -175.0372,-24.4072 -167.2761,183.291 -209.5916,297.722 -38.1975,141.0742 -75.9165,282.2925 -114.4084,423.278 28.5778,304.8181 297.5008,80.027 287.5214,-104.7104 39.039,-172.0788 107.7981,-339.5818 127.6036,-514.6177 C 4808.1858,2349.7801 4770.9571,2308.0685 4724,2296 Z M 542,1455 367.78266,1861.0268 275,2293 C 449.56914,2432.4274 516.10428,2190.2621 539.04609,2061.2409 577.15026,1894.0267 642.40753,1730.9561 663.125,1561.0938 655.31407,1502.528 601.09608,1454.4723 542,1455 Z m 3752,4 c -175.7126,-24.9159 -166.9076,183.0808 -209.5916,297.722 -38.1975,141.0742 -75.9165,282.2925 -114.4084,423.278 32.5006,297.947 298.0747,77.5459 287.2733,-104.7776 39.2426,-171.8807 106.0946,-339.5891 127.7111,-514.1286 C 4377.8297,1513.2504 4340.9257,1471.3875 4294,1459 Z&quot;&#xA; id=&quot;path2&quot; /&gt;&#xA; &lt;path&#xA; d=&quot;m 2620,1870 c 300.2043,5.6346 103.1236,481.4293 -113.1371,273.1371 C 2403.9865,2052.0914 2482.8764,1861.6344 2620,1870 Z&quot;&#xA; id=&quot;path3&quot; /&gt;&#xA; &lt;path&#xA; fill=&quot;#ffffff&quot;&#xA; d=&quot;M 1282,860 C 1106.9628,835.59276 1114.7239,1043.291 1072.4084,1157.722 1034.2109,1298.7962 996.49189,1440.0145 958,1581 c 32.50065,297.947 298.0747,77.5459 287.2733,-104.7776 39.3409,-172.0262 106.0549,-339.7928 127.8517,-514.55052 C 1366.1858,913.78006 1328.9571,872.06847 1282,860 Z M 3467,979 C 3291.1894,953.81432 3298.721,1161.9586 3256.5987,1276.7733 3234.8851,1420.0657 3081.2601,1616.2638 3410,1619 c 45.525,-69.7448 100.3479,-321.9237 79.113,-242.6115 16.6204,-123.9578 123.378,-266.0835 21.3089,-375.4823 z M 2355,269 2117,303 c -54.3615,72.73014 -112.4367,366.94473 -80.9874,240.72529 C 2004.282,661.13222 1973.0275,778.68243 1941,896 c 37.2398,293.0595 297.9179,74.66075 287.2733,-105.77759 38.747,-171.15289 105.7609,-338.70502 128.3378,-511.9475 z m 1564,435 c -105.6511,155.5474 93.2738,421.3693 212,176 l -197,-165 -11.678,-8.56386 z M 2930,290 c -19.442,125.4419 -137.1173,294.68189 28.7629,372.46353 C 3145.2826,676.16457 3125.8159,464.59146 3174,343 l -226,-50 -14.2845,-2.38075 z&quot;&#xA; id=&quot;path4&quot; /&gt;&#xA; &lt;/g&gt;&#xA;&lt;/svg&gt;&#xA;" Stretch="[SMStretch]Uniform" Top="[float]-6" VerticalAlignment="[VerticalAlignment]Top" Width="[float]26" />
</IconTemplate>
<IconTemplate Height="[float]40" IsHitTestVisible="[bool]False" Left="[float]0" TemplateName="[string][JSLI]&lt;DenoHTTP.jsli&gt;" Top="[float]0" Width="[float]40" />
</IconPanel>
</Icon>
Expand Down
4 changes: 2 additions & 2 deletions Deno/Library/Components/DenoHTTP.gcomp/DenoHTTP.gcomp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<SourceFile Checksum="AA0B94346C89798D2E1289574273627E8DDF23ADDE642CE542E17BE4900817A4B643B1D3ED9914E7169A412381893056EC1B0EAD1B9683081F53A281D3D927A0" Timestamp="1DADBBEA8DC5E41" xmlns="http://www.ni.com/PlatformFramework">
<SourceFile Checksum="F6A96CE339CC094255399DD8CDA372EF1AF54E88DB9AA5F8028A9B14B8EF3CACE3AE857B92E163273F92331C22AC293F7DE8FC7551123B88242B9860ED9B651D" Timestamp="1DADBF4EB55DAE6" xmlns="http://www.ni.com/PlatformFramework">
<SourceModelFeatureSet>
<ParsableNamespace AssemblyFileVersion="9.5.0.49854" FeatureSetName="GComponentFeatureSet" Name="http://www.ni.com/GComponent.xsd" OldestCompatibleVersion="9.0.0.0" Version="9.0.0.49152" />
<ParsableNamespace AssemblyFileVersion="9.5.0.49854" FeatureSetName="JavaScript Library" Name="http://www.ni.com/JavaScriptLibrary" OldestCompatibleVersion="6.4.0.49152" Version="6.4.0.49152" />
Expand Down Expand Up @@ -42,7 +42,7 @@
<FileReference Bindings=".js" Id="12810be6811a4a0e89b9f434a6f53d23" ModelDefinitionType="{http://www.ni.com/PlatformFramework}ExternalFile" Name="DenoHTTP.js" StoragePath="Support\DenoHTTP.js" />
<SourceFileReference Bindings="EnvoyManager" Id="b1805ea0b77e40b8885f55461f5866b0" ModelDefinitionType="NationalInstruments.MocCommon.Modeling.TypeDefinition" Name="url pattern.gtype" StoragePath="Support\url pattern.gtype\url pattern.gtype" />
</NameScopingEnvoy>
<SourceFileReference Id="9eab1ef354a648e4be843f846423c7ee" ModelDefinitionType="NationalInstruments.LabVIEW.VI.Modeling.VirtualInstrument" Name="Create URL Pattern.gvi" StoragePath="Create URL Pattern.gvi" />
<SourceFileReference Id="9eab1ef354a648e4be843f846423c7ee" ModelDefinitionType="NationalInstruments.LabVIEW.VI.Modeling.VirtualInstrument" Name="Simple URL Pattern.gvi" StoragePath="Simple URL Pattern.gvi" />
<SourceFileReference Id="d9aa34ddb54c476082e491524e09b292" ModelDefinitionType="NationalInstruments.LabVIEW.VI.Modeling.VirtualInstrument" Name="Listen for Request.gvi" StoragePath="Listen for Request.gvi" />
<SourceFileReference Id="67a23d258a5b4779b5b031b69945ae93" ModelDefinitionType="NationalInstruments.LabVIEW.VI.Modeling.VirtualInstrument" Name="Complete Request.gvi" StoragePath="Complete Request.gvi" />
</NameScopingEnvoy>
Expand Down
Loading

0 comments on commit 4b439f8

Please sign in to comment.