@vixoniccom/footbal-score 1.4.2 → 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.
@@ -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
@@ -0,0 +1,10 @@
1
+ {
2
+ "parameters": {
3
+ "league": 1,
4
+ "timeStart": "10 am",
5
+ "timeEnd": "1 am",
6
+ "matchesYesterday": false,
7
+ "matchesTomorrow": false,
8
+ "itemsPerPage": 2
9
+ }
10
+ }
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.2",
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": "^18.3.1",
24
- "react-dom": "^18.3.1"
23
+ "react": "^17.0.2",
24
+ "react-dom": "^17.0.2"
25
25
  },
26
26
  "devDependencies": {
27
- "@types/react": "^18.3.23",
28
- "@types/react-dom": "^18.3.7",
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 = Intl.DateTimeFormat().resolvedOptions().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
- const response = await axios.request(options)
31
- return response.data.response
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
  }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "parameters": {
3
- "league": 265,
4
- "timeStart": "1 am",
5
- "timeEnd": "11 pm",
6
- "matchesYesterday": true,
7
- "matchesTomorrow": true,
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
  }