nodalis-compiler 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.cs +0 -1
  4. package/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.csproj +1 -1
  5. package/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/NodalisEngine.1.0.10.nupkg +0 -0
  6. package/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.deps.json +24 -24
  7. package/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.dll +0 -0
  8. package/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.pdb +0 -0
  9. package/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.xml +0 -40
  10. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/NodalisEngine.csproj.nuget.dgspec.json +1 -1
  11. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/NodalisEngine.csproj.nuget.g.targets +1 -1
  12. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/NodalisEngine.1.0.10.nuspec +31 -0
  13. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.AssemblyInfo.cs +3 -3
  14. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.AssemblyInfoInputs.cache +1 -1
  15. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.assets.cache +0 -0
  16. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.csproj.AssemblyReference.cache +0 -0
  17. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.csproj.CoreCompileInputs.cache +1 -1
  18. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.dll +0 -0
  19. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.pdb +0 -0
  20. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.sourcelink.json +1 -1
  21. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/NodalisEngine.xml +0 -40
  22. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/ref/NodalisEngine.dll +0 -0
  23. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/Release/net8.0/refint/NodalisEngine.dll +0 -0
  24. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/project.assets.json +18 -18
  25. package/src/compilers/support/jint/nodalis/NodalisEngine/obj/project.nuget.cache +4 -4
  26. package/src/programmers/SSHProgrammer.js +99 -10
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Changelog
2
+
3
+ ## [1.0.27] 2026-03-20
4
+ - Corrected issues with SSH Programmer.
5
+
2
6
  ## [1.0.26] 2026-03-19
3
7
  - Improved error handling on programming.
4
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodalis-compiler",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Compiles IEC-61131-3/10 languages into code that can be used as a PLC on multiple platforms.",
5
5
  "icon": "nodalis.png",
6
6
  "main": "src/nodalis.js",
@@ -727,7 +727,6 @@ namespace Nodalis
727
727
  JsEngine.SetValue("elapsed", new Func<long>(() => ElapsedMilliseconds));
728
728
  JsEngine.SetValue("mapIO", new Action<string>(MapIO));
729
729
  JsEngine.SetValue("superviseIO", new Action(SuperviseIO));
730
- JsEngine.SetValue("writeDWord", new Action<string, uint>(WriteDWord));
731
730
  JsEngine.SetValue("log", new Action<string>(Console.WriteLine));
732
731
  JsEngine.SetValue("error", new Action<string>(Console.Error.WriteLine));
733
732
 
@@ -24,7 +24,7 @@
24
24
  <PropertyGroup>
25
25
  <TargetFrameworks>net8.0</TargetFrameworks>
26
26
  <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <!-- optional -->
27
- <Version>1.0.9</Version>
27
+ <Version>1.0.10</Version>
28
28
  <Authors>Nathan Skipper</Authors>
29
29
  <Company>Montgomery Technology, Inc.</Company>
30
30
  <PackageId>NodalisEngine</PackageId>
@@ -6,13 +6,13 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v8.0": {
9
- "NodalisEngine/1.0.9": {
9
+ "NodalisEngine/1.0.10": {
10
10
  "dependencies": {
11
11
  "BACnet": "3.0.2",
12
12
  "Jint": "4.4.2",
13
13
  "OPCFoundation.NetStandard.Opc.Ua": "1.5.374.118",
14
14
  "System.Runtime.InteropServices": "4.3.0",
15
- "System.Text.Json": "10.0.3"
15
+ "System.Text.Json": "10.0.5"
16
16
  },
17
17
  "runtime": {
18
18
  "NodalisEngine.dll": {}
@@ -584,11 +584,11 @@
584
584
  "runtime.native.System": "4.0.0"
585
585
  }
586
586
  },
587
- "System.IO.Pipelines/10.0.3": {
587
+ "System.IO.Pipelines/10.0.5": {
588
588
  "runtime": {
589
589
  "lib/net8.0/System.IO.Pipelines.dll": {
590
590
  "assemblyVersion": "10.0.0.0",
591
- "fileVersion": "10.0.326.7603"
591
+ "fileVersion": "10.0.526.15411"
592
592
  }
593
593
  }
594
594
  },
@@ -1044,11 +1044,11 @@
1044
1044
  "System.Text.Encoding": "4.3.0"
1045
1045
  }
1046
1046
  },
