Commit Graph

1804 Commits

Author SHA1 Message Date
Bobby Wibowo
8267c60863
chore: merge branch 'safe.fiery.me' into safe.fiery.me-feat/hyper-express 2022-07-10 19:56:21 +07:00
Bobby Wibowo
38d86779ae
refactor: HUGE REFACTOR for hyper-express 2022-07-10 19:46:25 +07:00
Bobby Wibowo
b89945d693
chore: remove controllers/handlers 2022-07-10 19:43:46 +07:00
Bobby Wibowo
5800ec2ad6
feat: init safe.fiery.me-feat/hyper-express 2022-07-10 19:43:26 +07:00
BobbyWibowo
df1cf89a1c dist: rebuilt client assets and bumped v1 version string 2022-07-10 09:28:02 +00:00
Robert Pendell
4324fbccee
fix: correct typo in generated ShareX config (#533)
Should be MultipartFormData instead of MultipartFromData.
2022-07-10 16:27:00 +07:00
Bobby Wibowo
59c023588e
refactor: authController pass errors 2022-07-10 14:24:18 +07:00
Bobby Wibowo
b3a304729f
refactor: uploadController pass errors 2022-07-10 14:20:49 +07:00
Bobby Wibowo
0f47ed76b0
feat: tokenController pass errors 2022-07-10 14:17:59 +07:00
Bobby Wibowo
3a415165b4
feat: utilsController pass errors 2022-07-10 14:15:14 +07:00
Bobby Wibowo
99a7a2a677
refactor: albumsController pass errors
motivation: less try-catch
2022-07-10 14:11:29 +07:00
Bobby Wibowo
d970f1d0a5
feat: errorsController
errors should instead be passed along to express via next(), to let
express call the errorsController
2022-07-10 14:10:59 +07:00
Bobby Wibowo
0977bb3a93
chore: default db file name to db.sqlite3 2022-07-10 12:59:22 +07:00
renovate[bot]
3dfb0bec37
chore(deps): update dependency eslint to ~8.19.0 (#532)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-10 11:56:59 +07:00
renovate[bot]
dcd7e42734
chore(deps): update dependency eslint-plugin-n to ~15.2.4 (#531)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-10 11:56:42 +07:00
renovate[bot]
b99253e78b
chore(deps): update dependency browserslist to ~4.21.1 (#529)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-10 11:56:22 +07:00
renovate[bot]
112cc7c4f1
fix(deps): update dependency systeminformation to v5.11.23 (#530)
https://github.com/sebhildebrandt/systeminformation/issues/705

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-10 11:56:05 +07:00
Bobby
2ca2fef301
feat: use SimpleDataStore for album pages cache
this should have better lifecycle and use less memory over time, since
we can define max items in cache
at the moment hard-coded to 10 cached pages (inclusive of nojs version
if ever generated)
2022-07-06 17:51:34 +07:00
Bobby
b9d0f787d7
feat: improved SimpleDataStore.hold() again
this time uses an internal Set()

this should hopefully be the final iteration of this helper class until
a new "strategy" needs to be added
2022-07-06 17:49:13 +07:00
Bobby
17c863f724
feat: SimpleDataStore.hold() no longer use up size
this means internal Map-store may actually contain more keys than limit,
but only if the extraenous keys are held-keys (i.e. has null value)

this expects that you don't manually set keys with null values into the
store however
2022-07-06 17:14:00 +07:00
Bobby
617dc6a056
feat: pre-hold content-disposition before db query 2022-07-06 16:38:35 +07:00
Bobby
ecb30cd159
feat: SimpleDataStore allow pre-holding key 2022-07-06 16:37:54 +07:00
Bobby Wibowo
d31181b4be
refactor: SimpleDataStore.STRATEGIES 2022-07-03 11:08:00 +07:00
Bobby Wibowo
39aaa25f3f
perf: SimpleDataStore 2022-07-03 11:00:48 +07:00
Bobby Wibowo
8a1ff434d9
feat: in-memory caching of content-disposition
please read config.sample.js
ignore if not serving files with node or not having the option turned on
2022-07-03 10:35:36 +07:00
Bobby Wibowo
ad4c2c2e96
refactor: overrideContentTypes 2022-07-03 10:23:55 +07:00
Bobby Wibowo
1404cf9328
fix: utf-8 filename breaks
https://github.com/expressjs/multer/issues/1104
2022-07-03 10:18:04 +07:00
BobbyWibowo
bd797f2c27 dist: rebuilt client assets and bumped v1 version string 2022-06-30 12:43:03 +00:00
Bobby Wibowo
6ef911538e
fix: home not showing pretty bytes when private 2022-06-30 19:41:47 +07:00
Bobby Wibowo
ab96bd5d99
feat: queue cloudflare purge cache with fastq 2022-06-29 17:52:16 +07:00
Bobby Wibowo
3d2651f07b
fix(deps): temp bind systeminformation@5.11.20
https://github.com/sebhildebrandt/systeminformation/issues/705
2022-06-29 15:47:37 +07:00
Bobby Wibowo
38e673226f
fix: inconsistent size field in DB !! yarn migrate
we used to store number directly into the string size field, and
during the conversion it seemed to always add ".0" at the final string,
probably because the driver or sqlite3 itself assumes float

please run yarn migrate after pulling this commit
if you skip converting the DB, file duplicates check will fail to
function

and in the future im planning to do size statistics in bigint, which
will also fail if not converted
2022-06-29 14:35:00 +07:00
Bobby Wibowo
9d38c431dc
fix: statistics failing to respond on errors 2022-06-29 14:29:47 +07:00
Bobby Wibowo
b117fa9ad1
feat: expose utils to nunjucks templates
also fix nunjucks templates not adhering to env vars overrides for
domains config options, because they attempted to read config directly
2022-06-29 13:58:09 +07:00
BobbyWibowo
de54eb92f2 dist: rebuilt client assets and bumped v1 version string 2022-06-28 06:39:35 +00:00
Bobby
cb2d7b99f7
fix: cache-control was set to all frontend pages
this now properly sets only on the specific pages that deserves to be
cached in cdn

additionally update sample config file to remove warning about
cacheControl option
this is now mature enough to be simply toggled on/off depending on
your own necessity
2022-06-28 13:38:55 +07:00
Bobby
7c4206a4e2
fix: src/js/file.js 2022-06-28 13:36:17 +07:00
BobbyWibowo
4f2cf3123b dist: rebuilt client assets and bumped v1 version string 2022-06-28 06:03:46 +00:00
Bobby
8cbdca4efc
fix: always try to load file as image in info page 2022-06-28 13:02:38 +07:00
renovate[bot]
e55be5ee0a
fix(deps): update dependency sharp to ~0.30.7 (#524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:59:13 +07:00
renovate[bot]
bdd17ba103
chore(deps): update dependency postcss-preset-env to ~7.7.2 (#523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:57:41 +07:00
renovate[bot]
8da197166d
fix(deps): update dependency systeminformation to ~5.11.22 (#525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:57:27 +07:00
Bobby
76d66033cf
ci(actions): remove sass-embedded
this solution is currently too messy
2022-06-28 12:54:58 +07:00
BobbyWibowo
6b8b1528e2 dist: rebuilt client assets and bumped v1 version string 2022-06-28 05:54:03 +00:00
Bobby
2465864c53
feat: copy to clipboard button in file info page 2022-06-28 12:52:50 +07:00
Bobby
9eb46b7986
feat: add link to file info page in dashboard 2022-06-28 12:31:35 +07:00
Bobby
8f20423163
feat: add info icon to fontello 2022-06-28 12:31:13 +07:00
Bobby
e6ae519af1
chore: src/js/player.js 2022-06-28 12:03:56 +07:00
Bobby
b17b24b159
feat: new page /file/:identifier
this will display all information recorded from the specified file, but
only to the users that own them (it requires token)

this page also has a delete file button, allowing us to provide link to
this page for sharex deletion url option

once again, this is only for authenticated users, and will only show
file that the users own, unless said user is a moderator or higher
2022-06-28 12:03:49 +07:00
Bobby
5eefc0b1d0
chore: add version to sharex config
i assume sharex may have config migration feature one day by comparing
version strings
2022-06-28 11:58:41 +07:00