* refactor: use ES module.
To maintain compatibility with vite 6 and since that's where the web are heading too.
Also moved some deps to devDeps, better optimized production builds. Changed some of the script command to match how others run or preview it, I think it was still using CRA.
* chore: update-lock.yaml
* refactor: since we are using ESM now, .cjs .ts required.
Changed the file extensions and refactored the .eslintrc.cjs I think there was a lot of bloat from the previous version and removed most of them and keep it simple for now, we can always expand from here a clean slate.
* refactor: added .node.json and refactored.
* fix(build): APIClient.ts had few error.
ESLint: Unexpected lexical declaration in case block.(no-case-declarations)
and TS2554: Expected 0-1 arguments, but got 2
we passed the cause to the constructor which it only takes 1 argument so removed it instead, since it's already in the string "Offline".
* fix(build): import never used.
* fix(build): add the types for react-dom/client.
* fix(build): use ESNext instead.
* fix(build): hmm why are we missing the types for the import?
Added @types/react-table.
* chore(lint): fix lint warnings
Don't use * for export.
* chore(lint): missing deps.
React Hook useEffect has a missing dependency: 'validateForm'. Either include it or remove the dependency array
* chore(lint): fix import.
* chore(lint): fix import.
* chore(lint): fix react hook.
error React Hook "useMutation" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks
* chore(lint): value never used.
52:10 error '_regexPattern' is assigned a value but never used
* chore(lint): add missing dependency to useEffect
* chore(lint): fix imports.
* chore(lint): add deps to array.
* chore(lint): error Unexpected lexical declaration in case block no-case-declarations
* chore(lint): remove any and add types.
I am not sure about type CompleteFilterType I know it's being used for JSON so might need to use any?? dunno just test it and see if works.
* chore(lint): react-hooks/exhaustive-deps
* chore(lint): react-hooks/exhaustive-deps
* chore(lint): use type guard instead of any.
* chore(lint): react-hooks/exhaustive-deps
* Revert "chore(lint): remove any and add types."
This reverts commit 7b9168fe7826d63cb00e44df8e15fbde49b59174.
* chore(web): ignore sourcemap warnings
* chore(web): update vite to 5.0.4
* chore: add the new script `pnpm dev` to start the dev env.
* chore: add the curly braces.
more info: https://eslint.org/docs/latest/rules/no-case-declarations
* chore: remove the extra spaces
* chore: remove the extra spaces
* chore: add the curly braces.
* chore: add curly braces
* remove text-shadow property and comment
* revert switch case braces for Actions.tsx
---------
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
* feat(notifications): add lunasea
* fix(web): truncate overflow in PasswordFieldWide
* refactor(notifications): centralize msg building
Left the building logic in discord.go and notifiarr.go as is because of their unique structure.
* refactor: moved components and swapped to outline
- Refactored the iconComponentMap to use a single iconStyle variable.
* upped size from 4 to 5
* rename NotificationBuilder function
* fix some races in IRC handler management
* remove go 1.21 and slices package
* chore: update deps
* fix: use exp/slices pkg and client callbacks
* fix(irc): remove deadlock mutex from authenticate
* restore locking in authenticate()
* fix(irc): data races
* fix(irc): do not allow restart of disabled network
* fix(irc): disable restart btn if net disabled
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* fix(database): hot fix for deleting filter.
This fixes the no sql row set, no idea why it does that but removing the row check I added fixes it, Not sure if it affects others rowsAffected in the delete function.
* fix: imports
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* fix(web): truncate feed name and adjust margins
This is to avoid clipping on narrow screens.
Bug: https://i.imgur.com/Aw3FzRK.png
* fix(web): fix boundaries and layout on feed page
fix(web): align switches on download client, feed and notification page
* fix(web): add truncate and margin to feed names
* correct truncate
change margin to padding
* inherit text styles
---------
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
Co-authored-by: Fabricio Silva <hi@fabricio.dev>
refactor: copylocks and staticcheck findings
Refactor mutex handling, optimize byte slice creation, and clean up code in accordance with go.staticcheck and copylocks guidelines.
- Changed AppConfig's mutex to *sync.Mutex, preventing mutex copying and enhancing thread safety.
- Simplified byte slice initialization in writeConfig for efficiency.
- Removed redundant return in DynamicReload for better code clarity.
* feat(feeds): add force run
* fix: simplify ForceRun
* add confirmation modal
* handle errors by using the test func
* require user input to run
* make sure to reschedule next job after forcerun
* refactor modal centering with grid
* refactor: Simplify startJob and forceRun logic
- Refactor `startJob` to accept a `runImmediately` flag. This flag controls whether the job should be run immediately or scheduled for later. This change simplifies the `ForceRun` function by allowing it to call `startJob` with `runImmediately` set to `true`.
- Remove redundant checks in `ForceRun` related to feed type. These checks are handled in `startJob`.
BREAKING CHANGE: The `startJob` function now requires a second argument, `runImmediately`. This change affects all calls to `startJob`.
* fix(web) Invalidate queries after forceRun
* refactor(feeds): init and test run
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* refactor: this should be Debug() just like the rest.
* feat: catch error when updating client table.
Before if we provided the wrong ID it will just say it's successful when it shouldn't.
* chore: handle the errors.
* fix: defer tx.Rollback().
When I try handling the error we always hit the error no matter what even though there wasn't any error, This is due that defer block being executed unconditionally so even after we commit it successfully it will just give error. So add checking then commit it if all good.
* feat: added testing env.
This way we can use in memory sqlite.
* chore: Delete log should be debug as well.
* feat: enable foreign keys for testing for sqlite.
I recommend enabling all together. Not sure why it's commented but for now will keep it the same and only enable for testing.
* chore: catch error, if deleting a record fails.
* chore: catch error, if deleting a record fails.
* chore: catch error, when failed to enable toggle.
* chore: catch error, if updating failed.
* chore(filter): catch error, if deleting failed.
* chore(filter): catch error, if row is not modified for ToggleEnabled.
* chore(feed): Should be debug level to match with others.
* chore(feed): catch error when nothing is updated.
* chore: update docker-compose.yml add test_db for postgres.
* chore(ci): update include postgres db service before running tests.
* feat(database): Added database testing.
* feat(database): Added api integration testing.
* feat(database): Added action integration testing.
* feat(database): Added download_client integration testing.
* feat(database): Added filter integration testing.
* test(database): initial tests model (WIP)
* chore(feed): handle error when nothing is deleted.
* tests(feed): added delete testing.
* chore(feed): handle error when nothing is updated.
* chore(feed): handle error when nothing is updated.
* chore(feed): handle error when nothing is updated.
* feat(database): Added feed integration testing.
* fix(feed_cache): This should be time.Time not time.Duration.
* chore(feed_cache): handle error when deleting fails.
* feat(database): Added feed_cache integration testing.
* chore: add EOL
* feat: added indexer_test.go
* feat: added mock irc data
* fix: the column is not pass anymore it's password.
* chore: added assertion.
* fix: This is password column not pass test is failing because of it.
* feat: added tests cases for irc.
* feat: added test cases for release.
* feat: added test cases for notifications.
* feat: added Delete to the User DB that way it can be used for testing.
* feat: added user database tests.
* refactor: Make setupLogger and setupDatabase private also renamed them.
Changed the visibility of `setupLogger` to private based on feedback. Also renamed the function to `setupLoggerForTest` and `setupDatabaseForTest` to make its purpose more descriptive.
* fix(database): tests postgres ssl mode disable
* refactor(database): setup and teardown
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* chore: Add CODE_OF_CONDUCT
This would be great inorder to keep people on their best behavior when interacting with each other in this project.
* Update .dockerignore
* Update CODE_OF_CONDUCT.md
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* factor out test helpers
* refactor, add tests for animebytes
* revert test refactor
* better name
* change format, migrate some examples
* migrated remaining test cases
* add comment about `Test` vs `Tests`
* refactor
* reorder expectations to match vars
* generate
* turn on strict unmarshalling, remove old `Test` from schema
* start modifying actual definitions
* done with the As
* Bs
* C, D
* E, F
* G, H, I, ... L
* M, N
* O, P
* R
* bonus error. without this, pattern/vars disagreement can panic.
* S
* T, U
* X.. Now we know our ABCs next time won't you sing with meeeee
* fix another test
* another driveby change
* be less strict parsing custom definitions
* fix(definitions): load custom definitions
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* Various WebUI changes and fixes.
* feat(tooltip): make tooltip display upwards
* fix(tooltip): place tooltip to the right
* fix(web): add missing ml-px to SwitchGroup header
current: https://i.imgur.com/2WXstPV.png
new: https://i.imgur.com/QGQ49mP.png
* fix(web): collapse sections
* fix(web): improve freeleech section
* fix(web): rename action to action_components
Renamed the 'action' folder to 'action_components' to resolve import issues due to case sensitivity.
* fix(web): align CollapsibleSection
Old Advanced tab: https://i.imgur.com/MXaJ5eJ.png
New Advanced tab: https://i.imgur.com/4nPJJRw.png
Music tab for comparison: https://i.imgur.com/I59X7ot.png
* fix(web): remove invalid CSS class
* revert: vertical padding on switchgroup
added py-0 on the freeleech part instead
* feat(settings): add back log files
* fix(settings): irc channels and font sizes
* fix(components): radio select roundness
* fix(styling): various minor changes
* fix(filters): remove jitter fields
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: ze0s <ze0s@riseup.net>
* feat(tests): Verify autobrr.com URLs
* test: drop body content check
* feat: Improved URL Scanning
* cleaned up comments
* refactor: enhance URL checker for readability and flexibility
- Introduce AutobrrURLChecker struct to group related variables and functions
- Replace ioutil.ReadFile with os.ReadFile for reading files
- Adjust HTTP client setup and request creation for better error handling
- Trim trailing slashes from URLs and deduplicate URLs before making requests
- Reduce sleep duration between requests to 500ms
* fix: move test into test/docs