140 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
2023-03-22 23:53:10 +01:00
Kristjan ESPERANTO
d276a7ddb9
Use template literals instead of string concatenation (#3066)
We have used it inconsistently till now. Template literals are more
modern and easier to maintain in my opinion.

Because that's a large amount of changes, here's a way to reproduce it:
I added the rule `"prefer-template": "error"` to the `.eslintrc.json`
and did an autofix. Since this caused a new problem in line 409 of
`newsfeed.js`, I reversed it in that line and also removed the rule from
the eslint config file.

The rule is described here:
https://eslint.org/docs/latest/rules/prefer-template

Note: I've played around with some other linter rules as well, and some
seem to point to some specific, non-cosmetic, issues. But before I dive
even deeper and then introduce even bigger and hardly understandable
changes at once, I thought I'd start with this simple cosmetic rule.
2023-03-19 14:32:23 +01:00
Karsten Hassel
0023c64d59 use internal fetch function of node instead external node-fetch library if node version >= v18 2022-05-27 19:46:28 +02:00
Kristjan SCHMIDT
a5668b1b99 Magic Mirror -> MagicMirror²
Consistent spelling
2022-01-26 23:09:26 +01:00
Karsten Hassel
a9c4ad2895 update User-Agent-Header in calendarfetcher 2021-12-13 23:00:07 +01:00
veeck
06b3f92963 Refaktor calendar error once again for better messaging to the user 2021-05-19 11:12:56 +02:00
rejas
b212641069 Move checkFetchStatus into NodelHelper 2021-05-19 11:12:42 +02:00
rejas
90aa50bb11 Add fetcher_helper for calendar and newsfeed 2021-05-19 11:12:42 +02:00
config
5d99baac21 Fixing fetch option httpsAgent to agent in calendar module (#466) 2021-04-15 14:51:33 +02:00
veeck
8ea37a5a45 Fix left over self reference 2021-03-28 10:48:12 +02:00
rejas
b5dc91fd07 Remove now unnecessary require 2021-03-14 21:04:38 +01:00
rejas
52584f36d7 Fix base64 encoding for basic auth in calendar 2021-03-14 19:38:03 +01:00
rejas
71bd45dfd4 Fix errors introduced after latest rebase 2021-03-14 10:40:14 +01:00
rejas
05c3a5bf83 Remove self variable 2021-03-14 10:40:14 +01:00
rejas
c2f5d038de Move filter function into utils class too 2021-03-14 09:03:12 +01:00
rejas
0ac5032db9 Move filter function into seperate method 2021-03-14 08:59:50 +01:00
rejas
0b37ed072c Refactor fetcher methods into util class 2021-03-14 08:53:40 +01:00
Karsten Hassel
514b9453f8 removed getFetcher function 2021-03-06 21:19:14 +01:00
Karsten Hassel
504e7cadd7 getFetcher 2021-03-05 00:13:32 +01:00
Karsten Hassel
c80aeff945 fixes calendarfetcher 2021-03-04 21:12:53 +01:00
Karsten Hassel
1f9109f8e4 snapshot 2021-03-03 00:09:32 +01:00
Karsten Hassel
f09c54184a moved tests to fetch, run prettier 2021-03-02 21:26:25 +01:00
Karsten Hassel
92a35692f2 snapshot 2021-03-02 00:40:55 +01:00
Karsten Hassel
53e300bd31 snapshot 2021-03-02 00:17:13 +01:00
Michael Teeuw
2e2e157017
Merge pull request #2458 from codac/patch-2
This is supposed to make self signed certs work with the calendar module
2021-02-23 14:09:13 +01:00
config
5b270b84b4 linted calendarfetcher.js 2021-02-21 19:56:02 +01:00
Krouty
1aacc37c83
Added selfSignedCert as a parameter
Added selfSignedCert as a parameter, so that it can be enabled only when it is required.
2021-02-21 10:29:40 +01:00
Felix Wiedenbach
b18d98f5ea exposed logger as node module 2021-02-18 19:14:53 +01:00
Krouty
04491ac5ac
This is supposed to make self signed certs work with the calendar module
Many people use Own-/Nextcloud together witht he https protocol. This is supposed to make self-signed certificates work with the calendar module and fix the issue #466.
2021-02-13 17:13:00 +01:00
Michael Teeuw
0344399253 Fix prettier issue. 2020-12-08 15:40:46 +01:00
Michael Teeuw
cdb9b9bb87
Merge branch 'develop' into cal-again2 2020-12-08 15:17:45 +01:00
Michael Teeuw
c49386bb58
Merge branch 'develop' into issue-2022_catch-ical-parsing-errors 2020-12-08 15:13:34 +01:00
sam detweiler
137facf95a
Merge branch 'develop' into cal-again2 2020-11-28 19:23:15 -06:00
Sam Detweiler
9c5383dc37 fix between.from to use now, instead of yesterday for non-full day events, unless includePastEvents:true 2020-11-28 19:13:56 -06:00
Johan Alvinger
3c5d50bce9 Include all past events (if broadcastPastEvents set) and up to maximumEntries of current or upcoming events 2020-11-25 23:29:10 +01:00
Johan Alvinger
b735cb96a0 Fetch maximumEntries of current events (and all past events if
broadcastPastEvents is true)
2020-11-25 21:59:58 +01:00
Johan Alvinger
d00c25e107 Fetch maximumEntries of current events (and all past events if broadcastPastEvents is true) 2020-11-25 21:53:34 +01:00
Johan Alvinger
8a5e87b116 All events from the beginning of today were fetched but we only want
the ones that are ongoing or upcoming.
2020-11-24 23:17:26 +01:00
Johan Alvinger
2779d19d5c All events from the beginning of today were fetched but we only want the ones that are ongoing or upcoming. 2020-11-24 23:06:41 +01:00
rejas
ccf98c0c22 Surround ical parsing with try/catch to catch unknown bugs 2020-11-24 21:32:16 +01:00
Johan Alvinger
21284e7795 Reverted change in calendarfetcher so events are limited to maximumEntries 2020-11-24 14:52:08 +01:00
Johan Alvinger
839ca9ecfb Lines that were commented out has been removed 2020-11-24 00:23:55 +01:00
Johan Alvinger
1ba845fb06 Make calendarfetcher return all events, not just a slice 2020-11-23 21:53:20 +01:00
Sam Detweiler
12405b66d0 fix full date start time and duration, east of UTC, make getCorrection more understandable with variable name changes 2020-11-16 13:49:44 -06:00
Sam Detweiler
ecd0b6fa83 Merge branch 'develop' of https://github.com/MichMich/MagicMirror into cal-again 2020-11-16 09:50:09 -06:00
Sam Detweiler
3a8587378c fix full date start time and duration, east of UTC, make getCorrection more understandable with variable name changes 2020-11-16 10:32:29 -05:00
Sam Detweiler
9e5a9b5ced fix full date start time and duration, east of UTC, make getCorrection more understandable with variable name changes 2020-11-16 10:17:48 -05:00
rejas
0a58767563 Use Log.debug where applicable 2020-11-07 11:59:01 +01:00
Sam Detweiler
5d2f706c32 fix time offset calcs for any timezone 2020-11-01 09:05:33 -06:00
Sam Detweiler
844a59d880 one more offset only test 2020-10-28 13:10:24 -05:00