1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 09:36:18 +00:00
Commit Graph

998 Commits

Author SHA1 Message Date
Jeremy Ruston
7eaa9b8aec Database methods that mutate tables should return IDs 2024-03-17 15:06:36 +00:00
Jeremy Ruston
faa4b9700a More consistent variable naming 2024-03-17 14:54:06 +00:00
Jeremy Ruston
dea739ff07 Introduce delete markers for deleted tiddlers 2024-03-17 14:18:47 +00:00
Jeremy Ruston
69cc45bf5c Refactor the database engine specific code 2024-03-17 13:27:00 +00:00
Jeremy Ruston
347aa4d546 Tests should cover tiddler_ids 2024-03-17 13:07:24 +00:00
Jeremy Ruston
b4855b25c4 Merge branch 'master' into multi-wiki-support 2024-03-16 22:06:02 +00:00
Mario Pietsch
0b6db6e860
Fix indentation for tiddlers that set tv-config-toolbar-class (#8079)
human readable in preparation to add data-title=<<listItem>>
for better UX defining a "read only" theme

Changes to be committed:
	modified:   core/ui/EditTemplate/controls.tid
	modified:   core/ui/PageControls.tid
	modified:   core/ui/PageControls/more-page-actions.tid
	modified:   core/ui/ViewTemplate/title.tid
	modified:   core/ui/ViewToolbar/more-tiddler-actions.tid
	modified:   plugins/tiddlywiki/menubar/items/pagecontrols.tid
2024-03-16 19:03:36 +00:00
Jeremy Ruston
d518675e03 Get rid of some console.logs 2024-03-15 16:49:24 +00:00
Jeremy Ruston
9b59ae2b73 Add an HTTP test for multipart form data upload 2024-03-15 16:40:22 +00:00
Jeremy Ruston
f67573315e POST /wiki/:bag_name/bags/:bag_name/tiddlers/ should also return JSON 2024-03-15 16:39:59 +00:00
Jeremy Ruston
501f57499e Update readme 2024-03-14 12:25:11 +00:00
Jeremy Ruston
b923be5e94 Merge branch 'master' into multi-wiki-support 2024-03-13 18:03:35 +00:00
Jeremy Ruston
d6807cb471 Update MWS plugin readme 2024-03-12 17:32:54 +00:00
Jeremy Ruston
a443e5f0ad Add new command to test local or remote server via HTTP 2024-03-11 21:52:40 +00:00
Jeremy Ruston
8b5c3746f8 Refactor command module filenames 2024-03-11 09:40:40 +00:00
Jeremy Ruston
9df625c44d Reorganise JS modules into subdirectories 2024-03-11 09:10:01 +00:00
Rob Hoelz
54ff0446c6
MWS: store level tests (#8021)
* Fix a few typos

The "database instead of store" change isn't a typo fix, per se, but
these tests are testing the lower-level database layer, and I'm about
to introduce some tests for the higher-level store layer, so I want to
avoid any confusion in the test names

* Start on SQL store-level tests

* Add some tests for createBag

* Add test for getBagTiddler and getBagTiddlers

* Add basic recipe tests

* Add a test for saving a tiddler within a recipe

* Add store test for deleteTiddler
2024-03-11 09:01:43 +00:00
Jeremy Ruston
0f5dfb89ad Refactor multipart form handling for more reusability 2024-03-10 20:20:06 +00:00
Jeremy Ruston
e3b27768d2 Update comment 2024-03-10 20:19:41 +00:00
Jeremy Ruston
e35584843d Fix mws-save-archive command name 2024-03-10 18:06:26 +00:00
Jeremy Ruston
abde67e5df MWS: Add support for large tiddlers to be stored as attachment files
Fixes #8022
2024-03-10 17:45:33 +00:00
oeyoews
00bd6f8ee8
Remove unnecessary prefix field for highlight plugin (#8048) 2024-03-09 15:45:38 +00:00
Jeremy Ruston
89ae2012c7 Merge branch 'master' into multi-wiki-support 2024-03-04 14:14:06 +00:00
Jeremy Ruston
8a209d643f Fix typo 2024-03-01 18:58:17 +00:00
Jeremy Ruston
755a09be10 Tour plugin: Fix selector for "Recent" tab button 2024-02-29 09:43:38 +00:00
Jeremy Ruston
1a28ec7ea4 Rename upload manager to multipart form manager 2024-02-28 18:36:19 +00:00
Jeremy Ruston
5fe41fc896 Reorder test tiddlers 2024-02-28 18:19:22 +00:00
Jeremy Ruston
4f9ff1ae81 Missed closing tag 2024-02-28 18:19:01 +00:00
Jeremy Ruston
9facf4a067 Fix incorrect encoding of description when creating bags and recipes 2024-02-28 17:46:19 +00:00
Rob Hoelz
de4fe132a7
Unconditionally decrement transaction depth (#8008)
…otherwise we may end up in a situation where we're always stuck in an
"already in a transaction" state and often neglect to actually enter a
real transaction!
2024-02-26 11:02:55 +00:00
Jeremy Ruston
dd9a3bfeeb Re-enable loading the tw5.com docs tiddlers 2024-02-25 18:04:54 +00:00
Jeremy Ruston
6724fa804b Run the tests on both node-sqlite3-wasm and better-sqlite3 2024-02-25 17:58:53 +00:00
Jeremy Ruston
630b98520f Add note about transaction handling 2024-02-25 09:48:24 +00:00
Jeremy Ruston
d5aa74d9af Improve manual transaction handling
Thanks @hoelzro
2024-02-24 09:31:59 +00:00
Jeremy Ruston
343cc33bbe Add a test tiddler with emoji title
Useful for testing
2024-02-24 09:30:20 +00:00
Jeremy Ruston
b1edbed6a5 Fix bag static HTML to show emoji correctly 2024-02-23 17:47:00 +00:00
Jeremy Ruston
066e553f84 Introduce command to load tiddler folders into a bag 2024-02-23 12:51:29 +00:00
Jeremy Ruston
61b54125be Rename mws-load|save to mws-load|save-archive 2024-02-23 12:51:07 +00:00
Jeremy Ruston
3276703edd Fix failing tests 2024-02-23 09:30:12 +00:00
Jeremy Ruston
f9265169fd Commands to load and save tiddlers, bags and recipes as a JSON archive
@linonetwo the resulting archive should be suitable for storing in git
2024-02-23 09:27:53 +00:00
Jeremy Ruston
2361880c45 createBag should optionally set access control data 2024-02-23 09:26:45 +00:00
Jeremy Ruston
3ad87df154 Allow wiki engine to be configured 2024-02-22 17:58:30 +00:00
Jeremy Ruston
3c58788e37 Merge branch 'master' into multi-wiki-support 2024-02-22 17:39:51 +00:00
Jeremy Ruston
6d721c728f Confetti Plugin: Don't pass undefined for missing parameters 2024-02-22 17:17:38 +00:00
Jeremy Ruston
310b5f058a Whitespace 2024-02-22 12:13:53 +00:00
Jeremy Ruston
a33705e348 Fix error
It appears that not all statements can be finalized.
2024-02-22 12:09:36 +00:00
Jeremy Ruston
3fca82321e
MWS: Add support for node-sqlite-wasm alongside better-sqlite3 (#7996)
* Switch from better-sqlite3 to node-sqlite3-wasm

Seems to be slower, but might make cloud deployments easier by not having any binary dependencies

* More logging

* Temporarily use a memory database

We will make this configurable

* Revert "More logging"

* Resume loading demo tiddlers

* Cache prepared statements

Gives a 20% reduction in startup time on my machine

* Some more logging

* Update package-lock

* More logging

* Route regexps should allow for proxies that automatically decode URLs

Astonishingly, Azure does this

* Go back to a file-based database

* Less logging

* Update package-lock.json

* Simplify startup by not loading the docs edition

* Tiddler database layer should mark statements as having been removed

* Re-introduce better-sqlite3

* Make the SQLite provider be switchable

* Support switchable SQL engines

I am not intending to make this a long term feature. We will choose one engine and stick with it until we choose to change to another.

* Adjust dependency versions

* Setting up default engine

* Make transaction handling compatible with node-sqlite3-wasm

https://github.com/tndrle/node-sqlite3-wasm doesn't have transaction support so I've tried to implement it using SQL statements directly.

@hoelzro do you think this is right? Should we be rolling back the transaction in the finally clause? It would be nice to have tests in this area...

I looked at better-sqlite3's implementation - https://github.com/WiseLibs/better-sqlite3/blob/master/lib/methods/transaction.js

* Default to better-sqlite3 for compatibility after merging
2024-02-22 11:57:41 +00:00
Rob Hoelz
790f431df0
MWS: Use transactions when modifying multiple resources (#7991)
* Use transactions when modifying multiple resources

This prevents partial changes from entering the database, and also
nets a nice speed-up.

* Keep track of transaction depth

…so we could someday potentially leverage SQL implementations that don't
implement nested transactions
2024-02-22 10:48:39 +00:00
Jeremy Ruston
1eecfb6b3a Less logging 2024-02-21 17:55:13 +00:00
Jeremy Ruston
b8c1c6c8de Allow backslashes in trailing API path components
To make us more tolerant of proxies that "helpfully" decodeuricomponent for us (looking at you Azure)
2024-02-21 17:54:56 +00:00