Elian Doran
7ae7831a27
Merge pull request #1022 from TriliumNext/fix_import-utils-#1016
...
fix(import/utils.handleH1): fix stripping of all <h1> tags that match title tag
2025-01-26 14:28:52 +02:00
Panagiotis Papadopoulos
2c2a404056
feat(services/config): rename syncProxy to syncServerProxy for naming consistency
...
backwards compatibility ensured, by still checking the iniConfig for the old value first
2025-01-24 07:45:47 +01:00
Panagiotis Papadopoulos
3fc9a10ab6
refactor(services/sync_options): get rid of process.env query
...
this is now handled in config.ts already
2025-01-24 00:03:50 +01:00
Panagiotis Papadopoulos
8778ca5f6c
fix(services): fix type errors
2025-01-24 00:02:45 +01:00
Panagiotis Papadopoulos
85c6764864
feat(services/config): add Sync config block and fallback values
...
original idea of using config-sample.ini for default values
is not backwards compatible unfortunately
fallback values taken from config-sample.ini and directly from other code in this codebase, where these values were set
2025-01-23 23:58:46 +01:00
Panagiotis Papadopoulos
c7bd5e2c67
feat(services/config): add TriliumConfig Type
2025-01-23 23:50:16 +01:00
Panagiotis Papadopoulos
edeaca6d1f
feat(services/config): add missing config values
...
these are used in the codebase, but are not defined in the sample.ini
2025-01-23 20:32:45 +01:00
Panagiotis Papadopoulos
279aa156cf
feat(services/config): add possibility to read config from ENV
...
envToBoolean used to turn "string booleans" into JS booleans
2025-01-23 20:23:31 +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
f672747cfc
chore(build): bump sync version
2025-01-23 16:52:22 +02:00
Elian Doran
4203a1160e
Merge pull request #1018 from TriliumNext/fix_server-build
...
fix: fix server build not running due to missing file
2025-01-22 23:39:09 +02:00
Elian Doran
474ae481b6
Merge branch 'develop' into feature/map_note_type
2025-01-22 22:50:38 +02:00
Panagiotis Papadopoulos
05b433d44e
test(import/utils): remove leftover unused type
2025-01-21 00:33:45 +01:00
Panagiotis Papadopoulos
2296d1a6ba
refactor(import/utils.handleH1): simplify handleH1
2025-01-21 00:25:46 +01:00
Panagiotis Papadopoulos
1de9bc7c6f
fix(import/utils.handleH1): fix stripping of all <h1> tags that match title
...
now it will only strip the very first tag that if it matches the title,
otherwise it gets turned into a h2 tag
fixes #1016
2025-01-21 00:04:05 +01:00
Panagiotis Papadopoulos
e1c949aa10
test(import/utils): add test for #handleH1/rework previous tests
2025-01-20 23:57:51 +01:00
Panagiotis Papadopoulos
ba91082115
test(import/utils): add test for extractHtmlTitle
2025-01-20 23:04:16 +01:00
Panagiotis Papadopoulos
8f09b6a192
fix: fix server build not running due to missing file
...
as discussed in #1010 – quick & dirty fix by copying over the file into the server side of things
Comment added to both files, about deduplication in the future
fixes #1010
2025-01-20 20:15:39 +01:00
Elian Doran
278870e06a
Merge pull request #1014 from TriliumNext/refactor_import-mime
...
refactor: refactor and add tests for `services/import/mime`
2025-01-20 20:53:39 +02:00
Panagiotis Papadopoulos
ca8146413a
test(data_dir): fix flaky getPlatformAppDataDir test on Windows
...
Delete the provided process.env.APPDATA on Windows, so that we can use our own values (one of which is "undefined", which was causing the getPlatformAppDataDir to fallback to the "real" process.env.APPDATA
-> causing failing test, when run on Windows
2025-01-20 18:57:43 +01:00
Elian Doran
e1952fe6b8
feat(geomap): create geomap note type
2025-01-20 18:45:56 +02:00
Panagiotis Papadopoulos
4be675c4e1
test(import/mime): add additional test case for getMime
2025-01-20 08:36:11 +01:00
Panagiotis Papadopoulos
4e59f58ce6
refactor(import/mime): simplify getMime
2025-01-20 08:36:11 +01:00
Panagiotis Papadopoulos
6a0edb68de
refactor(import/mime): simplify getType
2025-01-20 08:36:11 +01:00
Panagiotis Papadopoulos
91ae4b629e
refactor(import/mime): simplify normalizeMimeType
2025-01-20 08:36:11 +01:00
Panagiotis Papadopoulos
815929c376
refactor(import/mime): split CODE_MIME_TYPES Record into two separate objects
...
CODE_MIME_TYPES -> as a Set -> as we only care about the existance of those types
CODE_MIME_TYPES_OVERRIDE -> as a Map with those keys and the "overwrite" values as associated value
-> this way we don't have to unnecessarily store additional boolean values for everything *but* those hand ful of mime types
-> also I've sorted the items alphabetically, while I was at it
2025-01-20 08:36:11 +01:00
Panagiotis Papadopoulos
1405e22f89
test(import/mime): add tests
2025-01-20 08:36:11 +01:00
Elian Doran
55ce7aac10
Merge remote-tracking branch 'origin/develop' into test_simplify-data-dir
2025-01-19 23:13:56 +02:00
Panagiotis Papadopoulos
c9619e1a1b
chore(tests): fix type error in data_dir.spec
2025-01-18 20:45:01 +01:00
Panagiotis Papadopoulos
627b2faf0b
chore(tests): move remaining valid tests next to actual files
2025-01-18 20:20:30 +01:00
Panagiotis Papadopoulos
49246ee456
chore(tests): move tests next to actual file
2025-01-18 20:15:29 +01:00
Elian Doran
658317799d
feat(options_init): enable fixed editing toolbar by default for new users
2025-01-18 19:38:41 +02:00
Elian Doran
5899ba9a57
Revert "feat(options_init): enable horizontal layout by default for new users"
...
This reverts commit 637d1df0f597849d8c4bfc3ad53b6863bf665ba3.
2025-01-18 19:37:09 +02:00
Elian Doran
637d1df0f5
feat(options_init): enable horizontal layout by default for new users
2025-01-18 19:16:26 +02:00
Elian Doran
0a0707434e
feat(mobile): allow resetting launch bar config
2025-01-18 18:49:36 +02:00
Panagiotis Papadopoulos
33274ada65
test: port spec tests to vitest
2025-01-17 20:24:20 +01:00
Elian Doran
eb1af98830
Merge pull request #880 from pano9000/refactor_data_dir
...
refactor(data_dir): simplify logic and make code robust and testable
2025-01-14 20:20:32 +02:00
Elian Doran
1807b2b031
chore(types): missing import type for JS imports
2025-01-13 23:18:10 +02:00
Panagiotis Papadopoulos
5373ef509b
chore(prettier): fix code style
2025-01-13 08:28:12 +01:00
Panagiotis Papadopoulos
6818b2d54c
style: move "important" funcs to top of file
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
c47522eb50
refactor(data_dir): pass DIR_NAME as argument to getTriliumDir
...
makes it a bit cleaner and easier to test in the future,
as it is one thing less that'd need mocking :-)
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
94b8bcf8c9
refactor(data_dir): export functions to allow for testing
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
8b1071c459
refactor(data_dir): export dirs as frozen readonly object
...
previously exported object allowed the values to be changed
accidentally at runtime and buildtime
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
759d24855b
style(data_dir): fix indentation
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
7a1e8714af
refactor(data_dir): logically order/split cases in getTriliumDataDir
...
- the blocks now clearly follow the intended logic described in the comments
- I renamed the `getAppDataDir` to more specific `getPlatformAppDataDir`
2025-01-13 08:25:53 +01:00
Panagiotis Papadopoulos
3481c8ba84
refactor(data_dir): use path.join for safer joins
...
https://nodejs.org/api/path.html#pathjoinpaths
2025-01-13 08:24:04 +01:00
Panagiotis Papadopoulos
8826021c63
refactor(data_dir): add createDirIfNotExisting function
...
removes some code duplication
2025-01-13 08:24:04 +01:00
Panagiotis Papadopoulos
61a19d5628
refactor(data_dir): add FOLDER_PERMISSION const
...
gets rid of previously "magic number"
2025-01-13 08:24:01 +01:00
Elian Doran
9db9d412d9
feat(import/markdown): preserve language tags when possible
2025-01-11 15:22:36 +02:00
Elian Doran
0e67078256
feat(export/md): rewrite JavaScript code block languages
2025-01-11 14:11:18 +02:00