Commit graph

613 commits

Author SHA1 Message Date
Felipe M. 3069f003b8
error handling 2024-06-08 18:07:10 +02:00
Felipe M. 046863c4e9
swagger 2024-06-08 09:40:56 +02:00
Felipe M. 9c480199e8
tests 2024-06-08 09:39:43 +02:00
Felipe M. b79340afa4
domain validation 2024-06-08 09:39:37 +02:00
Felipe M. 64f533d588
Merge remote-tracking branch 'origin' into fmartingr/issue657 2024-06-08 09:06:09 +02:00
Felipe Martin 650f192176
fix: add version to goreleaser archive filename (#934)
* fix: add version to goreleaser archive filename

* remove whitespace
2024-06-08 08:58:57 +02:00
Felipe M. eaf10f21f0
APIv1: Accounts
Fixes #657
2024-06-06 19:05:48 +02:00
Monirzadeh 2a231ecc37
feat: allow selecting light/dark/follow themes in the webui (#924)
* login page follow browser darkmode settings

* theme change based on selection in settings between follw system , light, dark

* content page follow settings and fix syntax error

* drop down menu color follow current theme

* version number follow theme in login page

* use footer instead of id for version

* replace space with tab

* move theme settings to the top of the list and fix typo

* remove duplicate code and use a function instead

* fix logic of change theme if you select follow system to not need reload anymore

* fix code style with make styles

* fix bug that eventlistener not remove when activate light or dark theme

* less js and add theme with patch by @fmartingr

* remove NightMode config and now everythings control with Theme

* error instead of log if invalid theme selected

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* remove unneeded part and update swagger documents

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2024-06-06 10:44:43 +02:00
Monirzadeh 47a0143d1a
fix: swagger document response type (#932) 2024-06-06 07:46:41 +02:00
Felipe Martin a1d7579b85
fix: incorrect original link in archive page (#931) 2024-06-05 21:56:34 +02:00
Felipe M. a90e01ad86
stylecheck 2024-06-04 23:30:54 +02:00
Felipe M. e126bee6a1
swagger 2024-06-04 23:26:42 +02:00
Felipe M. 6ba47227f0
apis, pointers, auth 2024-06-04 23:25:52 +02:00
Felipe M. a397c59ce0
updated api calls 2024-06-04 21:44:05 +02:00
Felipe M. 4f41104ead
Authorization 2024-06-04 21:43:58 +02:00
Felipe M. fee6cf7f9c
update account 2024-06-04 00:33:58 +02:00
Felipe M. 7c09384617
rename test 2024-06-03 23:50:16 +02:00
Felipe M. 744b2d5451
Merge remote-tracking branch 'origin/master' into fmartingr/issue657 2024-06-03 23:38:25 +02:00
Felipe Martin d05188b666
ci: fix codecov action issues (#928)
* fixed codecov action

* ignore coverage local files

* downgraded codecov to 4.4.0

* downgrade codecov action to 4.3.1

* pass through env

* 4.4.0 again

* 4.2.0

* 4.4.1 with cli 0.5.2

* down to 4.4.0

* cli as 0.4.0

* trying another way

* upgraded to 4.4.1 again
2024-06-03 23:38:08 +02:00
Felipe M. 0835804f63
more permissive assertion 2024-06-03 19:18:46 +02:00
Felipe M. 56f441e75a
make lint 2024-06-03 19:04:19 +02:00
Felipe M. 21d306641d
ListAccounts, password hash on domain 2024-06-03 18:57:31 +02:00
Felipe M. e88bfe3c0b
remove serve method from makefile 2024-06-03 17:54:52 +02:00
Felipe M. 8c02f9db87
fix from merge 2024-06-03 17:54:43 +02:00
Felipe M. da169fe80a
remove old accounts code 2024-06-03 17:54:19 +02:00
Felipe M. 14e54a4860
Merge remote-tracking branch 'origin/master' into fmartingr/issue657 2024-06-03 16:53:45 +02:00
Monirzadeh 75395c6793
chore: check for avx2 processor feature when trying to run bun (#920)
* check avx2 when use bun

* change enviroment variable to just BUN

* better massage

Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* simpler method

* add missing reverse if

* patch with @fmartingr to check that in linux only

---------

Co-authored-by: Mario Rugiero <mrugiero@gmail.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2024-05-29 23:30:28 +02:00
dependabot[bot] a815003b1c
chore(deps): bump codecov/codecov-action in the all group (#922)
Bumps the all group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `codecov/codecov-action` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](6d798873df...125fc84a9a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-29 23:19:24 +02:00
Monirzadeh 6c94d56bf0
feat: Home button clear search query (#916)
* click on home will clear searchbox

* clearHome when mounted

* clearHomePage just when you are in homepage

* check clearHomePage signal out of clearHomePage method

* fix style
2024-05-26 15:33:17 +02:00
dependabot[bot] 2d88f908e2
chore(deps): bump the all group with 2 updates (#917)
Bumps the all group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/checkout` from 4.1.5 to 4.1.6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](44c2b7a8a4...a5ac7e51b4)

Updates `codecov/codecov-action` from 4.3.1 to 4.4.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](5ecb98a3c6...6d798873df)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 08:40:36 +02:00
dependabot[bot] 4e0e23a277
chore(deps): bump the all group with 3 updates (#908)
Bumps the all group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) and [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action).


Updates `actions/checkout` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](0ad4b8fada...44c2b7a8a4)

Updates `golangci/golangci-lint-action` from 5.3.0 to 6.0.1
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](38e1018663...a4f60bb28d)

Updates `goreleaser/goreleaser-action` from 5.0.0 to 5.1.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...5742e2a039)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-18 09:55:17 +02:00
Felipe Martin e5e1af2272
deps: update golang dependencies (#915) 2024-05-18 09:54:45 +02:00
Felipe Martin 4de4799ef8
fix: ensure tmp folder is present on docker container (#910)
* chore: add logger to bookmark update cache

* ensure there's a tmp folder in the container
2024-05-15 17:02:59 +02:00
Felipe Martin 647945c54e
ci: unify local and ci docker workflows (#907)
* deps: go to 1.22.3

* removed ci dockerfile

* add make buildx

* updated dockerfile

* ci uses make buildx command

* commented upx for the future

* disable openbsd/arm tests

* wip

* put dist file in dist path

* removed unused make command

* build-local to speed up local tests

* don't clean when buildx

* podman workaround

* manually define source files for tests
2024-05-14 08:01:52 +02:00
Felipe Martin a6e55705da
fix: not checking for nil-pointer errors on migrations (#906) 2024-05-12 19:07:16 +02:00
Monirzadeh eaa6f0ea2a
fix(sqlite): id column should be unique (#894)
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2024-05-12 17:02:19 +02:00
dependabot[bot] c107e974ca
chore(deps): bump the all group with 4 updates (#902)
Bumps the all group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action), [actions/setup-go](https://github.com/actions/setup-go) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/checkout` from 4.1.2 to 4.1.4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.2...0ad4b8fadaa221de15dcec353f45205ec38ea70b)

Updates `golangci/golangci-lint-action` from 5.0.0 to 5.3.0
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](82d40c283a...38e1018663)

Updates `actions/setup-go` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0c52d547c9...cdcb360436)

Updates `codecov/codecov-action` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](84508663e9...5ecb98a3c6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 20:45:22 +02:00
dependabot[bot] 56fdc1292e
chore(deps): bump the all group across 1 directory with 4 updates (#900)
Bumps the all group with 4 updates in the / directory: [github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery), [github.com/gin-contrib/requestid](https://github.com/gin-contrib/requestid), [github.com/jmoiron/sqlx](https://github.com/jmoiron/sqlx) and [modernc.org/sqlite](https://gitlab.com/cznic/sqlite).


Updates `github.com/PuerkitoBio/goquery` from 1.9.1 to 1.9.2
- [Release notes](https://github.com/PuerkitoBio/goquery/releases)
- [Commits](https://github.com/PuerkitoBio/goquery/compare/v1.9.1...v1.9.2)

Updates `github.com/gin-contrib/requestid` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/gin-contrib/requestid/releases)
- [Changelog](https://github.com/gin-contrib/requestid/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/requestid/compare/v1.0.0...v1.0.1)

Updates `github.com/jmoiron/sqlx` from 1.3.5 to 1.4.0
- [Release notes](https://github.com/jmoiron/sqlx/releases)
- [Commits](https://github.com/jmoiron/sqlx/compare/v1.3.5...v1.4.0)

Updates `modernc.org/sqlite` from 1.29.6 to 1.29.8
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.8)

---
updated-dependencies:
- dependency-name: github.com/PuerkitoBio/goquery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/gin-contrib/requestid
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/jmoiron/sqlx
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03 19:12:49 +02:00
Paco Esteban 02247b215b
refactor: allow specific sqlite engine for OpenBSD (#780)
* remove dependencies that use syscall.Syscall*

OpenBSD will be removing direct access to `syscall(2)` soon.
Shiori will stop working because of this, as some of its dependencies
rely heavily on the use of `syscall.Syscall*`, which ends up using
`syscall(2)`.  This commit removes those dependencies by reverting back
to use github.com/mattn/go-sqlite3 instead of modernc.org/sqlite to deal
with the sqlite database backend.

* add ~emersion/go-sqlite3-fts5

* enable cgo to check ci

* fts5 build flag

* split sqlite logic using build flags

* disable cgo again

* added ci test for bsd systems

* remove openbsd ci

* Revert "remove openbsd ci"

This reverts commit f394148385.

* fix makefile go_test_flags

---------

Co-authored-by: Felipe M <me@fmartingr.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2024-05-02 16:38:16 +02:00
dependabot[bot] 59a53fb56d
chore(deps): bump the all group across 1 directory with 4 updates (#895)
Bumps the all group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/download-artifact](https://github.com/actions/download-artifact), [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/checkout` from 4.1.2 to 4.1.4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9bb56186c3...0ad4b8fada)

Updates `actions/download-artifact` from 4.1.4 to 4.1.7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](c850b930e6...65a9edc588)

Updates `golangci/golangci-lint-action` from 4.0.0 to 5.0.0
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](3cfe3a4abb...82d40c283a)

Updates `actions/upload-artifact` from 4.3.1 to 4.3.3
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](5d5d22a312...65462800fd)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 12:28:23 +02:00
Felipe Martin 31767f75e6
feat: new migrations system (#876)
* feat: new migration system

* use newFuncMigration

* database version -> database schema version

* column name

* use path instead of filepath for goembed

* simplified migrations, added backwards compatible migrations
2024-04-27 07:46:36 +02:00
Monirzadeh b8a357829d
feat: api endpoint to serve readable content (#885)
* add endpoint to serve readable content

* add id and modified time in response

* revert id and modified time

* remove public check status

* chnage 401 to 403

* add basic unittest for readable content

* check response in unittest

* update strcut name and move that above handler
2024-04-21 00:59:03 +02:00
dependabot[bot] b0ca9816be
chore(deps): bump codecov/codecov-action in the all group (#890)
Bumps the all group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `codecov/codecov-action` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](7afa10ed9b...84508663e9)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-20 08:45:10 +02:00
Felipe Martin db313f5c62
fix: authentication flow should abort early (#888)
* fix: finish connection once we send auth response

* removed interface for now

* handle authentication in each route group

* tags api tests

* typo

* testutil improvements

* bookmarks api auth

* cache update requires owner
2024-04-13 19:45:03 +02:00
Felipe Martin 86337a088b
deps: update go to 1.22.2 and all dependencies (#889) 2024-04-13 17:59:22 +02:00
Felipe Martin c77a542a5b
fix(ci): renamed deprecated golangci property (#887) 2024-04-13 09:18:31 +02:00
Manu 9bf3dae35d
docs: add PikaPods managed hosting option (#881)
* Add PikaPods hosting option

* Add landing page link
2024-04-13 09:18:12 +02:00
Benjamin S. Osenbach 394d17b3a5
ci: create zip archives for windows builds (#884) 2024-04-13 09:16:01 +02:00
Felipe Martin 6254f7750a
fix(ci): prevent tagging docker image as latest on every push (#882) 2024-04-08 15:37:17 +02:00
dependabot[bot] a281543e6f
chore(deps): bump the all group with 2 updates (#880)
Bumps the all group with 2 updates: [oven-sh/setup-bun](https://github.com/oven-sh/setup-bun) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `oven-sh/setup-bun` from 194c60efc37fcfa5fa518543a35a9d2da5fe42a2 to 8f24390df009a496891208e5e36b8a1de1f45135
- [Release notes](https://github.com/oven-sh/setup-bun/releases)
- [Commits](194c60efc3...8f24390df0)

Updates `codecov/codecov-action` from 4.1.1 to 4.2.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](c16abc29c9...7afa10ed9b)

---
updated-dependencies:
- dependency-name: oven-sh/setup-bun
  dependency-type: direct:production
  dependency-group: all
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 12:51:51 +02:00