Panagiotis Papadopoulos
c120132cbb
Merge branch 'develop' into chore_eslint-fixes_src-routes
2025-03-08 17:15:53 +01:00
Panagiotis Papadopoulos
ecf1a0e4ad
refactor(utils): add safeExtractMessageAndStackFromError util to remove code duplication
2025-03-08 17:07:25 +01:00
Elian Doran
c297f88395
chore(server): remove unnecessary log
2025-03-08 02:10:14 +02:00
Elian Doran
17884558ad
fix(server): build errors after newer types
2025-03-01 10:16:24 +02:00
Elian Doran
bedc61c3d0
feat(import/zip): support UTF-16 LE with BOM ( closes #1241 )
2025-02-22 01:37:22 +02:00
Elian Doran
324a3d0d8b
feat(import): trim .mdx extension from import
2025-02-20 20:29:00 +02:00
Elian Doran
1c118f2aa9
feat(startup): display migration errors using system modal
2025-02-20 18:06:19 +02:00
Elian Doran
892734bce3
Merge develop
into test_server-utils
2025-02-04 21:28:44 +02:00
Elian Doran
ce45309818
feat(deps): remove dependency on semver
2025-02-04 21:15:47 +02:00
Panagiotis Papadopoulos
ab0c84a57e
refactor(server/utils): use a "real" Map for toMap
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
d71e127828
refactor(server/utils): re-export escape/unescape instead of wrapping them in function
...
-> since the functions did not do *anything* other than calling the escape/unescape module -> let's just re-export them directly
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
a4ce2ddd5e
refactor(server/utils): simplify getResourceDir
...
get rid of unnecessary else branch here
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
6e5e6989ed
fix(server/utils): fix potentially "empty looking" title from getNoteTitle
...
when the noteMeta title consists of just spaces, it will fall back to "normal" handling again → instead of showing " " as title, which would be perceived as "empty"
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
65be2cf048
refactor(server/utils): simplify getNoteTitle
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
c15e46bf25
chore(server/utils): improve types for getNoteTitle
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
fedaec6c79
refactor(server/utils): merge sanitizeFilenameForHeader into getContentDisposition
...
sanitizeFilenameForHeader is not used anywhere else and is tiny, so let's merge it
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
29b1befd60
fix(server/utils): missing export for sanitizeFilenameForHeader
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
6ab9a3979d
refactor(server/utils): simplify sanitizeFilenameForHeader
...
since "" is falsy, we can just use "||" here
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
df1d479720
chore(server/utils): sort exports alphabetically
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
ef66d330ec
chore(server/utils): timeLimit - add TODO comment
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
9a8a27c02c
refactor(server/utils): avoid same variable name for error in timeLimit
...
rename the error created in timeLimit to `errorTimeLimit` to differentiate it from the error that is caught inside the promise
makes it a bit easier to quickly distinguish these
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
440dbfd4d4
refactor(server/utils): use Set for isStringNote
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
283b19c716
fix(server/utils): add missed export of isDev in default export object
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
81db681732
refactor(server/utils): remove unused union
...
function is not used at all anywhere
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
92123e1761
refactor(server/utils): get rid of isString
...
let's use typeof x === "string" → works exactly the same and at the same speed as this custom isString fn
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
03c1128a72
fix(isEmptyOrWhitespace): avoid exception throwing when passed value is undefined
...
the req.body value from "routes/api/branches" actually seems to never get parsed into a JS object, but arrives as text string, so req.body.prefix could be undefined, which of course would cause an error to be thrown, when trying to call "match" on undefined.
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
31c46753de
refactor(server/utils): isDev move to utils and replace fn with boolean
...
this value cannot change during runtime,
=> there is no need to have these checks
as dynamic function, instead just
export the boolean value directly
2025-01-29 10:58:00 +01:00
Panagiotis Papadopoulos
ca2bb94200
refactor(server/utils): isElectron - replace fn with boolean
...
this values cannot change during runtime,
=> there is no need to have these checks
as dynamic function, instead just
export the boolean value directly
2025-01-29 10:55:53 +01:00
Panagiotis Papadopoulos
94411cf418
refactor(server/utils): isMac/isWin - replace fn with boolean
...
those values cannot change during runtime,
=> there is no need to have these checks
as dynamic function, instead just
export the boolean value directly
2025-01-29 10:55:53 +01:00
Panagiotis Papadopoulos
c0327bf8e2
feat(server/utils): add envToBoolean helper function
...
turns "true" / "false" strings from a process.env property into actual boolean values or undefined
2025-01-23 20:18:05 +01:00
Elian Doran
4cbb529fd4
chore(prettier): fix all files
2025-01-09 18:07:02 +02:00
Panagiotis Papadopoulos
6da656cd67
refactor(formatDownloadTitle): simplify function
...
I've kept the "extension determination process" in a nested function,
that reuses the formatDownloadTitle arguments,
however it could also be refactored into an own util function later,
if it is ever required.
The for loop got replaced by the built functions in `mimeType`
2025-01-03 14:17:30 +01:00
Panagiotis Papadopoulos
13235a25b1
refactor(utils): add isMac and isWindows as util func
2025-01-02 18:45:41 +01:00
Elian Doran
2556d51870
Merge pull request #873 from pano9000/refactor_use_Set
...
refactor(services): use Set instead of Arrays for faster lookups
2025-01-02 17:50:35 +02:00
Panagiotis Papadopoulos
baea3bdcdd
refactor(services): use Set instead of Arrays for faster lookups
2025-01-02 14:59:26 +01:00
Panagiotis Papadopoulos
3814621e1c
reafctor(services/utils): export functions individually
2025-01-02 13:26:25 +01:00
Elian Doran
b321d99076
chore(code): fix editorconfig for src/public
2024-12-22 15:42:15 +02:00
CobriMediaJulien
e64e51c078
Update utils.ts to fix backend bug that prevented library items from loading
2024-12-15 15:56:10 +01:00
Elian Doran
a02146df17
server: Fix loading of code block theme on server builds
2024-11-05 02:58:21 +02:00
Elian Doran
e72eb5f27c
electron: Fix asset path on forge build
2024-11-02 11:49:33 +02:00
Elian Doran
4ad725842e
server: Trim .htm when importing zip ( closes #500 )
2024-10-20 00:17:51 +03:00
Elian Doran
013f25a49b
server-esm: Make crash async
2024-07-18 23:26:21 +03:00
Elian Doran
efdae79c10
server-esm: Remove two more straightforward imports
2024-07-18 22:25:03 +03:00
Elian Doran
a8fd3be133
server-esm: Remove dynamic import to utils
2024-07-18 22:21:33 +03:00
Elian Doran
0ceae0a65e
server-esm: Change some more export object to export default object
2024-07-18 21:47:30 +03:00
Elian Doran
2750df04a3
server-esm: Change simple library import statements
2024-07-18 21:37:45 +03:00
Elian Doran
8fb67c9766
server-esm: Normalize quotes in require imports
2024-07-18 21:28:51 +03:00
Elian Doran
c4c2259e69
server-ts: Port share/shaca/sattachment
2024-04-09 22:21:07 +03:00
Elian Doran
53d4873c1f
server-ts: Port services/import/zip
2024-04-03 22:46:14 +03:00
Elian Doran
8c5f680dca
server-ts: Fix build errors
2024-02-25 15:06:43 +02:00