Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert from pode yaml #1382

Draft
wants to merge 39 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c887394
Update Helpers.ps1
mdaneri Jul 10, 2024
48bec85
Fix an issue where ConvertTo-PodeYamlInternal was usedinstead of Conv…
mdaneri Jul 10, 2024
f9470ab
Yaml function are now public
mdaneri Jul 12, 2024
7834895
Update Utilities.ps1
mdaneri Jul 12, 2024
e99a121
fix test
mdaneri Jul 12, 2024
725faed
Update Utilities.Tests.ps1
mdaneri Jul 13, 2024
c1048ef
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Jul 14, 2024
5b8b5ef
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Jul 14, 2024
0cc2174
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Jul 18, 2024
8a7e802
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Jul 20, 2024
1a898be
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Jul 20, 2024
03168c9
converted yaml function in C#
mdaneri Aug 13, 2024
31067cc
Changed default Json conversion to PSCustomObject
mdaneri Aug 14, 2024
c76ab58
Fix an issue with Windows Powershell
mdaneri Aug 15, 2024
9bee3fa
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Aug 20, 2024
c96b144
Update server.psd1
mdaneri Sep 8, 2024
083feaa
add support for PodeOrderedConcurrentDictionary
mdaneri Sep 11, 2024
f4cc4dd
fixes
mdaneri Sep 11, 2024
93f2283
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 15, 2024
d431533
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 21, 2024
7456ec2
Update Schedules.Tests.ps1
mdaneri Sep 21, 2024
601cae8
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Sep 22, 2024
357d93b
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Sep 22, 2024
37fa3b1
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 27, 2024
3b09d8e
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 28, 2024
8f70835
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 28, 2024
588217c
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Sep 28, 2024
6399d3d
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Sep 29, 2024
a97e639
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 16, 2024
1153515
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 20, 2024
67b98f6
Merge branch 'develop' into ConvertFrom-PodeYaml
mdaneri Oct 21, 2024
8bf30ef
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 23, 2024
68c86e8
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 23, 2024
f3ac206
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 27, 2024
faf31a6
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 28, 2024
9f96e19
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Oct 30, 2024
b6bdf1b
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Nov 2, 2024
24e622d
Merge remote-tracking branch 'upstream/develop' into ConvertFrom-Pode…
mdaneri Nov 22, 2024
04f280d
Update pode.build.ps1
mdaneri Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/Tutorials/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ A "path" like `Server.Ssl.Protocols` looks like the below in the file:
| Web.Compression | Sets any compression to use on the Response | [link](../Compression/Responses) |
| Web.ContentType | Define expected Content Types for certain Routes | [link](../Routes/Utilities/ContentTypes) |
| Web.ErrorPages | Defines configuration for custom error pages | [link](../Routes/Utilities/ErrorPages) |
| Web.Static | Defines configuration for static content, such as caching | [link](../Routes/Utilities/StaticContent) |
| Web.Static | Defines configuration for static content, such as caching | [link](../Routes/Utilities/StaticContent) |
| Web.Conversion.JsonToHashTable | Set the default Json conversion to HashTable if true otherwise PSCustomObject (Default: True for PSCore and False for Windows Powershell )| |
| Web.Conversion.YamlToHashTable | Set the default Yaml conversion to HashTable if true otherwise PSCustomObject (Default: True)| |

10 changes: 9 additions & 1 deletion examples/server.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
Web = @{
Web = @{
Static = @{
Defaults = @(
'index.html',
Expand All @@ -19,6 +19,7 @@
Default = 'application/html'
Routes = @{
'/john' = 'application/json'
'/auth' = 'application/json'
}
}
Compression = @{
Expand All @@ -27,7 +28,14 @@
OpenApi = @{
UsePodeYamlInternal = $true
}

Conversion = @{
JsonToHashTable = $true
XmlToHashTable = $true
YamlToHashTable = $true
}
}

Server = @{
FileMonitor = @{
Enable = $false
Expand Down
1 change: 1 addition & 0 deletions pode.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function Invoke-PodeBuildDotnetBuild($target) {
# Determine if the target framework is compatible
$isCompatible = $False
switch ($majorVersion) {
9 { if ($target -in @('net6.0', 'netstandard2.0', 'net8.0', 'net9.0')) { $isCompatible = $True } }
8 { if ($target -in @('net6.0', 'netstandard2.0', 'net8.0')) { $isCompatible = $True } }
7 { if ($target -in @('net6.0', 'netstandard2.0')) { $isCompatible = $True } }
6 { if ($target -in @('net6.0', 'netstandard2.0')) { $isCompatible = $True } }
Expand Down
10 changes: 10 additions & 0 deletions src/Listener/Pode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@
<NoWarn>$(NoWarn);SYSLIB0001</NoWarn>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<!-- Package reference for net6.0 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0" />
</ItemGroup>

<!-- Package reference for net8.0 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.4" />
</ItemGroup>
</Project>
Loading