Skip to content

Managed cmdlets (v0.3.0) #1

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

Merged
merged 92 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
cfb44aa
Added cmdlets project
FeodorFitsner Feb 28, 2021
692f0b3
Pglet v0.2.4
FeodorFitsner Mar 2, 2021
cfb06c6
Pglet .NET base classes
FeodorFitsner Mar 4, 2021
ba66da3
Send method added
FeodorFitsner Mar 4, 2021
c9d84bc
Waiting for events
FeodorFitsner Mar 5, 2021
51dc6ed
More experiments with .NET
FeodorFitsner Mar 5, 2021
45b9508
Cancellable cmdlet
FeodorFitsner Mar 5, 2021
da940b6
Trying to use blocking collection
FeodorFitsner Mar 6, 2021
59c1e59
Removed async cmdlets
FeodorFitsner Mar 7, 2021
e6f5784
Pglet with install
FeodorFitsner Mar 7, 2021
da0d787
Wait-PgletEvent with cancellation
FeodorFitsner Mar 7, 2021
5cb4b95
Test app cmdlet
FeodorFitsner Mar 10, 2021
c517d26
Fix for macOS
FeodorFitsner Mar 10, 2021
2b99434
Update psd1 to load nested module
FeodorFitsner Mar 13, 2021
d19cf10
Disconnect-Pglet cmdlet added
FeodorFitsner Mar 14, 2021
43fd3af
Connect-PgletApp cmdlet
FeodorFitsner Mar 14, 2021
bf227be
Build managed module
FeodorFitsner Mar 14, 2021
a85f7f5
Fix cmdlet
FeodorFitsner Mar 14, 2021
ffdcff4
Button alias
FeodorFitsner Mar 15, 2021
4ca74a5
Test batch
FeodorFitsner Mar 17, 2021
7ae3a09
Few props added
FeodorFitsner Mar 18, 2021
358ce60
Control base class
FeodorFitsner Mar 19, 2021
08cd859
Add method working and Icon control
FeodorFitsner Mar 19, 2021
9f23036
Diff algorithm added
FeodorFitsner Mar 19, 2021
bc78c7f
Build control commands
FeodorFitsner Mar 20, 2021
891715e
Batch commands
FeodorFitsner Mar 20, 2021
daa7fc2
Control events
FeodorFitsner Mar 20, 2021
e2e7557
Dynamic control props update
FeodorFitsner Mar 20, 2021
b6adf9f
Event handlers moved to Page
FeodorFitsner Mar 21, 2021
dde0ad2
allEvents flag
FeodorFitsner Mar 21, 2021
57bd765
PsButton
FeodorFitsner Mar 22, 2021
222d417
Events in PS working!
FeodorFitsner Mar 22, 2021
640dd22
Working Page object
FeodorFitsner Mar 22, 2021
4f96bd8
Stack cmdlet
FeodorFitsner Mar 22, 2021
54c7d34
Added aliases for first controls
FeodorFitsner Mar 22, 2021
1e15cf7
Moved some cmdlets
FeodorFitsner Mar 22, 2021
0b30645
ControlEvent class
FeodorFitsner Mar 22, 2021
74bd4e2
Make Connection methods thread-safe
FeodorFitsner Mar 22, 2021
ce6f3e3
Control class refactoring
FeodorFitsner Mar 22, 2021
6e118ed
Removed constructors
FeodorFitsner Mar 23, 2021
ecbe5e9
Button props
FeodorFitsner Mar 23, 2021
0be3209
Wait for results when running batch
FeodorFitsner Mar 23, 2021
bf61750
Read events in a loop
FeodorFitsner Mar 23, 2021
c6c4d2a
Use UDS on Linux/mac
FeodorFitsner Mar 23, 2021
9599e68
Read single event line
FeodorFitsner Mar 23, 2021
5bd1786
Fix control names
FeodorFitsner Mar 23, 2021
b27a140
Update _page1.ps1
FeodorFitsner Mar 23, 2021
b37e286
Introduced Control.Gid
FeodorFitsner Mar 26, 2021
4d39b44
Button
FeodorFitsner Mar 27, 2021
9b42c31
More controls added
FeodorFitsner Mar 28, 2021
8af4f7d
More controls added
FeodorFitsner Mar 29, 2021
82dcff4
Enum parsing with attributes
FeodorFitsner Mar 29, 2021
8fa7a38
Uid, BarChart
FeodorFitsner Mar 30, 2021
551921a
All charts
FeodorFitsner Mar 31, 2021
88fb682
Toolbar
FeodorFitsner Mar 31, 2021
f4c9908
Update Textbox.cs
FeodorFitsner Mar 31, 2021
f47b32b
Stack, Text
FeodorFitsner Mar 31, 2021
68a427e
Slider, SpinButton
FeodorFitsner Mar 31, 2021
aaad657
Progress
FeodorFitsner Mar 31, 2021
dcd7701
Tabs
FeodorFitsner Mar 31, 2021
3675508
Nav
FeodorFitsner Mar 31, 2021
5598c09
Control.Update()
FeodorFitsner Apr 1, 2021
7808429
Grid with items
FeodorFitsner Apr 1, 2021
ec638aa
ValueField added to boolean-like controls
FeodorFitsner Apr 1, 2021
fdb40ac
Optimize control updates
FeodorFitsner Apr 2, 2021
5bc7b08
Publish nuget
FeodorFitsner Apr 2, 2021
0b25bb4
Set VersionSuffix differently
FeodorFitsner Apr 2, 2021
2020b3e
OutputPath for Release
FeodorFitsner Apr 2, 2021
564dcc5
Publish nuget package on tag
FeodorFitsner Apr 2, 2021
6cd7f72
Pglet -> PgletClient
FeodorFitsner Apr 2, 2021
d09c6e7
Page Close command added
FeodorFitsner Apr 7, 2021
1299e38
Closing orphaned sessions
FeodorFitsner Apr 7, 2021
9c652f5
Page hash and close events
FeodorFitsner Apr 8, 2021
e22f1a8
Remove namespaces
FeodorFitsner Apr 8, 2021
ef9d885
Use PsPage in PowerShell
FeodorFitsner Apr 8, 2021
fcb9e22
Use Newton.JSON
FeodorFitsner Apr 8, 2021
7571e2c
Update Pglet.PowerShell.csproj
FeodorFitsner Apr 8, 2021
380c6f5
Correctly handle page.close in PowerShell
FeodorFitsner Apr 9, 2021
2b32788
Switch-PgletEvents for apps
FeodorFitsner Apr 9, 2021
d51d9bf
All classes in separate files
FeodorFitsner Apr 9, 2021
4d31410
NewControlCmdletBase
FeodorFitsner Apr 9, 2021
e0a7432
BarChart, Button, Callout
FeodorFitsner Apr 9, 2021
bc238fc
Checkbox, ChoiceGroup, Dialog, Dropdown
FeodorFitsner Apr 9, 2021
2b90368
Control classes cleanup
FeodorFitsner Apr 9, 2021
1c6f6d2
Grid, Panel, Icon, Image, LineChart
FeodorFitsner Apr 9, 2021
d0161c9
Link, Message, Nav, SearchBox, Slider, SpinButton, Textbox, VerticalB…
FeodorFitsner Apr 9, 2021
a8b31ff
Stack, Tabs, Toggle, Textbox, Toolbar
FeodorFitsner Apr 9, 2021
43f8ef4
Cmdlet aliases, Checkbox fix
FeodorFitsner Apr 9, 2021
c60a8a9
Grid.SelectedItems
FeodorFitsner Apr 16, 2021
3d1b96f
Use Pglet 0.3.0
FeodorFitsner Apr 18, 2021
5e2fbf7
Update authors
FeodorFitsner Apr 18, 2021
3f3279c
Fix $ver_num
FeodorFitsner Apr 19, 2021
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
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Ignore file for Visual Studio 2008

