tods-competition-factory 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -14
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.d.ts +359 -145
- package/dist/tods-competition-factory.development.cjs.js +398 -177
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Tournament Business Rules
|
|
8
8
|
|
|
9
|
-
The **Competition Factory** is a collection of
|
|
9
|
+
The **Competition Factory** is a collection of functions for transforming/mutating tournament records and is intended to ensure the integrity of Tournaments by managing all state transformations. Factory functions embody the "business rules" required by Tournament Management Solutions, and enable an entirely new way of constructing software to manage tournaments.
|
|
10
10
|
|
|
11
11
|
The rules governing the creation of draws, seeding, and participant movement can be present on a standalone client, on a server, or both.
|
|
12
12
|
An entire tournament management solution [can run in a browser](https://courthive.github.io/TMX/), or a client can communicate with a server which utilizes a database, or simply the file system.
|
|
@@ -23,26 +23,14 @@ After a tournament has been completed, a **TODS** file can be considered a "time
|
|
|
23
23
|
|
|
24
24
|
## State Engines
|
|
25
25
|
|
|
26
|
-
Competition Factory engines
|
|
27
|
-
Engine methods which mutate/transform operate on documents which are held in state.
|
|
28
|
-
The **competitionEngine**, **tournamentEngine** and **scaleEngine** share a state which contains one or more _tournamentRecords_;
|
|
29
|
-
while the **drawEngine** and **matchUpEngine** have their own state.
|
|
26
|
+
The **Competition Factory** includes synchronous and asynchronous "state engines" which provide services for managing the state of a tournament record as well as subscriptions, notifications and logging.
|
|
30
27
|
|
|
31
28
|
By default a deep copy of documents are made as they are loaded into each state engine. This behavior can be overridden such that the engines operate on original documents.
|
|
32
29
|
|
|
33
|
-
1. [**competitionEngine**](./engines/competition-engine-overview) - manages resources which may be shared across multiple linked tournaments, such as venues (courts & other locations); includes advanced scheduling and cross-tournament reporting.
|
|
34
|
-
2. [**tournamentEngine**](./engines/tournament-engine-overview) - manages tournament metadata, participants, events (including the generation of complex draw types and "flights" within events), and reporting.
|
|
35
|
-
3. [**drawEngine**](./engines/draw-engine-overview) - generates drawDefinitions and matchUp results; manages participant seeding and movement within and between draw structures.
|
|
36
|
-
4. [**matchUpEngine**](./engines/matchUp-engine-overview) - methods to manipulate tieFormats, analyze arrays of matchUps, and report on matchUp scores.
|
|
37
|
-
5. [**scaleEngine**](./engines/scale-engine-overview) - methods to generate ranking points and calculate ratings.
|
|
38
|
-
|
|
39
30
|
## Other Utilities
|
|
40
31
|
|
|
41
32
|
1. [**mocksEngine**](./overview/mocks-engine-overview) - generates complete tournament objects, or tournamentRecords, as well as mock persons, participants and matchUp outcomes.
|
|
42
33
|
It is used extensively in the ~1900 tests that are run against the factory methods before every package release.
|
|
43
|
-
2. [**scoreGovernor**](./scoreGovernor) - is a collection of scoring related utilities which provide analysis/validation or generate values, but do not make any mutations.
|
|
44
|
-
3. [**matchUpFormatCode**](./codes/matchup-format) - is an ITF matchUp format code parser, stringifier, and validator.
|
|
45
|
-
4. [**ageCategoryCode**](./codes/age-category) - is an ITF ageCategoryCode parser.
|
|
46
34
|
|
|
47
35
|
## Installation
|
|
48
36
|
|