@jayesol/jayeson.model 2.0.0 → 2.1.0-beta.1202
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 +15 -1
- package/lib/filter.d.ts +1 -2
- package/lib/filter.js +4 -2
- package/package.json +34 -34
- package/changelog.md +0 -15
package/README.md
CHANGED
|
@@ -21,4 +21,18 @@ compareTo
|
|
|
21
21
|
|
|
22
22
|
## 9. Add an example of the new rule to ruleCombination.ts, then follow the instructions at the top of ruleCombination.ts to generate ruleCombination.json
|
|
23
23
|
|
|
24
|
-
## 10. Add the checks for the new rule to FilterRuleDeserializationTest.java and run that class to verify the deserialization.
|
|
24
|
+
## 10. Add the checks for the new rule to FilterRuleDeserializationTest.java and run that class to verify the deserialization.
|
|
25
|
+
|
|
26
|
+
## CI/CD guideline
|
|
27
|
+
|
|
28
|
+
### Publish
|
|
29
|
+
|
|
30
|
+
- Publish for non prod repo:
|
|
31
|
+
```
|
|
32
|
+
publish: snapshot
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Publish for production repo:
|
|
36
|
+
```
|
|
37
|
+
publish: prod
|
|
38
|
+
```
|
package/lib/filter.d.ts
CHANGED
|
@@ -153,9 +153,8 @@ export class StartTimeRangeFilterRule extends AbstractRule {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
export class RelativeStartTimeRangeFilterRule extends AbstractRule {
|
|
156
|
-
constructor(isNegated: boolean,
|
|
156
|
+
constructor(isNegated: boolean, startTimeLower: number, startTimeUpper: number);
|
|
157
157
|
|
|
158
|
-
baseTime: number;
|
|
159
158
|
startTimeLower: number;
|
|
160
159
|
startTimeUpper: number;
|
|
161
160
|
}
|
package/lib/filter.js
CHANGED
|
@@ -354,14 +354,16 @@ function StartTimeRangeFilterRule(isNegated, startTimeLower, startTimeUpper) {
|
|
|
354
354
|
/**
|
|
355
355
|
* RelativeStartTimeRangeFilterRule is the input for FilterRuleDeserializer
|
|
356
356
|
* in jayeson.model s an instance of RelativeStartTimeRangeFilterRule.
|
|
357
|
+
*
|
|
358
|
+
* It will not have a baseTime field as the base time will be the next 12pm
|
|
359
|
+
* set in the relayer based on the relayer host's time.
|
|
357
360
|
* @param isNegated
|
|
358
361
|
* @param startTimeLower in second
|
|
359
362
|
* @param startTimeUpper in second
|
|
360
363
|
*/
|
|
361
364
|
|
|
362
|
-
function RelativeStartTimeRangeFilterRule(isNegated,
|
|
365
|
+
function RelativeStartTimeRangeFilterRule(isNegated, startTimeLower, startTimeUpper) {
|
|
363
366
|
var obj = AbstractRule(isNegated, 17);
|
|
364
|
-
obj.baseTime = baseTime;
|
|
365
367
|
obj.startTimeLower = startTimeLower;
|
|
366
368
|
obj.startTimeUpper = startTimeUpper;
|
|
367
369
|
return obj;
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jayesol/jayeson.model",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Javascript implementation for jayeson.model library",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"types": "lib/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "gulp test",
|
|
9
|
-
"prepare": "gulp dist"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"model"
|
|
16
|
-
],
|
|
17
|
-
"author": "",
|
|
18
|
-
"license": "ISC",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@jayesol/jayeson.lib.record": "^2.0.
|
|
21
|
-
"gulp-uglify": "^3.0.0",
|
|
22
|
-
"typescript": "^
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/jasmine": "^2.5.52",
|
|
26
|
-
"del": "^3.0.0",
|
|
27
|
-
"glob": "^7.1.2",
|
|
28
|
-
"gulp": "^
|
|
29
|
-
"gulp-install": "^1.1.0",
|
|
30
|
-
"gulp-jasmine": "^2.4.2",
|
|
31
|
-
"gulp-typescript": "^3.1.6",
|
|
32
|
-
"jasmine": "^2.6.0"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jayesol/jayeson.model",
|
|
3
|
+
"version": "2.1.0-beta.1202",
|
|
4
|
+
"description": "Javascript implementation for jayeson.model library",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "gulp test",
|
|
9
|
+
"prepare": "gulp dist"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"model"
|
|
16
|
+
],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@jayesol/jayeson.lib.record": "^2.1.0-beta.1202",
|
|
21
|
+
"gulp-uglify": "^3.0.0",
|
|
22
|
+
"typescript": "^3.9.7"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/jasmine": "^2.5.52",
|
|
26
|
+
"del": "^3.0.0",
|
|
27
|
+
"glob": "^7.1.2",
|
|
28
|
+
"gulp": "^4.0.2",
|
|
29
|
+
"gulp-install": "^1.1.0",
|
|
30
|
+
"gulp-jasmine": "^2.4.2",
|
|
31
|
+
"gulp-typescript": "^3.1.6",
|
|
32
|
+
"jasmine": "^2.6.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/changelog.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# v2.2.0
|
|
2
|
-
* Refactor the model project to make it use dependency injection
|
|
3
|
-
* Remove unnecessary interface methods, making the model simpler and more straight forward
|
|
4
|
-
* Remove complicated DataAdapter and BetSubmitter discovery. Everything is done through Guice now, giving application
|
|
5
|
-
more familiar way to provides Adapter and Submitter to their models.
|
|
6
|
-
* Separate the project into three source sets:
|
|
7
|
-
* main - contains the api
|
|
8
|
-
* adapter - contains a basic implementation of the feed adapter
|
|
9
|
-
* filter - contains a set of filter used for filtering soccer data
|
|
10
|
-
|
|
11
|
-
## Important notes:
|
|
12
|
-
The data filtered using the ```filter``` source sets is not suitable to be refiltered as the soccer event
|
|
13
|
-
produced by the filtering process doesn't support a full set of functionalities as specified by the ```SoccerEvent```
|
|
14
|
-
interface from ```jayeson.lib.record```. Using methods such as ```hasSportbook``` on the event produced from
|
|
15
|
-
the filters will throw unsupported operation exception.
|