# use glob syntax
syntax: glob

# Ignore Visual Studio 2008 files
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
_out*/
_web*/
_publish
[Bb]in
[Dd]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
packages/
[Ll]ogs/

node_modules/
package-lock.json
.vs/
*.env
.DS_Store
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Pglet.Tests/bin/Debug/netcoreapp3.1/Pglet.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Pglet.Tests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Pglet.Tests/Pglet.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/Pglet.Tests/Pglet.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/src/Pglet.Tests/Pglet.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
54 changes: 39 additions & 15 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@

environment:
configuration: Release
psg_api_key:
secure: e3uoVHqaTTa+BqEphKfjGYLXG4OXTmAktNhbWXAD+ZT6BD94F0dqabjfwbcKk14t
nuget_api_key:
secure: 7qhExxbMr9K4LxzMbhJ2YHynyvZde6y/6duaZuT1Vzyg6CfI9QHDJD2y8DWtGXSA

build_script:

# copy module contents
- ps: New-Item pglet -Type Directory | Out-Null
- ps: Copy-Item -Path *.psd1 -Destination pglet
- ps: Copy-Item -Path *.psm1 -Destination pglet

# publish module
- ps: |
$ErrorActionPreference = "Stop"

Expand All @@ -22,21 +18,49 @@ build_script:
$ver = $env:APPVEYOR_REPO_TAG_NAME
if ($ver.StartsWith('v')) { $ver = $ver.Substring(1) }

