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

v2.11.0 #1403

Merged
merged 284 commits into from
Sep 29, 2024
Merged

v2.11.0 #1403

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
284 commits
Select commit Hold shift + click to select a range
6b2a639
Merge remote-tracking branch 'upstream/develop' into Write-Pode_Respo…
mdaneri Jun 2, 2024
cd56411
Update Helpers.ps1
mdaneri Jun 2, 2024
0b3dd22
Update OpenApi.ps1
mdaneri Jun 2, 2024
568080f
Merge remote-tracking branch 'upstream/develop' into OpenAPIExternalP…
mdaneri Jun 2, 2024
950ca1e
Merge remote-tracking branch 'upstream/develop' into i18n
mdaneri Jun 2, 2024
dd2d4c0
Update OpenApi.ps1
mdaneri Jun 2, 2024
14da0d5
additional messages
mdaneri Jun 3, 2024
8039ccc
Merge pull request #1321 from mdaneri/OpenAPIExternalPathFix
Badgerati Jun 3, 2024
fa1d8ca
Merge remote-tracking branch 'upstream/develop' into i18n
mdaneri Jun 3, 2024
f609bf4
Merge remote-tracking branch 'upstream/develop' into Write-Pode_Respo…
mdaneri Jun 3, 2024
3eb155e
additional messages
mdaneri Jun 4, 2024
4dc45a5
Improve Module import and added documentation regarding localization
mdaneri Jun 4, 2024
4f69540
Merge pull request #1319 from mdaneri/Write-Pode_Response_PipeFix
Badgerati Jun 5, 2024
2d12ce6
Additional Messages
mdaneri Jun 5, 2024
e91ddc4
final exception messages
mdaneri Jun 5, 2024
8d86543
Merge remote-tracking branch 'upstream/develop' into i18n
mdaneri Jun 5, 2024
e9898b7
Last messages
mdaneri Jun 6, 2024
9671aef
fix Locales escaping $
mdaneri Jun 6, 2024
3bd305e
conversion of Locales to hashtable
mdaneri Jun 6, 2024
4d098b2
Delete Convert-HashtableToPsd1.ps1
mdaneri Jun 6, 2024
b330511
Make preview builds optional, until they're more stable
Badgerati Jun 6, 2024
a98cbc6
Allow 'no-build-needed' CI to run when just the preview CI workflow i…
Badgerati Jun 6, 2024
1a166a1
Merge pull request #1328 from Badgerati/separate-prvw-builds
Badgerati Jun 6, 2024
9de1410
Merge remote-tracking branch 'upstream/develop' into i18n
mdaneri Jun 6, 2024
d00ef81
file browsing i18n support
mdaneri Jun 7, 2024
32a4159
adding en-GB language
mdaneri Jun 7, 2024
8f99ae2
fixes
mdaneri Jun 9, 2024
5816804
Review of the tests making them i18n compatible
mdaneri Jun 10, 2024
09b3e2b
fix Powershell desktop test
mdaneri Jun 10, 2024
85eb8be
code cleanup
mdaneri Jun 10, 2024
fa28266
Readme, knowIssues update
mdaneri Jun 12, 2024
2d4b606
add second param to PodeLocale.secretVaultAlreadyRegisteredExceptionM…
mdaneri Jun 12, 2024
5873868
Fix Localization test
mdaneri Jun 12, 2024
8fcdcc3
Updated examples
mdaneri Jun 13, 2024
479f182
add test to check if no throw is using static string
mdaneri Jun 14, 2024
d605b50
added ShowExceptions not suitable for production
mdaneri Jun 15, 2024
e6cec2e
minor linguistic issues
mdaneri Jun 15, 2024
9c1b0f7
minor updates to Getting started
mdaneri Jun 16, 2024
5fe8169
Added MaximumVersion to Import-Module
mdaneri Jun 16, 2024
a216360
Diagnostics.CodeAnalysis.SuppressMessageAttribute
mdaneri Jun 16, 2024
359f2a1
added Server.DefaultFolders to the configuration option list
mdaneri Jun 20, 2024
1b68947
fix a link
mdaneri Jun 20, 2024
def9d4a
Make en-gb the default en
mdaneri Jun 21, 2024
f32c2f4
small fix
mdaneri Jun 23, 2024
fef57b0
add EndpointName to hiddencomponents for the DefinitionTag
mdaneri Jun 24, 2024
bb485c8
Update OpenApiTuttiFrutti.ps1
mdaneri Jun 24, 2024
a545aae
Add new Rename-PodeOADefinitionTagName function
mdaneri Jun 24, 2024
a9af260
fix the header
mdaneri Jun 24, 2024
e0f8aa7
implement | Web.OpenApi.UsePodeYamlInternal
mdaneri Jun 24, 2024
1b39192
Bump actions/add-to-project from 1.0.1 to 1.0.2
dependabot[bot] Jun 24, 2024
d9be9f7
Add ReceiveTimeout property
mdaneri Jun 25, 2024
dc06d11
Create devcontainer.json
mdaneri Jun 27, 2024
b191f8f
Update devcontainer.json
mdaneri Jun 27, 2024
0825dbc
Update devcontainer.json
mdaneri Jun 27, 2024
937f274
Update devcontainer.json
mdaneri Jun 27, 2024
61e0a74
Update devcontainer.json
mdaneri Jun 27, 2024
7e55084
update devcontainer.json
mdaneri Jun 27, 2024
b149116
Documentation and HelloWorld example
mdaneri Jun 27, 2024
28eeec7
fix helloworld sample
mdaneri Jun 27, 2024
7026ad2
Readme change
mdaneri Jun 28, 2024
5286a6a
Add comments to `Implementing Parameter Validation`
mdaneri Jun 28, 2024
ddb6e80
spaces fix
mdaneri Jun 28, 2024
100fa2d
Added CORS info
mdaneri Jun 28, 2024
fe61806
split openapi docs
mdaneri Jun 29, 2024
f16cc3a
add new Webhook sample
mdaneri Jul 1, 2024
23787d4
Convert-PodeYamlInternal fix an issue with boolean when the value is …
mdaneri Jul 1, 2024
52dacbc
Update OpenApi.ps1
mdaneri Jul 1, 2024
021bf5e
fix issue from previous commit
mdaneri Jul 1, 2024
edfff96
Merge pull request #1320 from mdaneri/i18n
Badgerati Jul 2, 2024
b8f1f1e
Merge branch 'develop' into dependabot/github_actions/actions/add-to-…
Badgerati Jul 2, 2024
b94e28d
Merge pull request #1341 from Badgerati/dependabot/github_actions/act…
Badgerati Jul 2, 2024
64c0d04
Merge remote-tracking branch 'upstream/develop' into fix-additionalPr…
mdaneri Jul 2, 2024
499e809
Merge remote-tracking branch 'upstream/develop' into codespace-pwsh
mdaneri Jul 2, 2024
db1b210
Merge remote-tracking branch 'upstream/develop' into usePodeYamlInternal
mdaneri Jul 2, 2024
d49810d
Merge remote-tracking branch 'upstream/develop' into OpenAPI-defaultT…
mdaneri Jul 2, 2024
d366ffd
Merge remote-tracking branch 'upstream/develop' into improve-OpenAPI-…
mdaneri Jul 2, 2024
3bac817
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 2, 2024
3401a77
Merge remote-tracking branch 'upstream/develop' into Minor_doc_fixes
mdaneri Jul 2, 2024
d854cb2
fix languages
mdaneri Jul 3, 2024
442f121
Merge pull request #1347 from mdaneri/fix-additionalProperties-whenfalse
Badgerati Jul 3, 2024
9c85a98
Merge branch 'develop' into improve-OpenAPI-endpoint
Badgerati Jul 3, 2024
4a52e5c
Merge pull request #1338 from mdaneri/improve-OpenAPI-endpoint
Badgerati Jul 3, 2024
f63d1f2
Merge remote-tracking branch 'upstream/develop' into usePodeYamlInternal
mdaneri Jul 3, 2024
0227ca1
Update Context.ps1
mdaneri Jul 3, 2024
676886b
Merge remote-tracking branch 'upstream/develop' into OpenAPI-defaultT…
mdaneri Jul 3, 2024
aa91013
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 3, 2024
28bbb17
Merge remote-tracking branch 'upstream/develop' into Minor_doc_fixes
mdaneri Jul 3, 2024
fe1277c
fix helloworld
mdaneri Jul 3, 2024
f872b47
Bump Pester to 5.6.1 for Codespace configuration
mdaneri Jul 3, 2024
12690af
Merge remote-tracking branch 'upstream/develop' into codespace-pwsh
mdaneri Jul 3, 2024
5802f4a
Merge pull request #1342 from mdaneri/codespace-pwsh
Badgerati Jul 3, 2024
ebd175e
Merge branch 'develop' into usePodeYamlInternal
Badgerati Jul 3, 2024
6bf2260
Merge pull request #1340 from mdaneri/usePodeYamlInternal
Badgerati Jul 3, 2024
1051886
Merge remote-tracking branch 'upstream/develop' into OpenAPI-defaultT…
mdaneri Jul 3, 2024
a9c88c7
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 3, 2024
fd57024
Merge remote-tracking branch 'upstream/develop' into Minor_doc_fixes
mdaneri Jul 3, 2024
aceb440
first drop
mdaneri Jul 6, 2024
7366099
tests fix
mdaneri Jul 6, 2024
970d090
fix ContentType comments
mdaneri Jul 7, 2024
473123b
Merge pull request #1352 from mdaneri/rfc9512
Badgerati Jul 8, 2024
cc1e8ac
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 8, 2024
8004f36
Merge remote-tracking branch 'upstream/develop' into Minor_doc_fixes
mdaneri Jul 8, 2024
6269ac5
addressed Mathew concerns
mdaneri Jul 9, 2024
330d15a
Merge remote-tracking branch 'upstream/develop' into OpenAPI-defaultT…
mdaneri Jul 9, 2024
4ce49cc
remove redundant code
mdaneri Jul 9, 2024
1bed3e3
Update server.psd1
mdaneri Jul 9, 2024
3022966
adding documentation
mdaneri Jul 9, 2024
4a3c037
Update README.md
mdaneri Jul 9, 2024
69790e7
Merge pull request #1332 from mdaneri/Minor_doc_fixes
Badgerati Jul 9, 2024
d6f5553
Update Overview.md
mdaneri Jul 9, 2024
0620e8b
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 9, 2024
ee60dd7
Merge remote-tracking branch 'upstream/develop' into OpenAPI-defaultT…
mdaneri Jul 9, 2024
2def7eb
Update 6MultipleDefinitions.md
mdaneri Jul 9, 2024
7c860c8
Added headers to the samples
mdaneri Jul 10, 2024
4064869
additional headers
mdaneri Jul 10, 2024
85cf51f
new build task IndexSamples
mdaneri Jul 10, 2024
9f201c4
Rename samples
Jul 10, 2024
30e0a36
additional headers
mdaneri Jul 11, 2024
d4d022d
renamed Petstore
Jul 11, 2024
2826f82
.
mdaneri Jul 11, 2024
8fd5818
Add test
mdaneri Jul 11, 2024
0eed342
new dutch language resources
mdaneri Jul 11, 2024
8a5e4c8
Delete Overview.md
mdaneri Jul 11, 2024
1e52d10
fix test
mdaneri Jul 11, 2024
3c03b80
fix Linux compatibility
mdaneri Jul 11, 2024
1eed05f
5.1 compatibility issues
mdaneri Jul 11, 2024
4115d62
Fixes
mdaneri Jul 11, 2024
24a19eb
test fix
mdaneri Jul 11, 2024
73bb5d8
#1007: adds logic to set redirecturl cookie for oauth2 flows
Badgerati Jul 13, 2024
e824cb1
Renamed Rename-PodeOADefinitionTagName to Rename-PodeOADefinitionTag
mdaneri Jul 14, 2024
d07036f
#1007: security function fixes whie testing oauth2 redirecting in pod…
Badgerati Jul 14, 2024
a69ccc7
Merge pull request #1359 from Badgerati/Issue-1007-new
Badgerati Jul 14, 2024
c466c8a
Merge branch 'develop' into OpenAPI-defaultTag-management
mdaneri Jul 14, 2024
2bb5de9
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Jul 14, 2024
49f72e0
Merge remote-tracking branch 'upstream/develop' into dutch-language_t…
mdaneri Jul 14, 2024
3db3246
Merge remote-tracking branch 'upstream/develop' into openapi-fixes
mdaneri Jul 14, 2024
357b2d4
Merge pull request #1339 from mdaneri/OpenAPI-defaultTag-management
Badgerati Jul 14, 2024
d93bd69
Fixes a bug when exporting more than 1 module
Badgerati Jul 14, 2024
0212257
Merge branch 'develop' into review_examples
mdaneri Jul 14, 2024
9634e39
Merge remote-tracking branch 'upstream/develop' into openapi-fixes
mdaneri Jul 15, 2024
8b6317d
Merge remote-tracking branch 'upstream/develop' into dutch-language_t…
mdaneri Jul 15, 2024
87677c5
Merge pull request #1360 from Badgerati/fix-exports
Badgerati Jul 18, 2024
0c3701e
Merge branch 'develop' into openapi-fixes
mdaneri Jul 18, 2024
4f222c8
Merge branch 'develop' into dutch-language_tests_details_fix
mdaneri Jul 18, 2024
b54a1ac
Merge branch 'develop' into review_examples
mdaneri Jul 18, 2024
e665a95
Adding Examples and Link
mdaneri Jul 18, 2024
fd3dd53
additional example update
mdaneri Jul 18, 2024
cced23d
more examples
mdaneri Jul 18, 2024
e8b423a
more examples
mdaneri Jul 18, 2024
ba6dece
new examples
mdaneri Jul 18, 2024
4b7c54d
All samples now have .EXAMPLES and .LINK
mdaneri Jul 19, 2024
6e88d78
Fixed the language resource + an issue with pester
mdaneri Jul 19, 2024
b946dc3
Merge pull request #1356 from mdaneri/dutch-language_tests_details_fix
Badgerati Jul 20, 2024
2edf696
Merge branch 'develop' into openapi-fixes
mdaneri Jul 20, 2024
2a558d6
Merge branch 'develop' into review_examples
mdaneri Jul 20, 2024
abf41cb
fix Dutch locales
mdaneri Jul 20, 2024
d8a35f1
Merge pull request #1358 from mdaneri/openapi-fixes
Badgerati Jul 20, 2024
3de2eee
Merge branch 'develop' into review_examples
mdaneri Jul 20, 2024
eb94255
OpenAPI fixes
mdaneri Jul 24, 2024
13545ac
Added GET operations cannot have a Request Body.
mdaneri Jul 25, 2024
9bc7c9d
revert default-swagger.html.pode
mdaneri Jul 25, 2024
2eb35ca
Replace new-object with ::new()
mdaneri Jul 25, 2024
b752c14
Update OpenApi.ps1
mdaneri Jul 26, 2024
e4683a2
Test task improvement - Pode.psm1 dll load improvement
mdaneri Aug 1, 2024
e25d7d4
added $ProgressPreference = 'SilentlyContinue'
mdaneri Aug 2, 2024
df78a1d
Changed getRequestBodyNotAllowedExceptionMessage check
mdaneri Aug 13, 2024
79e1f4e
Add test for Set-PodeOARequest
mdaneri Aug 14, 2024
b364ec4
Merge pull request #1369 from mdaneri/OpenApi-Fixes
Badgerati Aug 20, 2024
238e0c2
Merge remote-tracking branch 'upstream/develop' into smart-dll-loader
mdaneri Aug 20, 2024
810ea93
Merge remote-tracking branch 'upstream/develop' into review_examples
mdaneri Aug 20, 2024
d4544e5
#1291: rewrite of socket receiver to resolve NET8 SSL I/O changes
Badgerati Aug 28, 2024
2942fe3
#1291: set RestApi.Https.Tests to use both Invoke-RestMethod and curl…
Badgerati Aug 29, 2024
22e7d94
#1291: only use curl on PS7.4+
Badgerati Aug 29, 2024
9bd51aa
Merge pull request #1379 from Badgerati/Issue-1291
Badgerati Aug 30, 2024
9d4fe0d
Merge branch 'develop' into smart-dll-loader
mdaneri Aug 30, 2024
f65057c
Merge remote-tracking branch 'upstream/develop' into pr/1333
mdaneri Aug 30, 2024
ac6a57c
fix sse
mdaneri Aug 30, 2024
98e2dd5
#1291: quickfix to set C# language version to 7.3, which is officiall…
Badgerati Aug 30, 2024
b7c9431
Merge pull request #1380 from Badgerati/Issue-1291
Badgerati Aug 30, 2024
6f1d830
Merge remote-tracking branch 'upstream/develop' into pr/1333
mdaneri Aug 31, 2024
8a16ff4
Merge remote-tracking branch 'upstream/develop' into pr/1373
mdaneri Aug 31, 2024
2489cee
Update ci-pwsh_preview.yml
mdaneri Aug 31, 2024
f5d7bfb
Review 1
mdaneri Sep 2, 2024
40f9eaa
Merge pull request #1333 from mdaneri/review_examples
Badgerati Sep 2, 2024
53c7fe5
Merge branch 'develop' into smart-dll-loader
mdaneri Sep 2, 2024
056572b
review
mdaneri Sep 2, 2024
78aa711
Merge pull request #1373 from mdaneri/smart-dll-loader
Badgerati Sep 4, 2024
dbfa67c
final code
mdaneri Sep 7, 2024
b2fdacc
Update PSScriptAnalyzerSettings.psd1
mdaneri Sep 8, 2024
e585120
Recovered from #1344
mdaneri Sep 8, 2024
acac235
Fix documentation
mdaneri Sep 9, 2024
798c05d
OpenApi fixes
mdaneri Sep 9, 2024
07c58ea
Fix 5.1 issues with ordered hashtable
mdaneri Sep 13, 2024
a316b88
fix linux test
mdaneri Sep 13, 2024
e7beffe
Update OpenApi.Tests.ps1
mdaneri Sep 13, 2024
def1f1d
migration to [ordered] hashtable
mdaneri Sep 13, 2024
0cd23f5
revert to https://unpkg.com/swagger-editor-dist@4'
mdaneri Sep 13, 2024
58b19ac
Improves the error handling of schedules, tasks, and timers. Also add…
Badgerati Sep 14, 2024
7329186
Rebase with develop, resolve conflicts
Badgerati Sep 14, 2024
3e51068
Ignore 'issues' folders in example-docs building, force internal YAML
Badgerati Sep 14, 2024
91ae295
Clean-up, and adds quick schedule/task process docs
Badgerati Sep 14, 2024
9a99c96
Merge pull request #1393 from Badgerati/schedule-error-handling
Badgerati Sep 15, 2024
dd2e68d
Merge branch 'develop' into issue-1381
mdaneri Sep 15, 2024
4ec793c
Merge remote-tracking branch 'upstream/develop' into Piping
mdaneri Sep 15, 2024
87e25d5
Update Utilities.ps1
mdaneri Sep 15, 2024
8328909
Merge remote-tracking branch 'upstream/develop' into issue-1363
mdaneri Sep 15, 2024
fc482a9
Update Schedules.ps1
mdaneri Sep 15, 2024
a7d8f31
add support for automatically naming tasks, schedules and timers
mdaneri Sep 16, 2024
b690b60
Matthew suggestions
mdaneri Sep 19, 2024
d55b548
fix Schedule example and created pester test for schedule events
mdaneri Sep 20, 2024
c9c3383
Pester test improvement
mdaneri Sep 20, 2024
d6a76e7
Fixes
mdaneri Sep 21, 2024
93df876
Merge pull request #1384 from mdaneri/issue-1363
Badgerati Sep 21, 2024
8d927d0
Merge remote-tracking branch 'upstream/develop' into issue-1381
mdaneri Sep 21, 2024
1377c70
Merge remote-tracking branch 'upstream/develop' into Piping
mdaneri Sep 21, 2024
679be68
Update Core.ps1
mdaneri Sep 21, 2024
ecda421
#1354: fix retreiving domain name on mac
Badgerati Sep 21, 2024
0a9ae4a
Update Schedules.Tests.ps1
mdaneri Sep 21, 2024
78ffec2
Merge pull request #1398 from mdaneri/scheduletest
Badgerati Sep 22, 2024
88ada6d
#1361: replaces New-Object calls with new(), adds PSScriptAnalyzer to…
Badgerati Sep 22, 2024
2dbab35
#1361: fix tests, add localised error
Badgerati Sep 22, 2024
ef5d5f7
Merge branch 'develop' into Issue-1361
Badgerati Sep 22, 2024
a648c16
Merge branch 'develop' into Issue-1354
Badgerati Sep 22, 2024
d51eda6
Merge pull request #1397 from Badgerati/Issue-1354
Badgerati Sep 22, 2024
7e97569
Merge branch 'develop' into Issue-1361
Badgerati Sep 22, 2024
63f717f
Merge branch 'develop' into issue-1381
mdaneri Sep 22, 2024
5652c5b
Merge branch 'develop' into Piping
mdaneri Sep 22, 2024
473c9be
Merge pull request #1399 from Badgerati/Issue-1361
Badgerati Sep 22, 2024
274ee29
Merge branch 'develop' into issue-1381
mdaneri Sep 22, 2024
5ba440e
Merge remote-tracking branch 'upstream/develop' into issue-1381
mdaneri Sep 22, 2024
cc9f411
Merge branch 'issue-1381' of https://github.com/mdaneri/Pode into iss…
mdaneri Sep 22, 2024
6a4a761
Merge remote-tracking branch 'upstream/develop' into Piping
mdaneri Sep 22, 2024
c4b378c
remove trail space
mdaneri Sep 23, 2024
b444349
Update SSE.ps1
mdaneri Sep 24, 2024
23c07ba
replace Get-PodeOrderedDictionaryClone with Copy-PodeDeepClone
mdaneri Sep 25, 2024
5465d03
Removed unnecessary Piping
mdaneri Sep 25, 2024
71b3567
Rename Copy-PodeDeepClone to Copy-PodeObjectDeepClone
mdaneri Sep 26, 2024
38f2f07
Merge pull request #1390 from mdaneri/issue-1381
Badgerati Sep 26, 2024
061a984
#1392: fix for User being needlessly splatted when passed to scriptbl…
Badgerati Sep 27, 2024
e55dd4c
#1392: helps if you're in the right folder to push all changes!
Badgerati Sep 27, 2024
f9e7cf3
Fix secrets
mdaneri Sep 27, 2024
d9578e8
Merge remote-tracking branch 'upstream/develop' into Piping
mdaneri Sep 27, 2024
afa1723
post merge fixes
mdaneri Sep 27, 2024
af57434
Merge pull request #1388 from mdaneri/Piping
Badgerati Sep 28, 2024
b471ff6
Merge branch 'develop' into Issue-1392
Badgerati Sep 28, 2024
3ba7228
Merge pull request #1400 from Badgerati/Issue-1392
Badgerati Sep 28, 2024
f38bb32
ignore accepted PSAnalyzer warnings
Badgerati Sep 28, 2024
2e9d252
Merge pull request #1401 from Badgerati/analzyer-warnings
Badgerati Sep 28, 2024
7cfef47
prepping for 2.11.0
Badgerati Sep 29, 2024
21c76a1
Merge pull request #1402 from Badgerati/release-prep
Badgerati Sep 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Codespace with PowerShell, Pester, Invoke-Build, and .NET 8",
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/powershell:1": {},
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "8.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.powershell",
"pspester.pester-test"
]
}
},
"postCreateCommand": "pwsh -Command 'Install-Module -Name InvokeBuild,Pester -Force -SkipPublisherCheck; sleep 5; Invoke-Build Build '"
}
13 changes: 13 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The following is a set of guidelines for contributing to Pode on GitHub. These a
- [Where-Object](#where-object)
- [Select-Object](#select-object)
- [Measure-Object](#measure-object)
- [New-Object](#new-object)

## Code of Conduct

Expand Down Expand Up @@ -245,3 +246,15 @@ Instead of using the `Measure-Object` commandlet, please use either the `.Length
(@(1, 2, 3)).Length
(@{ Name = 'Rick' }).Count
```

#### New-Object

Instead of using the `New-Object` commandlet, please use `::new()` as this is far faster than the former.

```powershell
# instead of
$stream = New-Object System.IO.MemoryStream

# do this
$stream = [System.IO.MemoryStream]::new()
```
10 changes: 3 additions & 7 deletions .github/workflows/PSScriptAnalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# separate terms of service, privacy policy, and support
# documentation.
#
# https://github.com/microsoft/action-psscriptanalyzer
# https://github.com/microsoft/psscriptanalyzer-action
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer

Expand Down Expand Up @@ -48,15 +48,11 @@ jobs:
- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
path: .\src
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
includeRule: '"PSAvoidUsingCmdletAliases" ,"PSAvoidUsingPlainTextForPassword","PSAvoidUsingWriteHost","PSAvoidUsingInvokeExpression","PSUseShouldProcessForStateChangingFunctions","PSAvoidUsingUsernameAndPasswordParams","PSUseProcessBlockForPipelineCommand","PSAvoidUsingConvertToSecureStringWithPlainText","PSUseSingularNouns","PSReviewUnusedParameter"'
settings: .\PSScriptAnalyzerSettings.psd1
output: results.sarif

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci-no-build-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:
- 'src/**'
- 'tests/**'
- '.github/workflows/ci-docs.yml'
- '.github/workflows/ci-pwsh*.yml'
- '.github/workflows/ci-pwsh_lts.yml'
- '.github/workflows/ci-pwsh7_2.yml'
- '.github/workflows/ci-powershell.yml'
- '.github/workflows/ci-coverage.yml'
- '.github/workflows/PSScriptAnalyzer.yml'
Expand All @@ -30,7 +31,8 @@ on:
- 'src/**'
- 'tests/**'
- '.github/workflows/ci-docs.yml'
- '.github/workflows/ci-pwsh*.yml'
- '.github/workflows/ci-pwsh_lts.yml'
- '.github/workflows/ci-pwsh7_2.yml'
- '.github/workflows/ci-powershell.yml'
- '.github/workflows/ci-coverage.yml'
- '.github/workflows/PSScriptAnalyzer.yml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pwsh_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
POWERSHELL_VERSION: 'Preview'

jobs:
build:
build-preview:
runs-on: ${{ matrix.os }}

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-issue-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
project-url: https://github.com/users/Badgerati/projects/2
github-token: ${{ secrets.PROJECT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/open-issue-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
project-url: https://github.com/users/Badgerati/projects/2
github-token: ${{ secrets.PROJECT_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ examples/PetStore/data/PetData.json

packers/choco/pode.nuspec
packers/choco/tools/ChocolateyInstall.ps1
docs/Getting-Started/Samples.md
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"powershell.codeFormatting.whitespaceBetweenParameters": false,
"powershell.codeFormatting.whitespaceInsideBrace": true,
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
"powershell.scriptAnalysis.enable": true,
"files.trimTrailingWhitespace": true,
"files.associations": {
"*.pode": "html"
Expand Down
30 changes: 24 additions & 6 deletions PSScriptAnalyzerSettings.psd1
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
# PSScriptAnalyzerSettings.psd1
@{
Severity = @('Error', 'Warning', 'Information')
Severity = @('Error', 'Warning', 'Information')
IncludeDefaultRules = $true

Rules = @{
CustomRulePath = @(
'./analyzers/AvoidNewObjectRule.psm1'
)

Rules = @{
PSReviewUnusedParameter = @{
CommandsToTraverse = @(
'Where-Object','Remove-PodeRoute'
'Where-Object',
'Remove-PodeRoute'
)
}
AvoidNewObjectRule = @{
Severity = 'Warning'
}
}
ExcludeRules = @('PSAvoidUsingCmdletAliases' ,'PSAvoidUsingPlainTextForPassword','PSAvoidUsingWriteHost','PSAvoidUsingInvokeExpression','PSUseShouldProcessForStateChangingFunctions',
'PSAvoidUsingUsernameAndPasswordParams','PSUseProcessBlockForPipelineCommand','PSAvoidUsingConvertToSecureStringWithPlainText','PSUseSingularNouns','PSReviewUnusedParameter' )

ExcludeRules = @(
'PSAvoidUsingPlainTextForPassword',
'PSUseShouldProcessForStateChangingFunctions',
'PSAvoidUsingUsernameAndPasswordParams',
'PSUseProcessBlockForPipelineCommand',
'PSAvoidUsingConvertToSecureStringWithPlainText',
'PSReviewUnusedParameter',
'PSAvoidAssignmentToAutomaticVariable',
'PSUseBOMForUnicodeEncodedFile',
'PSAvoidTrailingWhitespace'
)

}
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@

Pode is a Cross-Platform framework for creating web servers to host [REST APIs](https://badgerati.github.io/Pode/Tutorials/Routes/Overview/), [Web Pages](https://badgerati.github.io/Pode/Tutorials/Routes/Examples/WebPages/), and [SMTP/TCP](https://badgerati.github.io/Pode/Servers/) Servers. Pode also allows you to render dynamic files using [`.pode`](https://badgerati.github.io/Pode/Tutorials/Views/Pode/) files, which are just embedded PowerShell, or other [Third-Party](https://badgerati.github.io/Pode/Tutorials/Views/ThirdParty/) template engines. Plus many more features, including [Azure Functions](https://badgerati.github.io/Pode/Hosting/AzureFunctions/) and [AWS Lambda](https://badgerati.github.io/Pode/Hosting/AwsLambda/) support!

<p align="center">
<img src="https://github.com/Badgerati/Pode/blob/develop/images/example_code_readme.svg?raw=true" width="70%" />
</p>
```powershell

Start-PodeServer -ScriptBlock {
Add-PodeEndPoint -Address localhost -port 32005 -Protocol Http
Add-PodeRoute -Method Get -Path '/ping' -ScriptBlock {
Write-PodeJsonResponse -Value @{value = 'pong' }
}
}

```

See [here](https://badgerati.github.io/Pode/Getting-Started/FirstApp) for building your first app! Don't know HTML, CSS, or JavaScript? No problem! [Pode.Web](https://github.com/Badgerati/Pode.Web) is currently a work in progress, and lets you build web pages using purely PowerShell!

Expand All @@ -49,8 +56,9 @@ Then navigate to `http://127.0.0.1:8000` in your browser.
* Cross-platform using PowerShell Core (with support for PS5)
* Docker support, including images for ARM/Raspberry Pi
* Azure Functions, AWS Lambda, and IIS support
* OpenAPI, Swagger, and ReDoc support
* Listen on a single or multiple IP address/hostnames
* OpenAPI specification version 3.0.x and 3.1.0
* OpenAPI documentation with Swagger, Redoc, RapidDoc, StopLight, OpenAPI-Explorer and RapiPdf
* Listen on a single or multiple IP(v4/v6) address/hostnames
* Cross-platform support for HTTP(S), WS(S), SSE, SMTP(S), and TCP(S)
* Host REST APIs, Web Pages, and Static Content (with caching)
* Support for custom error pages
Expand All @@ -73,6 +81,8 @@ Then navigate to `http://127.0.0.1:8000` in your browser.
* Support for File Watchers
* In-memory caching, with optional support for external providers (such as Redis)
* (Windows) Open the hosted server as a desktop application
* FileBrowsing support
* Localization (i18n) in Arabic, German, Spanish, France, Italian, Japanese, Korean, Polish, Portuguese, and Chinese

## 📦 Install

Expand Down
38 changes: 38 additions & 0 deletions analyzers/AvoidNewObjectRule.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function Measure-AvoidNewObjectRule {
[CmdletBinding()]
[OutputType([Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Language.ScriptBlockAst]
$ScriptBlockAst
)

# Initialize an empty array to collect diagnostic records
$diagnostics = @()

try {
# Traverse the AST to find all instances of New-Object cmdlet
$ScriptBlockAst.FindAll({
param($Ast)
$Ast -is [System.Management.Automation.Language.CommandAst] -and
$Ast.CommandElements[0].Extent.Text -eq 'New-Object'
}, $true) | ForEach-Object {
$diagnostics += [PSCustomObject]@{
Message = "Avoid using 'New-Object' and use '::new()' instead."
Extent = $_.Extent
RuleName = 'AvoidNewObjectRule'
Severity = 'Warning'
ScriptName = $FileName
}
}

# Return the diagnostic records
return $diagnostics
}
catch {
$PSCmdlet.ThrowTerminatingError($PSItem)
}
}

Export-ModuleMember -Function Measure-AvoidNewObjectRule
72 changes: 72 additions & 0 deletions docs/Getting-Started/Debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,75 @@ The steps to attach to the Pode process are as follows:
5. You'll also be able to query variables as well, such as `$WebEvent` and other variables you might have created.

6. When you are done debugging the current request, hit the `d` key.



## Managing Runspace Names

### Internal Runspace Naming

In Pode, internal runspaces are automatically assigned distinct names. This built-in naming convention is crucial for identifying and managing runspaces efficiently, particularly during debugging or when monitoring multiple concurrent processes.

Pode uses specific naming patterns for its internal runspaces, which include:

- **Pode_Web_Listener_1**
- **Pode_Signals_Broadcaster_1**
- **Pode_Signals_Listener_1**
- **Pode_Web_KeepAlive_1**
- **Pode_Files_Watcher_1**
- **Pode_Main_Logging_1**
- **Pode_Timers_Scheduler_1**
- **Pode_Schedules_[Schedule Name]_1** – where `[Schedule Name]` is the name of the schedule.
- **Pode_Tasks_[Task Name]_1** – where `[Task Name]` is the name of the task.

These default names are automatically assigned by Pode, making it easier to identify the purpose of each runspace during execution.

### Customizing Runspace Names

By default, Pode’s Tasks, Schedules, and Timers label their associated runspaces with their own names (as shown above). This simplifies the identification of runspaces when debugging or reviewing logs.

However, if a different runspace name is needed, Pode allows you to customize it. Inside the script block of `Add-PodeTask`, `Add-PodeSchedule`, or `Add-PodeTimer`, you can use the `Set-PodeCurrentRunspaceName` cmdlet to assign any custom name you prefer.

```powershell
Set-PodeCurrentRunspaceName -Name 'Custom Runspace Name'
```

This cmdlet sets a custom name for the runspace, making it easier to track during execution.

#### Example

Here’s an example that demonstrates how to set a custom runspace name in a Pode task:

```powershell
Add-PodeTask -Name 'Test2' -ScriptBlock {
param($value)
# Set a custom name for the current runspace
Set-PodeCurrentRunspaceName -Name 'My Fancy Runspace'
Start-Sleep -Seconds 10
"A $($value) is never late, it arrives exactly when it means to" | Out-Default
}
```

In this example, the `Set-PodeCurrentRunspaceName` cmdlet assigns the custom name `'My Fancy Runspace'` to the task's runspace. This is especially useful for debugging or when examining logs, as the custom name makes the runspace more recognizable.

### Retrieving Runspace Names

Pode also provides the `Get-PodeCurrentRunspaceName` cmdlet to retrieve the name of the current runspace. This is particularly helpful when you need to log or display the runspace name dynamically during execution.

```powershell
Get-PodeCurrentRunspaceName
```

This cmdlet returns the name of the current runspace, allowing for easier tracking and management in complex scenarios with multiple concurrent runspaces.

#### Example

Here’s an example that uses `Get-PodeCurrentRunspaceName` to output the runspace name during the execution of a schedule:

```powershell
Add-PodeSchedule -Name 'TestSchedule' -Cron '@hourly' -ScriptBlock {
Write-PodeHost "Runspace name: $(Get-PodeCurrentRunspaceName)"
}
```

In this example, the schedule outputs the name of the runspace executing the script block every hour. This can be useful for logging and monitoring purposes when dealing with multiple schedules or tasks.
10 changes: 10 additions & 0 deletions docs/Getting-Started/FirstApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ Success, saved package.json
Import-Module -Name Pode -MaximumVersion 2.99.99
```

* To ensure that any errors during the import process are caught and handled appropriately, use a try-catch block:

```powershell
try {
Import-Module -Name 'Pode' -MaximumVersion 2.99.99 -ErrorAction Stop
} catch {
# exception management code
}
```

* Within your `server.ps1` file, first you need to start the Server. This is where the main script will go that defines how the server should function:

```powershell
Expand Down
Loading