1047
- "System.Text.Encodings.Web/10.0.3": {
1047
+ "System.Text.Encodings.Web/10.0.5": {
1048
1048
  "runtime": {
1049
1049
  "lib/net8.0/System.Text.Encodings.Web.dll": {
1050
1050
  "assemblyVersion": "10.0.0.0",
1051
- "fileVersion": "10.0.326.7603"
1051
+ "fileVersion": "10.0.526.15411"
1052
1052
  }
1053
1053
  },
1054
1054
  "runtimeTargets": {
@@ -1056,19 +1056,19 @@
1056
1056
  "rid": "browser",
1057
1057
  "assetType": "runtime",
1058
1058
  "assemblyVersion": "10.0.0.0",
1059
- "fileVersion": "10.0.326.7603"
1059
+ "fileVersion": "10.0.526.15411"
1060
1060
  }
1061
1061
  }
1062
1062
  },
1063
- "System.Text.Json/10.0.3": {
1063
+ "System.Text.Json/10.0.5": {
1064
1064
  "dependencies": {
1065
- "System.IO.Pipelines": "10.0.3",
1066
- "System.Text.Encodings.Web": "10.0.3"
1065
+ "System.IO.Pipelines": "10.0.5",
1066
+ "System.Text.Encodings.Web": "10.0.5"
1067
1067
  },
1068
1068
  "runtime": {
1069
1069
  "lib/net8.0/System.Text.Json.dll": {
1070
1070
  "assemblyVersion": "10.0.0.0",
1071
- "fileVersion": "10.0.326.7603"
1071
+ "fileVersion": "10.0.526.15411"
1072
1072
  }
1073
1073
  }
1074
1074
  },
@@ -1164,7 +1164,7 @@
1164
1164
  }
1165
1165
  },
