@vixoniccom/footbal-score 1.4.2-dev.0 → 1.4.3-dev.0
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/.env +1 -1
- package/CHANGELOG.md +9 -0
- package/build/index.html +1 -0
- package/build/main.js +2 -0
- package/build/main.js.LICENSE.txt +61 -0
- package/build/test/downloads/4a9bcc4e-f398-4317-9f0f-afa8bcef1a4f.png +0 -0
- package/build/test/downloads/7953953c-7029-4730-ae4d-cff4abd5288f.ttf +0 -0
- package/build/test/downloads/Roboto-Bold.ttf +0 -0
- package/build/test/downloads/Spring in May.ttf +0 -0
- package/build/test/downloads/c705a739-312e-4334-9231-e73a05e9d382.ttf +0 -0
- package/build/test/downloads/cumples.png +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/Foto prueba.jpg +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb/foto1.jpg +0 -0
- package/build/test/downloads/d1093778-f3c9-42c8-9b07-9f8736390aeb.zip +0 -0
- package/build/test/downloads/fondopasto.jpg +0 -0
- package/build/test/parameters.json +10 -0
- package/build.zip +0 -0
- package/package.json +5 -5
- package/src/helpers/getFixture.ts +15 -3
- package/src/test/parameters.json +5 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*!
|
|
8
|
+
localForage -- Offline Storage, Improved
|
|
9
|
+
Version 1.10.0
|
|
10
|
+
https://localforage.github.io/localForage
|
|
11
|
+
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
* Lodash <https://lodash.com/>
|
|
17
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
18
|
+
* Released under MIT license <https://lodash.com/license>
|
|
19
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
20
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** @license React v0.20.2
|
|
24
|
+
* scheduler.production.min.js
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/** @license React v17.0.2
|
|
33
|
+
* react-dom.production.min.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/** @license React v17.0.2
|
|
42
|
+
* react-jsx-runtime.production.min.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/** @license React v17.0.2
|
|
51
|
+
* react.production.min.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
//! moment.js
|
|
60
|
+
|
|
61
|
+
//! moment.js locale configuration
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixoniccom/footbal-score",
|
|
3
3
|
"alias": "Resultados Deportivos",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.3-dev.0",
|
|
5
5
|
"description": "Muestra resultados en vivo de fútbol.",
|
|
6
6
|
"main": "main.js",
|
|
7
7
|
"author": "",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"axios": "^1.6.0",
|
|
21
21
|
"localforage": "^1.10.0",
|
|
22
22
|
"moment": "^2.29.3",
|
|
23
|
-
"react": "^
|
|
24
|
-
"react-dom": "^
|
|
23
|
+
"react": "^17.0.2",
|
|
24
|
+
"react-dom": "^17.0.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/react": "^
|
|
28
|
-
"@types/react-dom": "^
|
|
27
|
+
"@types/react": "^17.0.0",
|
|
28
|
+
"@types/react-dom": "^17.0.0",
|
|
29
29
|
"@vixoniccom/module-packager": "^2.13.0",
|
|
30
30
|
"@vixoniccom/modules": "^2.21.0",
|
|
31
31
|
"standard-version": "^9.5.0"
|
|
@@ -18,7 +18,14 @@ export const getFixture = async (league: string, yesterday?: boolean, tomorrow?:
|
|
|
18
18
|
const year = moment().format('YYYY')
|
|
19
19
|
const from = yesterday ? moment(Date.now() - MILLISECONDS_PER_DAY).format('YYYY-MM-DD') : today
|
|
20
20
|
const to = tomorrow ? moment(Date.now() + MILLISECONDS_PER_DAY).format('YYYY-MM-DD') : today
|
|
21
|
-
const timezone =
|
|
21
|
+
const timezone = (() => {
|
|
22
|
+
try {
|
|
23
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
24
|
+
return tz
|
|
25
|
+
} catch (error) {
|
|
26
|
+
return 'UTC'
|
|
27
|
+
}
|
|
28
|
+
})()
|
|
22
29
|
|
|
23
30
|
const options = {
|
|
24
31
|
method: 'GET',
|
|
@@ -27,6 +34,11 @@ export const getFixture = async (league: string, yesterday?: boolean, tomorrow?:
|
|
|
27
34
|
headers: { 'X-RapidAPI-Key': FOOTBALL_API_KEY, 'X-RapidAPI-Host': FOOTBALL_API_HOST },
|
|
28
35
|
}
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
try {
|
|
38
|
+
const response = await axios.request(options)
|
|
39
|
+
return response.data.response
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(error)
|
|
42
|
+
return []
|
|
43
|
+
}
|
|
32
44
|
}
|
package/src/test/parameters.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"parameters": {
|
|
3
|
-
"league":
|
|
4
|
-
"timeStart": "
|
|
5
|
-
"timeEnd": "
|
|
6
|
-
"matchesYesterday":
|
|
7
|
-
"matchesTomorrow":
|
|
3
|
+
"league": 1,
|
|
4
|
+
"timeStart": "10 am",
|
|
5
|
+
"timeEnd": "1 am",
|
|
6
|
+
"matchesYesterday": false,
|
|
7
|
+
"matchesTomorrow": false,
|
|
8
8
|
"itemsPerPage": 2
|
|
9
9
|
}
|
|
10
10
|
}
|