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
Jeremy Ruston
8a209d643f
Fix typo
2024-03-01 18:58:17 +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
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
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
Jeremy Ruston
6503fb4a04
Simple performance logging
2024-02-20 09:33:39 +00:00
Jeremy Ruston
bab14b7053
Logging
2024-02-19 16:29:14 +00:00
Jeremy Ruston
6f8a3b9261
mws-load command: more validation tiddler files
2024-02-16 16:41:39 +00:00
Jeremy Ruston
8edefffbc5
WIP: Support for streaming multipart form data to the file system
2024-02-16 16:02:40 +00:00
Jeremy Ruston
c26acfdb42
Add NOT NULL constraint to all columns
...
Thanks @hoelzro
2024-02-05 16:15:35 +00:00
Jeremy Ruston
f925f036c9
Introduce $tw.mws for MWS globals
2024-02-05 14:49:08 +00:00
Jeremy Ruston
6675358e85
WIP: Add a multipart/form-data convenience function
...
This is the start of adding support for large attachments.
We have a new endpoint for POSTing tiddler data. The idea is that it will take any kind of data and figure out how to extract tiddlers from the upload and save them in the nominated bag.
The next step is to move the attachment files into a special folder and reference them from the database so that we can construct _canonical_uris for them.
2024-02-02 15:42:02 +00:00
Jeremy Ruston
262a730534
Move the database file into a "store" directory inside the wiki folder
2024-01-29 18:11:50 +00:00
Jeremy Ruston
4b6872aa42
Fix typo
2024-01-29 08:29:26 +00:00
Jeremy Ruston
3283d38867
First draft of a command to read tiddlers, bags and recipes from an archive
...
The archive format is a legacy format that I used with Xememex, and will need to be updated to iron out the wrinkles
2024-01-28 21:27:12 +00:00
Jeremy Ruston
4204ff367e
A few more tests
2024-01-28 17:11:53 +00:00
Jeremy Ruston
51e646690c
Allow tilde character in bag and recipe names
2024-01-28 17:11:44 +00:00
Jeremy Ruston
85607f7846
Query fixes
2024-01-28 17:11:23 +00:00
Jeremy Ruston
41a5bcc3a1
Fix canonical URI handling
2024-01-26 15:48:39 +00:00
Jeremy Ruston
84c8a9be9b
Fix typo
2024-01-26 15:01:07 +00:00
Jeremy Ruston
62b2fe3e2f
Add an error when creating a recipe with no bags
2024-01-26 14:42:43 +00:00
Jeremy Ruston
b0a67300cc
Add support for bag descriptions, validate bags and recipes, and complete the UI for creating bags and recipes
...
Styling to come
2024-01-24 22:24:24 +00:00
Jeremy Ruston
8d95c92bfb
Use $:/state/ tiddler for server entity state tiddlers
2024-01-24 10:56:23 +00:00
Jeremy Ruston
627c3e20cc
Add docs bags
2024-01-23 16:53:12 +00:00
Jeremy Ruston
4d42d4a190
Escape less than sign
...
Otherwise tiddlers containing `</script>` will break TiddlyWiki
2024-01-23 16:52:49 +00:00
Jeremy Ruston
f6d6478944
Add support for recipe descriptions
2024-01-23 14:29:50 +00:00
Jeremy Ruston
239ace0c07
Avoid clients of sqlTiddlerStore having to call updateAdminWIki() explicitly
2024-01-23 12:53:06 +00:00
Jeremy Ruston
c1312100aa
Admin UI styling
2024-01-23 12:52:40 +00:00
Jeremy Ruston
e343eccdc3
Refactor _canonical_uri handling out of route handlers
2024-01-23 10:51:12 +00:00
Jeremy Ruston
da5b316358
Split SqlTiddlerStore into SqlTiddlerStore and SqlTiddlerDatabase
...
The motivation is to encapsulate knowledge of the SQL queries
2024-01-22 22:08:55 +00:00
Jeremy Ruston
dc8692044c
Use SQLite's AUTOINCREMENT to give us tiddler version identifiers
...
This commit fixes sync within hosted wikis
2024-01-21 18:18:29 +00:00
Jeremy Ruston
11ecaff7db
Fix typo
2024-01-20 21:48:40 +00:00
Jeremy Ruston
d832bbcc70
Order the results of getRecipeTiddlers
2024-01-20 21:48:33 +00:00
Jeremy Ruston
59aed49e98
Make getRecipeTiddlers return the bagname as well
2024-01-20 20:22:46 +00:00
Jeremy Ruston
e9f83ca735
Add missing LIMIT 1
2024-01-19 22:03:07 +00:00
Jeremy Ruston
afa9ad3cde
Update store.getRecipeTiddler to also return the bag from which the tiddler came
2024-01-19 20:35:47 +00:00
Jeremy Ruston
01d29ed11e
get bag tiddler and put recipe tiddler should return the bag name
2024-01-19 20:12:29 +00:00
Jeremy Ruston
8f9ae7e4d5
Clarify method name
2024-01-19 19:52:57 +00:00
Jeremy Ruston
5fddd3b104
Add support for retrieving tiddlers from bags
2024-01-19 19:33:58 +00:00
Jeremy Ruston
02afbb4000
Rename some of the routes more logically
2024-01-19 19:27:54 +00:00
Jeremy Ruston
54432485e7
Add an HTML view of bag listings
2024-01-19 19:25:58 +00:00
Jeremy Ruston
26ede2839b
Add support for _canonical_uri tiddlers
...
Currently hard wired to kick in for tiddlers over 10MB (in base64 representation for binary tiddlers)
2024-01-19 14:46:21 +00:00
Jeremy Ruston
4b0df1a7ae
Basic support for creating bags and recipes
...
Cannot yet specify the bags for the new recipe
2024-01-19 11:03:58 +00:00
Jeremy Ruston
9767e7d3b7
Update entity state tiddlers on startup to read bag and recipe info
2024-01-19 11:03:27 +00:00
Jeremy Ruston
4133e7d6d6
Stream wiki generation
...
Avoids "string too long" errors when working with big tiddlers (>100MB)
2024-01-19 10:52:12 +00:00
Jeremy Ruston
4f37355a9f
Tests should use a dummy admin wiki
2024-01-19 10:28:04 +00:00
Jeremy Ruston
2f09c32d2d
Fix getTiddler query
2024-01-18 21:47:57 +00:00
Jeremy Ruston
8941bd1747
Server extension framework
...
May not actually be needed
2024-01-17 22:42:01 +00:00
Jeremy Ruston
615dc0c4a3
First pass at admin user interface
2024-01-17 22:41:41 +00:00
Jeremy Ruston
1fb8b2e279
Fix broken test
2024-01-05 15:45:40 +00:00
Jeremy Ruston
0799177cf4
Add another recipe, improve docs
2024-01-05 15:40:39 +00:00
Jeremy Ruston
1eed61397b
Fix create recipe SQL bug
2024-01-05 15:37:48 +00:00
Jeremy Ruston
3f1f7c7ef7
Remove debugging code
2024-01-05 11:08:33 +00:00
Jeremy Ruston
8543dda4aa
Fix broken test
2024-01-05 11:01:10 +00:00
Jeremy Ruston
68a89b615d
Use a persistent disk-based database
2024-01-05 10:58:07 +00:00
Jeremy Ruston
a980390870
Implement APIs for client wikis to sync with the server
...
It is now possible to create and edit tiddlers, using the existing tiddlywebadaptor syncing mechanism. There are a lot of hacks and lumpiness to make things compatible, so I think I will end up with an independent implementation
2024-01-03 16:27:13 +00:00
Jeremy Ruston
f42d3e0536
Update usage instructions
2024-01-02 21:41:25 +00:00
Jeremy Ruston
12d84c43c9
Initial Commit
2024-01-02 14:39:14 +00:00