Commit Graph

344 Commits

Author SHA1 Message Date
xeruf 864a3739b3 fix: adjust ical.js to fix import
https://github.com/kewisch/ical.js/issues/329
2024-11-14 13:45:23 +01:00
Ryan Mwangi 495fb57675 refactor:create gitattributes file 2024-11-14 15:12:43 +03:00
Ryan Mwangi ff32bb430d Merge remote-tracking branch 'contrib/master' 2024-11-14 14:04:47 +03:00
Ryan Mwangi 9a0a62675c fix:add ical.js and ical.timezones.js files in lib 2024-11-14 03:02:54 +03:00
xeruf 0a863a4eb2 test(calendarUtil): failing ical test 2024-11-13 17:43:13 +01:00
Ryan Mwangi a94727df56 build:install luxon to handle timezone parsing 2024-11-13 15:45:53 +03:00
Ryan Mwangi 7e2b846029 build:install date-fns and date-fns-tz to handle timezones 2024-11-13 15:18:25 +03:00
Ryan Mwangi cbdfdf6c97 test:update test forhandling timezones 2024-11-13 15:17:17 +03:00
Ryan Mwangi 2e9de0749d fix:handle timebased events 2024-11-13 02:54:42 +03:00
Ryan Mwangi d08d87f47c test:get date based calendar test to run 2024-11-12 23:23:59 +03:00
Ryan Mwangi 0114c94caa fix: get DTSTAMP to get parsed correctly and remain the same as the original 2024-11-12 23:13:56 +03:00
Ryan Mwangi e8582cd411 test:add logging to ensure DTSTAMP is correctly added to the new event 2024-11-12 22:53:25 +03:00
Ryan Mwangi 665c134597 test(in-progress): run tests for date based calendar 2024-11-12 22:40:28 +03:00
ryanmwangi 0b0ecaa0c2 Merge pull request 'test: preserve date-based calendar' (#4) from janek/CalMerger:master into master
Reviewed-on: #4
2024-11-12 15:38:31 +00:00
xeruf 4032e2c49d test: preserve date-based calendar 2024-11-12 16:20:53 +01:00
Ryan Mwangi 441f4d2fb3 test:set up initial structure for unit tests for fetchCalendarData function 2024-11-11 22:32:12 +03:00
Ryan Mwangi 8c0de14d5f refactor: move server.js and app.js into src directory 2024-11-11 20:14:49 +03:00
Ryan Mwangi af980956cb test:edit expected outcome file for override calendar 2024-11-11 20:01:58 +03:00
Ryan Mwangi 5d7bdb6878 refactor:streamlined server file 2024-11-11 19:57:56 +03:00
Ryan Mwangi df37f35ace refactor: separated route logic from server startup 2024-11-11 19:45:44 +03:00
Ryan Mwangi 2a0fe0812e refactor: move utility functions to calendarUtil.js 2024-11-11 19:34:53 +03:00
Ryan Mwangi 3b590958a0 test: run tests to check the produced output against the expected output 2024-11-11 14:03:37 +03:00
Ryan Mwangi 299b8c1404 refactor: serve static files from a dedicated directory 2024-11-11 13:47:18 +03:00
Ryan Mwangi be6d378890 style: refactor async functions to use traditional function declaration syntax
- Converted async arrow functions to traditional function declarations for consistency
- Updated  and  to use  syntax
- Maintained overall functionality while improving readability and alignment with preferred style
2024-11-08 15:49:33 +03:00
Ryan Mwangi 11a4efe30b fix: ensure valid date-time handling in event components
- Resolved calendar merging error where ICAL.js rejected formatted date-time strings by refactoring  and  initialization to use  for accurate timezone conversion.
- Updated  and  to receive ICAL.Time objects directly, ensuring proper format consistency and timezone handling in event components.
2024-11-08 14:23:30 +03:00
Ryan Mwangi db78a0121e refactor: Refactor addEventsToCalendar to properly handle date validation and usage
- Updated the handling of start and end dates in the addEventsToCalendar function.
- Added validation checks directly on startDate and endDate to ensure they are valid before updating event properties.
- Improved logging for better traceability of event addition and date handling.

Note: The changes are intended to enhance the handling of date properties, but further testing is required to ensure full functionality.
2024-11-08 02:21:22 +03:00
Ryan Mwangi 1bb1db7326 logging: log result.data as I debug. correct synta as wellx 2024-11-07 20:37:23 +03:00
Ryan Mwangi 73135dd9d4 refactor: use ical.js to generate calendar merged and refreshed calendars 2024-11-07 20:27:43 +03:00
Ryan Mwangi 41687e1e22 remove: tests directory 2024-11-07 20:17:37 +03:00
Ryan Mwangi 8e143df754 refactor: replace event addition with ical.js
- transition event processing from ical-generator to ical.js
- add logging for event addition to calendar component
- preserve event details (uid, summary, start, end) in new event components
2024-11-07 20:11:48 +03:00
Ryan Mwangi ffd2fa5370 refactor: switch calendar component creation to ical.js
- replace ical-generator with ical.js for VCALENDAR creation
- add logging for component creation process
- set component metadata (prodid, version, name) using ical.js
2024-11-07 20:06:07 +03:00
Ryan Mwangi 1c241c0738 chore: add calendar directory to .gitignore 2024-11-07 16:05:18 +03:00
Ryan Mwangi 69f2f71a2d test: add test for merging calendars in different timezones and merging date-based and time-based calendars 2024-11-07 16:04:21 +03:00
Ryan Mwangi 708144baa6 test: introduce new shorter calendar test files 2024-11-07 15:32:18 +03:00
Ryan Mwangi b32696f14c refactor: refactor endpoint to serve refreshed merge calendars 2024-11-07 14:43:41 +03:00
Ryan Mwangi cdc25981b5 refactor: streamline calendar refresh logic with refreshCalendarData helper 2024-11-07 14:35:25 +03:00
Ryan Mwangi 1dde451f9d refactor: refactor endpoint to merge calendars 2024-11-07 14:33:24 +03:00
Ryan Mwangi 00f5fedb2a refactor: encapsulate calendar file saving with saveCalendarFile helper 2024-11-07 14:25:02 +03:00
Ryan Mwangi 1bc7119b08 refactor: modularize event merging with mergeCalendarEvents helper 2024-11-07 14:23:24 +03:00
Ryan Mwangi 0c61cb0e7c refactor: centralize calendar data retrieval with fetchCalendarData helper 2024-11-07 14:20:56 +03:00
Ryan Mwangi af74d809c4 refactor: refactor sanitizeFilename utility that ensures valid file names 2024-11-07 14:18:18 +03:00
Ryan Mwangi cf10a62049 refactor: streamline static file serving 2024-11-07 14:11:09 +03:00
xeruf 495557e6c2 refactor: add starter script 2024-11-07 10:28:11 +01:00
xeruf 5b3a47a122 test: run tests and keep assets in subdirectory 2024-11-07 10:20:56 +01:00
xeruf 8eb44e18f6 fix(server.js): properly propagate errors 2024-11-07 10:15:37 +01:00
Ryan Mwangi 6c9fb1139f fix(tests): ensure calendar file path is correct
- Updated file path in merge date-based calendar test to point to the 'calendar' directory within TEST_MERGED_CALENDARS_DIR.
2024-11-07 03:44:11 +03:00
Ryan Mwangi 188a2b713c Merge remote-tracking branch 'contrib/master' 2024-11-07 02:22:18 +03:00
Ryan Mwangi 4fce46c57e test: changes on temp folder 2024-11-07 02:18:12 +03:00
xeruf 2a9af9c1d5 test: rearrange test directories
WIP - need to adjust code to use proper working directory
2024-11-06 20:58:29 +01:00
Ryan Mwangi 9f036b43cd chore: Remove debug log for merged calendars directory
- Eliminated console log statement that outputs the merged calendars directory path.
- Cleans up the server output and reduces unnecessary logging.
2024-11-06 15:30:19 +03:00