1166
1166
  "libraries": {
1167
- "NodalisEngine/1.0.9": {
1167
+ "NodalisEngine/1.0.10": {
1168
1168
  "type": "project",
1169
1169
  "serviceable": false,
1170
1170
  "sha512": ""
@@ -1547,12 +1547,12 @@
1547
1547
  "path": "system.io.filesystem.watcher/4.0.0",
1548
1548
  "hashPath": "system.io.filesystem.watcher.4.0.0.nupkg.sha512"
1549
1549
  },
1550
- "System.IO.Pipelines/10.0.3": {
1550
+ "System.IO.Pipelines/10.0.5": {
1551
1551
  "type": "package",
1552
1552
  "serviceable": true,
1553
- "sha512": "sha512-WMxiA2jGdHnRBmoVK55YUq5VPaxW0Sg2frPtXV+urUMvpqHIga6lleV/YuryHIuGsAKVjQAjv6PrQ6IJpoLohQ==",
1554
- "path": "system.io.pipelines/10.0.3",
1555
- "hashPath": "system.io.pipelines.10.0.3.nupkg.sha512"
1553
+ "sha512": "sha512-8/ZHN/j2y1t+7McdCf1wXku2/c7wtrGLz3WQabIoPuLAn3bHDWT6YOJYreJq8sCMPSo6c8iVYXUdLlFGX5PEqw==",
1554
+ "path": "system.io.pipelines/10.0.5",
1555
+ "hashPath": "system.io.pipelines.10.0.5.nupkg.sha512"
1556
1556
  },
1557
1557
  "System.IO.Ports/5.0.1": {
1558
1558
  "type": "package",
@@ -1820,19 +1820,19 @@
1820
1820
  "path": "system.text.encoding.extensions/4.0.11",
1821
1821
  "hashPath": "system.text.encoding.extensions.4.0.11.nupkg.sha512"
1822
1822
  },
1823
- "System.Text.Encodings.Web/10.0.3": {
1823
+ "System.Text.Encodings.Web/10.0.5": {
1824
1824
  "type": "package",
1825
1825
  "serviceable": true,
1826
- "sha512": "sha512-l8QNBPp92bVzl9Kw8nNtm1uYRNNhUrdulZjM4a8YK/QGNa8z9utKsC0bDoPB+Vq8LOlbD3fIyGlabtz80jT7cw==",
1827
- "path": "system.text.encodings.web/10.0.3",
1828
- "hashPath": "system.text.encodings.web.10.0.3.nupkg.sha512"
1826
+ "sha512": "sha512-opvD/nKTzGKA7GVntZ9L823kN6IxgHQfuxY+VI9gv8VE1Y7CSKoi/QS1EYDQiA63MqtZsD7X6zkISd2ZQJohTQ==",
1827
+ "path": "system.text.encodings.web/10.0.5",
1828
+ "hashPath": "system.text.encodings.web.10.0.5.nupkg.sha512"
1829
1829
  },
1830
- "System.Text.Json/10.0.3": {
1830
+ "System.Text.Json/10.0.5": {
1831
1831
  "type": "package",
1832
1832
  "serviceable": true,
1833
- "sha512": "sha512-NTUt9DL+maqbgrIYCAmeZUbX0NoXaueySyjW/bdOlFdSUDC1l51XnsbVEuj5tuad12vdq5Sviskp9uMVGgCNLw==",
1834
- "path": "system.text.json/10.0.3",
1835
- "hashPath": "system.text.json.10.0.3.nupkg.sha512"
1833
+ "sha512": "sha512-vW2zhkWziyfhoSXNf42mTWyilw+vfwBGOsODDsHSFtOIY6LCgfRVUyaAilLEL4Kc1fzhaxcep5pS0VWYPSDW0w==",
1834
+ "path": "system.text.json/10.0.5",
1835
+ "hashPath": "system.text.json.10.0.5.nupkg.sha512"
1836
1836
  },
1837
1837
  "System.Text.RegularExpressions/4.1.0": {
1838
1838
  "type": "package",
@@ -580,41 +580,6 @@
580
580
  Implements the CTUD function block.
581
581
  </summary>
582
582
  </member>
583
- <member name="T:Nodalis.EQ">
584
- <summary>
585
- implements the EQ function block.
586
- </summary>
587
- </member>
588
- <member name="T:Nodalis.NE">
589
- <summary>
590
- Implements the NE function block.
591
- </summary>
592
- </member>
593
- <member name="T:Nodalis.LT">
594
- <summary>
595
- Implements the LT function block.
596
- </summary>
597
- </member>
598
- <member name="T:Nodalis.GT">
599
- <summary>
600
- Implements GT function block.
601
- </summary>
602
- </member>
603
- <member name="T:Nodalis.GE">
604
- <summary>
605
- Implements the GE function block.
606
- </summary>
607
- </member>
608
- <member name="T:Nodalis.LE">
609
- <summary>
610
- Implements the LE function block.
611
- </summary>
612
- </member>
613
- <member name="T:Nodalis.MOVE">
614
- <summary>
615
- Implements the MOVE function block.
616
- </summary>
617
- </member>
618
583
  <member name="T:Nodalis.SEL">
619
584
  <summary>
620
585
  Implements the SEL function block.
@@ -640,11 +605,6 @@
640
605
  Implements the LIMIT function block.
641
606
  </summary>
642
607
  </member>
643
- <member name="T:Nodalis.ASSIGNMENT">
644
- <summary>
645
- Implements the ASSIGNMENT function block.
646
- </summary>
647
- </member>
648
608
  <member name="T:Nodalis.OPCClient">
649
609
  <summary>
650
610
  Implements the IOClient framework for OPC/UA modules.
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "projects": {
7
7
  "/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.csproj": {
8
- "version": "1.0.9",
8
+ "version": "1.0.10",
9
9
  "restore": {
10
10
  "projectUniqueName": "/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.csproj",
11
11
  "projectName": "NodalisEngine",
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8" standalone="no"?>
2
2
  <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
3
  <ImportGroup Condition=" '$(TargetFramework)' == 'net8.0' AND '$(ExcludeRestorePackageImports)' != 'true' ">
4
- <Import Project="$(NuGetPackageRoot)system.text.json/10.0.3/buildTransitive/net8.0/System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json/10.0.3/buildTransitive/net8.0/System.Text.Json.targets')" />
4
+ <Import Project="$(NuGetPackageRoot)system.text.json/10.0.5/buildTransitive/net8.0/System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json/10.0.5/buildTransitive/net8.0/System.Text.Json.targets')" />
5
5
  <Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions/8.0.1/buildTransitive/net6.0/Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions/8.0.1/buildTransitive/net6.0/Microsoft.Extensions.Logging.Abstractions.targets')" />
6
6
  </ImportGroup>
7
7
  </Project>
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3
+ <metadata>
4
+ <id>NodalisEngine</id>
5
+ <version>1.0.10</version>
6
+ <authors>Nathan Skipper</authors>
7
+ <license type="expression">Apache-2.0</license>
8
+ <licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
9
+ <icon>nodalis.png</icon>
10
+ <readme>README.md</readme>
11
+ <projectUrl>https://github.com/montgomerytechal/nodalis-compiler</projectUrl>
12
+ <description>.NET implementation of the Nodalis PLC engine for use in running PLC programs that have been compiled to Javascript using the Nodalis Compiler.</description>
13
+ <tags>control engineering plc iec-61131-3</tags>
14
+ <repository type="git" url="https://github.com/montgomerytechal/nodalis-compiler" commit="aacf68c786821e39de02a4ba25103049f4ab2b73" />
15
+ <dependencies>
16
+ <group targetFramework="net8.0">
17
+ <dependency id="BACnet" version="3.0.2" exclude="Build,Analyzers" />
18
+ <dependency id="Jint" version="4.4.2" exclude="Build,Analyzers" />
19
+ <dependency id="OPCFoundation.NetStandard.Opc.Ua" version="1.5.374.118" exclude="Build,Analyzers" />
20
+ <dependency id="System.Runtime.InteropServices" version="4.3.0" exclude="Build,Analyzers" />
21
+ <dependency id="System.Text.Json" version="10.0.5" exclude="Build,Analyzers" />
22
+ </group>
23
+ </dependencies>
24
+ </metadata>
25
+ <files>
26
+ <file src="/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.dll" target="lib/net8.0/NodalisEngine.dll" />
27
+ <file src="/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/bin/Release/net8.0/NodalisEngine.xml" target="lib/net8.0/NodalisEngine.xml" />
28
+ <file src="/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/README.md" target="/README.md" />
29
+ <file src="/Users/nathanskipper/Projects/imperium-compiler/nodalis.png" target="/nodalis.png" />
30
+ </files>
31
+ </package>
@@ -14,11 +14,11 @@ using System.Reflection;
14
14
  [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
15
15
  [assembly: System.Reflection.AssemblyDescriptionAttribute((".NET implementation of the Nodalis PLC engine for use in running PLC programs tha" +
16
16
  "t have been compiled to Javascript using the Nodalis Compiler."))]
17
- [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.9.0")]
18
- [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.9+6a060c814c1c5284aa3592217a37a7e5ffd17cff")]
17
+ [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.10.0")]
18
+ [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.10+aacf68c786821e39de02a4ba25103049f4ab2b73")]
19
19
  [assembly: System.Reflection.AssemblyProductAttribute("NodalisEngine")]
20
20
  [assembly: System.Reflection.AssemblyTitleAttribute("NodalisEngine")]
21
- [assembly: System.Reflection.AssemblyVersionAttribute("1.0.9.0")]
21
+ [assembly: System.Reflection.AssemblyVersionAttribute("1.0.10.0")]
22
22
  [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/montgomerytechal/nodalis-compiler")]
23
23
 
24
24
  // Generated by the MSBuild WriteCodeFragment class.
@@ -1 +1 @@
1
- 0ac7547f719dfb079a6336176f478125230d41937d1f3cc097db73df74c6f97c
1
+ a6c2b38f097c29949bc8856d2c5ea10ad7709dc5e7bcdf2fffa5c9163f081abd
@@ -1 +1 @@
1
- 4cbfc908681a6ddcd99bb80ef2bb8d1b369a9985f3a1beb0fb6b30464e76e374
1
+ 34c7592cf3c2e34f93d800fa2ed339688f538f9a0c5c46df1557c636d0a0809d
@@ -1 +1 @@
1
- {"documents":{"/Users/nathanskipper/Projects/imperium-compiler/*":"https://raw.githubusercontent.com/montgomerytechal/nodalis-compiler/6a060c814c1c5284aa3592217a37a7e5ffd17cff/*"}}
1
+ {"documents":{"/Users/nathanskipper/Projects/imperium-compiler/*":"https://raw.githubusercontent.com/montgomerytechal/nodalis-compiler/aacf68c786821e39de02a4ba25103049f4ab2b73/*"}}
@@ -580,41 +580,6 @@
580
580
  Implements the CTUD function block.
581
581
  </summary>
582
582
  </member>
583
- <member name="T:Nodalis.EQ">
584
- <summary>
585
- implements the EQ function block.
586
- </summary>
587
- </member>
588
- <member name="T:Nodalis.NE">
589
- <summary>
590
- Implements the NE function block.
591
- </summary>
592
- </member>
593
- <member name="T:Nodalis.LT">
594
- <summary>
595
- Implements the LT function block.
596
- </summary>
597
- </member>
598
- <member name="T:Nodalis.GT">
599
- <summary>
600
- Implements GT function block.
601
- </summary>
602
- </member>
603
- <member name="T:Nodalis.GE">
604
- <summary>
605
- Implements the GE function block.
606
- </summary>
607
- </member>
608
- <member name="T:Nodalis.LE">
609
- <summary>
610
- Implements the LE function block.
611
- </summary>
612
- </member>
613
- <member name="T:Nodalis.MOVE">
614
- <summary>
615
- Implements the MOVE function block.
616
- </summary>
617
- </member>
618
583
  <member name="T:Nodalis.SEL">
619
584
  <summary>
620
585
  Implements the SEL function block.
@@ -640,11 +605,6 @@
640
605
  Implements the LIMIT function block.
641
606
  </summary>
642
607
  </member>
643
- <member name="T:Nodalis.ASSIGNMENT">
644
- <summary>
645
- Implements the ASSIGNMENT function block.
646
- </summary>
647
- </member>
648
608
  <member name="T:Nodalis.OPCClient">
649
609
  <summary>
650
610
  Implements the IOClient framework for OPC/UA modules.
@@ -935,7 +935,7 @@
935
935
  }
936
936
  }
937
937
  },
938
- "System.IO.Pipelines/10.0.3": {
938
+ "System.IO.Pipelines/10.0.5": {
939
939
  "type": "package",
940
940
  "compile": {
941
941
  "lib/net8.0/System.IO.Pipelines.dll": {
@@ -1775,7 +1775,7 @@
1775
1775
  }
1776
1776
  }
1777
1777
  },
1778
- "System.Text.Encodings.Web/10.0.3": {
1778
+ "System.Text.Encodings.Web/10.0.5": {
1779
1779
  "type": "package",
1780
1780
  "compile": {
1781
1781
  "lib/net8.0/System.Text.Encodings.Web.dll": {
@@ -1797,11 +1797,11 @@
1797
1797
  }
1798
1798
  }
1799
1799
  },
1800
- "System.Text.Json/10.0.3": {
1800
+ "System.Text.Json/10.0.5": {
1801
1801
  "type": "package",
1802
1802
  "dependencies": {
1803
- "System.IO.Pipelines": "10.0.3",
1804
- "System.Text.Encodings.Web": "10.0.3"
1803
+ "System.IO.Pipelines": "10.0.5",
1804
+ "System.Text.Encodings.Web": "10.0.5"
1805
1805
  },
1806
1806
  "compile": {
1807
1807
  "lib/net8.0/System.Text.Json.dll": {
@@ -3842,10 +3842,10 @@
3842
3842
  "system.io.filesystem.watcher.nuspec"
3843
3843
  ]
3844
3844
  },
3845
- "System.IO.Pipelines/10.0.3": {
3846
- "sha512": "WMxiA2jGdHnRBmoVK55YUq5VPaxW0Sg2frPtXV+urUMvpqHIga6lleV/YuryHIuGsAKVjQAjv6PrQ6IJpoLohQ==",
3845
+ "System.IO.Pipelines/10.0.5": {
3846
+ "sha512": "8/ZHN/j2y1t+7McdCf1wXku2/c7wtrGLz3WQabIoPuLAn3bHDWT6YOJYreJq8sCMPSo6c8iVYXUdLlFGX5PEqw==",
3847
3847
  "type": "package",
3848
- "path": "system.io.pipelines/10.0.3",
3848
+ "path": "system.io.pipelines/10.0.5",
3849
3849
  "files": [
3850
3850
  ".nupkg.metadata",
3851
3851
  ".signature.p7s",
@@ -3866,7 +3866,7 @@
3866
3866
  "lib/net9.0/System.IO.Pipelines.xml",
3867
3867
  "lib/netstandard2.0/System.IO.Pipelines.dll",
3868
3868
  "lib/netstandard2.0/System.IO.Pipelines.xml",
3869
- "system.io.pipelines.10.0.3.nupkg.sha512",
3869
+ "system.io.pipelines.10.0.5.nupkg.sha512",
3870
3870
  "system.io.pipelines.nuspec",
3871
3871
  "useSharedDesignerContext.txt"
3872
3872
  ]
@@ -5892,10 +5892,10 @@
5892
5892
  "system.text.encoding.extensions.nuspec"
5893
5893
  ]
5894
5894
  },
5895
- "System.Text.Encodings.Web/10.0.3": {
5896
- "sha512": "l8QNBPp92bVzl9Kw8nNtm1uYRNNhUrdulZjM4a8YK/QGNa8z9utKsC0bDoPB+Vq8LOlbD3fIyGlabtz80jT7cw==",
5895
+ "System.Text.Encodings.Web/10.0.5": {
5896
+ "sha512": "opvD/nKTzGKA7GVntZ9L823kN6IxgHQfuxY+VI9gv8VE1Y7CSKoi/QS1EYDQiA63MqtZsD7X6zkISd2ZQJohTQ==",
5897
5897
  "type": "package",
5898
- "path": "system.text.encodings.web/10.0.3",
5898
+ "path": "system.text.encodings.web/10.0.5",
5899
5899
  "files": [
5900
5900
  ".nupkg.metadata",
5901
5901
  ".signature.p7s",
@@ -5924,15 +5924,15 @@
5924
5924
  "runtimes/wasi/lib/net10.0/System.Text.Encodings.Web.xml",
5925
5925
  "runtimes/win/lib/net9.0/System.Text.Encodings.Web.dll",
5926
5926
  "runtimes/win/lib/net9.0/System.Text.Encodings.Web.xml",
5927
- "system.text.encodings.web.10.0.3.nupkg.sha512",
5927
+ "system.text.encodings.web.10.0.5.nupkg.sha512",
5928
5928
  "system.text.encodings.web.nuspec",
5929
5929
  "useSharedDesignerContext.txt"
5930
5930
  ]
5931
5931
  },
5932
- "System.Text.Json/10.0.3": {
5933
- "sha512": "NTUt9DL+maqbgrIYCAmeZUbX0NoXaueySyjW/bdOlFdSUDC1l51XnsbVEuj5tuad12vdq5Sviskp9uMVGgCNLw==",
5932
+ "System.Text.Json/10.0.5": {
5933
+ "sha512": "vW2zhkWziyfhoSXNf42mTWyilw+vfwBGOsODDsHSFtOIY6LCgfRVUyaAilLEL4Kc1fzhaxcep5pS0VWYPSDW0w==",
5934
5934
  "type": "package",
5935
- "path": "system.text.json/10.0.3",
5935
+ "path": "system.text.json/10.0.5",
5936
5936
  "files": [
5937
5937
  ".nupkg.metadata",
5938
5938
  ".signature.p7s",
@@ -5996,7 +5996,7 @@
5996
5996
  "lib/net9.0/System.Text.Json.xml",
5997
5997
  "lib/netstandard2.0/System.Text.Json.dll",
5998
5998
  "lib/netstandard2.0/System.Text.Json.xml",
5999
- "system.text.json.10.0.3.nupkg.sha512",
5999
+ "system.text.json.10.0.5.nupkg.sha512",
6000
6000
  "system.text.json.nuspec",
6001
6001
  "useSharedDesignerContext.txt"
6002
6002
  ]
@@ -6528,7 +6528,7 @@
6528
6528
  "/Users/nathanskipper/.nuget/packages/": {}
6529
6529
  },
6530
6530
  "project": {
6531
- "version": "1.0.9",
6531
+ "version": "1.0.10",
6532
6532
  "restore": {
6533
6533
  "projectUniqueName": "/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.csproj",
6534
6534
  "projectName": "NodalisEngine",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 2,
3
- "dgSpecHash": "h1RHbxgv6gE=",
3
+ "dgSpecHash": "H1J7OhX666I=",
4
4
  "success": true,
5
5
  "projectFilePath": "/Users/nathanskipper/Projects/imperium-compiler/src/compilers/support/jint/nodalis/NodalisEngine/NodalisEngine.csproj",
6
6
  "expectedPackageFiles": [
@@ -58,7 +58,7 @@
58
58
  "/Users/nathanskipper/.nuget/packages/system.io.filesystem/4.0.1/system.io.filesystem.4.0.1.nupkg.sha512",
59
59
  "/Users/nathanskipper/.nuget/packages/system.io.filesystem.primitives/4.0.1/system.io.filesystem.primitives.4.0.1.nupkg.sha512",
60
60
  "/Users/nathanskipper/.nuget/packages/system.io.filesystem.watcher/4.0.0/system.io.filesystem.watcher.4.0.0.nupkg.sha512",
61
- "/Users/nathanskipper/.nuget/packages/system.io.pipelines/10.0.3/system.io.pipelines.10.0.3.nupkg.sha512",
61
+ "/Users/nathanskipper/.nuget/packages/system.io.pipelines/10.0.5/system.io.pipelines.10.0.5.nupkg.sha512",
62
62
  "/Users/nathanskipper/.nuget/packages/system.io.ports/5.0.1/system.io.ports.5.0.1.nupkg.sha512",
63
63
  "/Users/nathanskipper/.nuget/packages/system.linq/4.1.0/system.linq.4.1.0.nupkg.sha512",
64
64
  "/Users/nathanskipper/.nuget/packages/system.linq.expressions/4.1.0/system.linq.expressions.4.1.0.nupkg.sha512",
@@ -97,8 +97,8 @@
97
97
  "/Users/nathanskipper/.nuget/packages/system.security.principal.windows/5.0.0/system.security.principal.windows.5.0.0.nupkg.sha512",
98
98
  "/Users/nathanskipper/.nuget/packages/system.text.encoding/4.3.0/system.text.encoding.4.3.0.nupkg.sha512",
99
99
  "/Users/nathanskipper/.nuget/packages/system.text.encoding.extensions/4.0.11/system.text.encoding.extensions.4.0.11.nupkg.sha512",
100
- "/Users/nathanskipper/.nuget/packages/system.text.encodings.web/10.0.3/system.text.encodings.web.10.0.3.nupkg.sha512",
101
- "/Users/nathanskipper/.nuget/packages/system.text.json/10.0.3/system.text.json.10.0.3.nupkg.sha512",
100
+ "/Users/nathanskipper/.nuget/packages/system.text.encodings.web/10.0.5/system.text.encodings.web.10.0.5.nupkg.sha512",
101
+ "/Users/nathanskipper/.nuget/packages/system.text.json/10.0.5/system.text.json.10.0.5.nupkg.sha512",
102
102
  "/Users/nathanskipper/.nuget/packages/system.text.regularexpressions/4.1.0/system.text.regularexpressions.4.1.0.nupkg.sha512",
103
103
  "/Users/nathanskipper/.nuget/packages/system.threading/4.0.11/system.threading.4.0.11.nupkg.sha512",
104
104
  "/Users/nathanskipper/.nuget/packages/system.threading.overlapped/4.0.1/system.threading.overlapped.4.0.1.nupkg.sha512",
@@ -73,6 +73,7 @@ export class SSHProgrammer extends Programmer {
73
73
  const launchCommand = runtime === 'node'
74
74
  ? `node ${quoteForPosixSingle(remoteProgramPath)}`
75
75
  : quoteForPosixSingle(remoteProgramPath);
76
+ const remoteStagingPath = `/tmp/${packageName}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
76
77
 
77
78
  let payloadTempRoot = '';
78
79
  let transferSourcePath = sourcePath;
@@ -94,7 +95,17 @@ export class SSHProgrammer extends Programmer {
94
95
  '-p',
95
96
  sshPort,
96
97
  `${credentials.username}@${host}`,
97
- `mkdir -p ${quoteForPosixSingle(remotePath)}`
98
+ `mkdir -p ${quoteForPosixSingle(remoteStagingPath)}`
99
+ ]);
100
+
101
+ await this.#runSsh(credentials.password, [
102
+ '-p',
103
+ sshPort,
104
+ `${credentials.username}@${host}`,
105
+ this.#buildSudoCommand(
106
+ credentials.password,
107
+ `mkdir -p ${quoteForPosixSingle(remotePath)}`
108
+ )
98
109
  ]);
99
110
 
100
111
  if (sourceStat.isDirectory()) {
@@ -103,7 +114,7 @@ export class SSHProgrammer extends Programmer {
103
114
  sshPort,
104
115
  '-r',
105
116
  `${transferSourcePath}/.`,
106
- `${credentials.username}@${host}:${remotePath}/`
117
+ `${credentials.username}@${host}:${remoteStagingPath}/`
107
118
  ]);
108
119
  }
109
120
  else {
@@ -111,21 +122,40 @@ export class SSHProgrammer extends Programmer {
111
122
  '-P',
112
123
  sshPort,
113
124
  sourcePath,
114
- `${credentials.username}@${host}:${remotePath}/`
125
+ `${credentials.username}@${host}:${remoteStagingPath}/`
115
126
  ]);
116
127
  }
117
128
 
129
+ const installCommand = sourceStat.isDirectory()
130
+ ? `cp -a ${quoteForPosixSingle(`${remoteStagingPath}/.`)} ${quoteForPosixSingle(`${remotePath}/`)}`
131
+ : `cp -a ${quoteForPosixSingle(path.posix.join(remoteStagingPath, path.basename(sourcePath)))} ${quoteForPosixSingle(`${remotePath}/`)}`;
132
+
133
+ await this.#runSsh(credentials.password, [
134
+ '-p',
135
+ sshPort,
136
+ `${credentials.username}@${host}`,
137
+ this.#buildSudoCommand(credentials.password, installCommand)
138
+ ]);
139
+
118
140
  const cronLine = `@reboot ${launchCommand}`;
119
- const remoteScript = `CRON_LINE=${quoteForPosixSingle(cronLine)}; (crontab -l 2>/dev/null | grep -F -v \"${'$'}CRON_LINE\"; echo \"${'$'}CRON_LINE\") | crontab -`;
141
+ const remoteScript = `CRON_LINE=${quoteForPosixSingle(cronLine)}; (crontab -l 2>/dev/null | grep -F -v "${'$'}CRON_LINE"; echo "${'$'}CRON_LINE") | crontab -`;
120
142
 
121
143
  await this.#runSsh(credentials.password, [
122
144
  '-p',
123
145
  sshPort,
124
146
  `${credentials.username}@${host}`,
125
- `sh -lc ${quoteForPosixSingle(remoteScript)}`
147
+ this.#buildSudoCommand(credentials.password, remoteScript)
148
+ ]);
149
+
150
+ await this.#runSsh(credentials.password, [
151
+ '-p',
152
+ sshPort,
153
+ `${credentials.username}@${host}`,
154
+ this.#buildSudoCommand(credentials.password, 'reboot')
126
155
  ]);
127
156
  }
128
157
  finally {
158
+ await this.#cleanupRemoteStaging(credentials, host, sshPort, remoteStagingPath);
129
159
  if (payloadTempRoot) {
130
160
  await fs.rm(payloadTempRoot, { recursive: true, force: true });
131
161
  }
@@ -189,8 +219,13 @@ export class SSHProgrammer extends Programmer {
189
219
  }
190
220
 
191
221
  async #runScp(password, args) {
192
- if (password && await this.#commandExists('sshpass')) {
193
- await runCommandInteractive('sshpass', ['-p', password, 'scp', ...args]);
222
+ if (password) {
223
+ if (await this.#commandExists('sshpass')) {
224
+ await runCommandInteractive('sshpass', ['-p', password, 'scp', ...args]);
225
+ return;
226
+ }
227
+
228
+ await this.#runWithSshAskPass('scp', args, password);
194
229
  return;
195
230
  }
196
231
 
@@ -198,11 +233,65 @@ export class SSHProgrammer extends Programmer {
198
233
  }
199
234
 
200
235
  async #runSsh(password, args) {
201
- if (password && await this.#commandExists('sshpass')) {
202
- await runCommandInteractive('sshpass', ['-p', password, 'ssh', ...args]);
236
+ const sshArgs = ['-tt', ...args];
237
+
238
+ if (password) {
239
+ if (await this.#commandExists('sshpass')) {
240
+ await runCommandInteractive('sshpass', ['-p', password, 'ssh', ...sshArgs]);
241
+ return;
242
+ }
243
+
244
+ await this.#runWithSshAskPass('ssh', sshArgs, password);
245
+ return;
246
+ }
247
+
248
+ await runCommandInteractive('ssh', sshArgs);
249
+ }
250
+
251
+ #buildSudoCommand(password, command) {
252
+ if (password) {
253
+ return `echo ${quoteForPosixSingle(password)} | sudo -S -p '' sh -lc ${quoteForPosixSingle(command)}`;
254
+ }
255
+
256
+ return `sudo sh -lc ${quoteForPosixSingle(command)}`;
257
+ }
258
+
259
+ async #cleanupRemoteStaging(credentials, host, sshPort, remoteStagingPath) {
260
+ if (!remoteStagingPath) {
203
261
  return;
204
262
  }
205
263
 
206
- await runCommandInteractive('ssh', args);
264
+ try {
265
+ await this.#runSsh(credentials.password, [
266
+ '-p',
267
+ sshPort,
268
+ `${credentials.username}@${host}`,
269
+ `rm -rf ${quoteForPosixSingle(remoteStagingPath)}`
270
+ ]);
271
+ }
272
+ catch {
273
+ // Cleanup is best effort; deployment already succeeded or failed for another reason.
274
+ }
275
+ }
276
+
277
+ async #runWithSshAskPass(command, args, password) {
278
+ const askPassPath = path.join(os.tmpdir(), `nodalis-askpass-${process.pid}-${Date.now()}.sh`);
279
+
280
+ try {
281
+ await fs.writeFile(askPassPath, `#!/bin/sh\necho ${quoteForPosixSingle(password)}\n`, 'utf8');
282
+ await fs.chmod(askPassPath, 0o700);
283
+ await runCommandInteractive(command, args, {
284
+ env: {
285
+ ...process.env,
286
+ SSH_ASKPASS: askPassPath,
287
+ SSH_ASKPASS_REQUIRE: 'force',
288
+ DISPLAY: process.env.DISPLAY || 'nodalis:0'
289
+ },
290
+ stdio: ['ignore', 'inherit', 'inherit']
291
+ });
292
+ }
293
+ finally {
294
+ await fs.rm(askPassPath, { force: true });
295
+ }
207
296
  }
208
297
  }