# prerelease moniker
# version suffix
$idx = $ver.indexOf('-')
if ($idx -ne -1) {
$prerelease = $ver.Substring($idx + 1)
$ver = $ver.Substring(0, $idx)
$ver_suffix = $ver.Substring($idx + 1)
$ver_num = $ver.Substring(0, $idx)
} else {
$ver_suffix = ''
$ver_num = $ver
}
} else {
$ver = $ver_num = $env:APPVEYOR_BUILD_VERSION
$ver_suffix = ''
}

Write-Host "Module version: $ver"
Write-Host "Version suffix: $ver_suffix"

Write-Host "Module version: $ver"
Write-Host "Pre-release moniker: $prerelease"
dotnet build src\Pglet --configuration $env:CONFIGURATION /p:Version=$ver
dotnet build src\Pglet.PowerShell --configuration $env:CONFIGURATION /p:Version=$ver

(Get-Content pglet\pglet.psd1).replace("ModuleVersion = '0.1.0'", "ModuleVersion = '$ver'") | Set-Content pglet\pglet.psd1
if ($prerelease) {(Get-Content pglet\pglet.psd1).replace("# Prerelease = 'beta'", "Prerelease = '$prerelease'") | Set-Content pglet\pglet.psd1}
# copy module contents
New-Item pglet -Type Directory | Out-Null
Copy-Item -Path *.psd1 -Destination pglet
Copy-Item -Path *.psm1 -Destination pglet
Copy-Item -Path 'bin' -Destination pglet -Recurse
Get-ChildItem pglet -Recurse

# publish module
if ($env:APPVEYOR_REPO_TAG -eq 'true') {
(Get-Content pglet\pglet.psd1).replace("ModuleVersion = '0.1.0'", "ModuleVersion = '$ver_num'") | Set-Content pglet\pglet.psd1
if ($ver_suffix) {(Get-Content pglet\pglet.psd1).replace("# Prerelease = 'beta'", "Prerelease = '$ver_suffix'") | Set-Content pglet\pglet.psd1}
Publish-Module -Path $env:APPVEYOR_BUILD_FOLDER\pglet -NuGetApiKey $env:psg_api_key

Write-Host "Module has been successfully published" -ForegroundColor Green
}

test: off
artifacts:
- path: '**/*.nupkg'

test: off

deploy:
- provider: NuGet
api_key: $(nuget_api_key)
on:
APPVEYOR_REPO_TAG: true
1 change: 1 addition & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet build src\Pglet.PowerShell
13 changes: 2 additions & 11 deletions pglet.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@
Copyright = 'Copyright (c) 2021 Appveyor Systems Inc. All rights reserved.'
Description = 'Pglet client for PowerShell - easily create rich and responsive web apps in PowerShell.'
PowerShellVersion = '5.0'
NestedModules = @('bin\Pglet.PowerShell.dll')
FunctionsToExport = @(
'Connect-PgletApp',
'Connect-PgletPage',
'Disconnect-Pglet',
'Invoke-Pglet',
'Wait-PgletEvent',
'Write-Trace'
)
CmdletsToExport = '*'
VariablesToExport = '*'
AliasesToExport = @(
'ipg'
)
AliasesToExport = '*'
PrivateData = @{
Pglet = @{
MinimumVersion = "0.2.2"
}
PSData = @{
#Tags = @()
LicenseUri = 'https://github.com/pglet/pglet-powershell/blob/main/LICENSE'
Expand Down
Loading