Skip to content

Commit 90511ed

Browse files
Merge pull request #32 from StartAutomating/Eventful-Updates
Eventful 0.1.8
2 parents 5481da0 + 4cad3b6 commit 90511ed

File tree

71 files changed

+1182
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1182
-524
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [StartAutomating]

.github/workflows/TestAndPublish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@ jobs:
576576
steps:
577577
- name: Check out repository
578578
uses: actions/checkout@v2
579+
- name: GitLogger
580+
uses: GitLogging/GitLoggerAction@main
581+
id: GitLogger
579582
- name: Use PSSVG Action
580583
uses: StartAutomating/PSSVG@main
581584
id: PSSVG

Assets/Eventful.svg

Lines changed: 4 additions & 4 deletions
Loading

CHANGELOG.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
1-
## 0.1.7
1+
## Eventful 0.1.8:
2+
3+
* Eventful Supports Sponsorship (#25)
4+
* New Commands!
5+
* Import-Event (#28)
6+
* Export-Event (#27)
7+
* Send-Event can now send -EventArguments and -MessageData (#26)
8+
* Watch-Event now supports -MaxTriggerCount and -MessageData (#29)
9+
* Simplifying event source registration (any `@*` script or function) (#30)
10+
* Making one-time event sources more efficient (#31)
11+
12+
---
13+
14+
## Eventful 0.1.7:
215
* Adding On@CommandNotFound event source (Fixes #11)
316
* Watch-Event now allows eventsources -recursively (Fixes #15)
417

518
---
619

7-
## 0.1.6
20+
## Eventful 0.1.6
821
* Adding LocationChanged event source (Fixes #12)
922

1023
---
1124

12-
## 0.1.5
25+
## Eventful 0.1.5
1326
* Adding On@Event (#2)
1427
* Send-Event support for piping existing events (#4)
1528
* Adding /docs (#5)
1629

1730
---
1831

19-
## 0.1.4
32+
## Eventful 0.1.4
2033

2134
* Module Rebranded to Eventful.
2235
* Get-EventHandler added
2336

2437
---
2538

26-
## 0.1.3
39+
## Eventful 0.1.3
2740
New Event Source:
2841
* VariableSet
2942

@@ -34,15 +47,15 @@ Bugfix: On@Repeat now actually starts it's timer.
3447

3548
---
3649

37-
## 0.1.2
50+
## Eventful 0.1.2
3851
New Event Source:
3952
* UDP
4053

4154
PowerShellAsync Event Source now allows for a -Parameter dictionaries.
4255

4356
---
4457

45-
## 0.1.1
58+
## Eventful 0.1.1
4659
New Event Sources:
4760
* HTTPResponse
4861
* PowerShellAsync
@@ -54,11 +67,13 @@ New Event Source Capabilities:
5467
Event Sources can now return an InitializeEvent property or provide a ComponentModel.InitializationEvent attribute.
5568
This will be called directly after the subscription is created, so as to avoid signalling too soon.
5669

57-
## 0.1
70+
---
71+
72+
## Eventful 0.1
73+
5874
Initial Module Release.
5975

6076
Fun simple event syntax (e.g. on mysignal {"do this"} or on delay "00:00:01" {"do that"})
6177
Better pipelining support for Sending events.
6278

63-
---
64-
'@
79+
---

@Delay.ps1 renamed to EventSources/@Delay.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ $Wait
1616
)
1717

1818
process {
19-
$timer = New-Object Timers.Timer -Property @{Interval=$Wait.TotalMilliseconds;AutoReset=$false}
19+
$timer = New-Object Timers.Timer -Property @{Interval=$Wait.TotalMilliseconds;AutoReset=$false}
20+
$timer |
21+
Add-Member NoteProperty EventName Elapsed -PassThru |
22+
Add-Member NoteProperty MaxTriggerCount 1 -PassThru
2023
$timer.Start()
21-
$timer | Add-Member NoteProperty EventName Elapsed -PassThru
2224
}
File renamed without changes.

EventSources/@HttpResponse.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,15 @@ $TransferEncoding = $([Text.Encoding]::UTF8)
5858

5959
process {
6060
# Clear the event subscriber if one exists.
61-
$eventSubscriber = Get-EventSubscriber -SourceIdentifier "@HttpResponse_Check" -ErrorAction SilentlyContinue
61+
$eventSubscriber = Get-EventSubscriber -SourceIdentifier "@HttpResponse_Check" -ErrorAction Ignore
6262
if ($eventSubscriber) {$eventSubscriber | Unregister-Event}
6363

6464
# Create a new subscriber for the request.
6565
$httpResponseCheckTimer = New-Object Timers.Timer -Property @{
6666
Interval = $PollingInterval.TotalMilliseconds # Every pollinginterval,
6767
AutoReset = $true
6868
}
69+
6970
$HttpResponseChecker =
7071
Register-ObjectEvent -InputObject $httpResponseCheckTimer -EventName Elapsed -Action {
7172
$toCallEnd = # check to see if any requests have completed.

EventSources/@PowerShellAsync.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ process {
8383
$psAsync |
8484
Add-Member NoteProperty SourceIdentifier @(
8585
"PowerShell.Async.$($psAsync.InstanceID)","PowerShell.Async.Failed.$($psAsync.InstanceID)"
86-
) -Force -PassThru
86+
) -Force -PassThru |
87+
Add-Member MaxTriggerCount 1 -Force -PassThru
8788

8889
return
8990
}

EventSources/@Process.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<#
1+
<#
22
.Synopsis
33
Watches a process.
44
.Description
@@ -48,7 +48,7 @@ process {
4848
Add-Member EventName $eventNames -Force -PassThru
4949
} else {
5050
Get-Process -Id $ProcessID |
51-
Add-Member EventName "Exited" -Force -PassThru
51+
Add-Member EventName "Exited" -Force -PassThru |
52+
Add-Member MaxTriggerCount 1 -Force -PassThru
5253
}
53-
5454
}
File renamed without changes.

0 commit comments

Comments
 (0)