overtime-live-trading-utils 0.0.161 → 0.0.162
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/.circleci/config.yml +5 -1
- package/codecov.yml +20 -0
- package/main.js +1 -1
- package/package.json +5 -2
- package/src/constants/common.ts +3 -0
- package/src/constants/sports.ts +157 -1417
- package/src/enums/sports.ts +40 -172
- package/src/tests/mock/MockLeagueMap.ts +14 -12
- package/src/tests/mock/MockOpticSoccer.ts +75 -0
- package/src/tests/unit/bookmakers.test.ts +3 -3
- package/src/tests/unit/markets.test.ts +10 -10
- package/src/tests/unit/odds.test.ts +4 -4
- package/src/tests/unit/spread.test.ts +102 -2
- package/src/types/missing-types.d.ts +2 -0
- package/src/types/odds.ts +28 -17
- package/src/types/sports.ts +3 -1
- package/src/utils/bookmakers.ts +1 -1
- package/src/utils/constraints.ts +44 -76
- package/src/utils/gameMatching.ts +9 -16
- package/src/utils/markets.ts +18 -12
- package/src/utils/odds.ts +195 -42
- package/src/utils/opticOdds.ts +112 -58
- package/src/utils/sports.ts +7 -39
- package/src/utils/spread.ts +33 -2
- package/tsconfig.json +8 -3
package/.circleci/config.yml
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
version: 2.1
|
|
2
|
+
orbs:
|
|
3
|
+
codecov: codecov/codecov@4.0.1
|
|
2
4
|
|
|
3
5
|
executors:
|
|
4
6
|
node-executor:
|
|
@@ -17,7 +19,9 @@ jobs:
|
|
|
17
19
|
|
|
18
20
|
- run:
|
|
19
21
|
name: Run tests
|
|
20
|
-
command: npm test
|
|
22
|
+
command: npm test -- --coverage
|
|
23
|
+
|
|
24
|
+
- codecov/upload
|
|
21
25
|
|
|
22
26
|
workflows:
|
|
23
27
|
version: 2
|
package/codecov.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# codecov.yml
|
|
2
|
+
|
|
3
|
+
# Specify the coverage rules
|
|
4
|
+
coverage:
|
|
5
|
+
precision: 2 # Number of decimal places for coverage percentages
|
|
6
|
+
round: down # Round coverage percentages down
|
|
7
|
+
range: '70...100' # Expected range of coverage (useful for enforcing quality gates)
|
|
8
|
+
|
|
9
|
+
# Adjust how Codecov processes reports
|
|
10
|
+
comment:
|
|
11
|
+
layout: 'reach, diff, flags' # Format of the PR comments
|
|
12
|
+
behavior: default # Default behavior for comments
|
|
13
|
+
require_changes: false # Only comment if changes occur in coverage
|
|
14
|
+
branches:
|
|
15
|
+
- main # Restrict comments to specific branches
|
|
16
|
+
|
|
17
|
+
# Custom CI configuration (if needed)
|
|
18
|
+
ci:
|
|
19
|
+
- circleci # Specify CircleCI as the CI provider
|
|
20
|
+
|