Skip to content

Commit

Permalink
Reverse actions end execution (#25)
Browse files Browse the repository at this point in the history
* Improved typing in engine and better use of await over promise chaining
Use Promise.resolve where applicable
Properly broadcast first frame event in request-animation-frame-timeline-provider

* Lots of type narrowing

* Implement type guards

* Add integration test for reversed end action execution order

* Update changelog, bump version and new docs
  • Loading branch information
rolandzwaga authored Oct 31, 2022
1 parent 6dbc52f commit e90c67a
Show file tree
Hide file tree
Showing 262 changed files with 1,524 additions and 1,193 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.0.14
- Fix reversed execution of actions in the end phase
- Some internal refactoring, renaming and type narrowing

## 1.0.13
- Fix RAF timeline provider broadcast of position zero on the timeline
- Make all operationData properties optional for 'actions' collection in JSON schema
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/classes/Action.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/classes/ActionRegistryEventbusListener.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/IEventbusListener.html" class="tsd-signature-type" data-tsd-kind="Interface">IEventbusListener</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/eventbus/actionregistry-eventbus-listener.ts#L4">eventbus/actionregistry-eventbus-listener.ts:4</a></li></ul></aside>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/eventbus/actionregistry-eventbus-listener.ts#L4">eventbus/actionregistry-eventbus-listener.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -57,7 +57,7 @@ <h2>Properties</h2>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_action<wbr/>Registry</span><a href="#_actionRegistry" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_action<wbr/>Registry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/IAction.html" class="tsd-signature-type" data-tsd-kind="Interface">IAction</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/eventbus/actionregistry-eventbus-listener.ts#L5">eventbus/actionregistry-eventbus-listener.ts:5</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/eventbus/actionregistry-eventbus-listener.ts#L5">eventbus/actionregistry-eventbus-listener.ts:5</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="handleEvent" class="tsd-anchor"></a>
Expand All @@ -77,7 +77,7 @@ <h5>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/IEventbusListener.html">IEventbusListener</a>.<a href="../interfaces/IEventbusListener.html#handleEvent">handleEvent</a></p>
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/eventbus/actionregistry-eventbus-listener.ts#L21">eventbus/actionregistry-eventbus-listener.ts:21</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/eventbus/actionregistry-eventbus-listener.ts#L21">eventbus/actionregistry-eventbus-listener.ts:21</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="registerAction" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>register<wbr/>Action</span><a href="#registerAction" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand All @@ -94,7 +94,7 @@ <h5>eventName: <span class="tsd-signature-type">string</span></h5></li>
<h5><code class="tsd-tag ts-flagOptional">Optional</code> eventTopic: <span class="tsd-signature-type">string</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/eventbus/actionregistry-eventbus-listener.ts#L7">eventbus/actionregistry-eventbus-listener.ts:7</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/eventbus/actionregistry-eventbus-listener.ts#L7">eventbus/actionregistry-eventbus-listener.ts:7</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
10 changes: 5 additions & 5 deletions docs/classes/ConfigurationResolver.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/IConfigurationResolver.html" class="tsd-signature-type" data-tsd-kind="Interface">IConfigurationResolver</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/configuration/configuration-resolver.ts#L22">configuration/configuration-resolver.ts:22</a></li></ul></aside>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/configuration/configuration-resolver.ts#L24">configuration/configuration-resolver.ts:24</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -59,19 +59,19 @@ <h5>importer: <a href="../interfaces/ISimpleResourceImporter.html" class="tsd-si
<h5>eventbus: <a href="../interfaces/IEventbus.html" class="tsd-signature-type" data-tsd-kind="Interface">IEventbus</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="ConfigurationResolver.html" class="tsd-signature-type" data-tsd-kind="Class">ConfigurationResolver</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/configuration/configuration-resolver.ts#L23">configuration/configuration-resolver.ts:23</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/configuration/configuration-resolver.ts#L25">configuration/configuration-resolver.ts:25</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="eventbus" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>eventbus</span><a href="#eventbus" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">eventbus<span class="tsd-signature-symbol">:</span> <a href="../interfaces/IEventbus.html" class="tsd-signature-type" data-tsd-kind="Interface">IEventbus</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/configuration/configuration-resolver.ts#L25">configuration/configuration-resolver.ts:25</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/configuration/configuration-resolver.ts#L27">configuration/configuration-resolver.ts:27</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="importer" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>importer</span><a href="#importer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">importer<span class="tsd-signature-symbol">:</span> <a href="../interfaces/ISimpleResourceImporter.html" class="tsd-signature-type" data-tsd-kind="Interface">ISimpleResourceImporter</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/configuration/configuration-resolver.ts#L24">configuration/configuration-resolver.ts:24</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/configuration/configuration-resolver.ts#L26">configuration/configuration-resolver.ts:26</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="process" class="tsd-anchor"></a>
Expand All @@ -89,7 +89,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> actionRegistryListener
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/IAction.html" class="tsd-signature-type" data-tsd-kind="Interface">IAction</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/IResolvedEngineConfiguration.html" class="tsd-signature-type" data-tsd-kind="Interface">IResolvedEngineConfiguration</a><span class="tsd-signature-symbol">]</span></h4><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/IConfigurationResolver.html">IConfigurationResolver</a>.<a href="../interfaces/IConfigurationResolver.html#process">process</a></p>
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/configuration/configuration-resolver.ts#L28">configuration/configuration-resolver.ts:28</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/configuration/configuration-resolver.ts#L30">configuration/configuration-resolver.ts:30</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/DevToolEventListener.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/IEventbusListener.html" class="tsd-signature-type" data-tsd-kind="Interface">IEventbusListener</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/devtool-event-lister.ts#L5">diagnostics/devtool-event-lister.ts:5</a></li></ul></aside>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/devtool-event-lister.ts#L5">diagnostics/devtool-event-lister.ts:5</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -56,14 +56,14 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5>agent: <a href="../interfaces/IDiagnosticsAgent.html" class="tsd-signature-type" data-tsd-kind="Interface">IDiagnosticsAgent</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="DevToolEventListener.html" class="tsd-signature-type" data-tsd-kind="Class">DevToolEventListener</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/devtool-event-lister.ts#L6">diagnostics/devtool-event-lister.ts:6</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/devtool-event-lister.ts#L6">diagnostics/devtool-event-lister.ts:6</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="agent" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>agent</span><a href="#agent" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">agent<span class="tsd-signature-symbol">:</span> <a href="../interfaces/IDiagnosticsAgent.html" class="tsd-signature-type" data-tsd-kind="Interface">IDiagnosticsAgent</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/devtool-event-lister.ts#L6">diagnostics/devtool-event-lister.ts:6</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/devtool-event-lister.ts#L6">diagnostics/devtool-event-lister.ts:6</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="handleEvent" class="tsd-anchor"></a>
Expand All @@ -83,7 +83,7 @@ <h5>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/IEventbusListener.html">IEventbusListener</a>.<a href="../interfaces/IEventbusListener.html#handleEvent">handleEvent</a></p>
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/devtool-event-lister.ts#L8">diagnostics/devtool-event-lister.ts:8</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/devtool-event-lister.ts#L8">diagnostics/devtool-event-lister.ts:8</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/Diagnostics.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Diagnostics</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/diagnostics.ts#L3">diagnostics/diagnostics.ts:3</a></li></ul></aside>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/diagnostics.ts#L3">diagnostics/diagnostics.ts:3</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -52,7 +52,7 @@ <h2>Properties</h2>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>active</span><a href="#active" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">active<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/diagnostics.ts#L7">diagnostics/diagnostics.ts:7</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/diagnostics.ts#L7">diagnostics/diagnostics.ts:7</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="send" class="tsd-anchor"></a>
Expand All @@ -69,7 +69,7 @@ <h5>_name: <a href="../types/TDiagnosticType.html" class="tsd-signature-type" da
<h5>_data: <span class="tsd-signature-type">any</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/9c586f7/src/diagnostics/diagnostics.ts#L4">diagnostics/diagnostics.ts:4</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/rolandzwaga/eligius/blob/f0db4bb/src/diagnostics/diagnostics.ts#L4">diagnostics/diagnostics.ts:4</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
Loading

0 comments on commit e90c67a

Please sign in to comment.