@tiddlywiki/mws 0.0.21 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -9
- package/dist/metafile-esm.json +1 -0
- package/dist/mws.d.ts +1 -0
- package/dist/mws.js +34710 -0
- package/dist/mws.js.map +1 -0
- package/editions/mws-docs/tiddlers/$__StoryList.tid +1 -2
- package/editions/mws-docs/tiddlers/2025-02-18 - User Management.md.meta +2 -2
- package/editions/mws-docs/tiddlers/2025-04-14 - client plugins /342/234/224/357/270/217.md" +31 -0
- package/editions/mws-docs/tiddlers/2025-04-14 - client plugins /342/234/224/357/270/217.md.meta" +5 -0
- package/editions/mws-docs/tiddlers/{2025-05-04.md → 2025-05-04 - event hooks /342/234/224/357/270/217.md" } +7 -1
- package/editions/mws-docs/tiddlers/2025-05-04 - event hooks /342/234/224/357/270/217.md.meta" +5 -0
- package/editions/mws-docs/tiddlers/{2025-05-06.md → 2025-05-06 - syncer design.md } +0 -4
- package/editions/mws-docs/tiddlers/2025-05-06 - syncer design.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Allowed Methods.tid +8 -0
- package/editions/mws-docs/tiddlers/Application Access & Security.md +14 -84
- package/editions/mws-docs/tiddlers/Application Access & Security.md.meta +1 -1
- package/editions/mws-docs/tiddlers/Body Format.md +19 -0
- package/editions/mws-docs/tiddlers/Body Format.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Checklists and Features.md +0 -3
- package/editions/mws-docs/tiddlers/Checklists and Features.md.meta +1 -1
- package/editions/mws-docs/tiddlers/Client Plugins.md +17 -0
- package/editions/mws-docs/tiddlers/Client Plugins.md.meta +5 -0
- package/editions/mws-docs/tiddlers/HTTP API.md +4 -3
- package/editions/mws-docs/tiddlers/HTTP API.md.meta +1 -1
- package/editions/mws-docs/tiddlers/HelloThere.tid +2 -2
- package/editions/mws-docs/tiddlers/Installation.tid +2 -3
- package/editions/mws-docs/tiddlers/MWS Architecture.tid +6 -1
- package/editions/mws-docs/tiddlers/Multi-user Trust.md +12 -0
- package/editions/mws-docs/tiddlers/Multi-user Trust.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Notes.tid +5 -3
- package/editions/mws-docs/tiddlers/Oracle Attacks.md +29 -0
- package/editions/mws-docs/tiddlers/Oracle Attacks.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Reference.md +1 -0
- package/editions/mws-docs/tiddlers/Reference.md.meta +1 -1
- package/editions/mws-docs/tiddlers/Request Handling.md +53 -0
- package/editions/mws-docs/tiddlers/Request Handling.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Roadmap.tid +7 -0
- package/editions/mws-docs/tiddlers/Route Definers.md +206 -0
- package/editions/mws-docs/tiddlers/Route Definers.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Security.md +75 -0
- package/editions/mws-docs/tiddlers/Security.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Server Plugins.md +7 -0
- package/editions/mws-docs/tiddlers/Server Plugins.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Startup Cache.md +28 -0
- package/editions/mws-docs/tiddlers/Startup Cache.md.meta +5 -0
- package/editions/mws-docs/tiddlers/TiddlerFields.md +5 -0
- package/editions/mws-docs/tiddlers/TiddlerFields.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Usage.tid +2 -2
- package/editions/mws-docs/tiddlers/system/$__mws_cssvar-macro.tid +10 -0
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI +143 -0
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI.meta +7 -0
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css +567 -0
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css.meta +6 -0
- package/editions/mws-docs/tiddlers/system/$__theme.tid +6 -0
- package/editions/mws-docs/tiddlers/system/SplashScreen.tid +21 -0
- package/editions/mws-docs/tiddlers/system/StaticBanner.tid +1 -1
- package/editions/mws-docs/tiddlers/system/Styles.tid +13 -0
- package/editions/mws-docs/tiddlers/system/palette.tid +4 -1
- package/editions/mws-docs/tiddlers/system/sidebarlayout.tid +4 -1
- package/editions/mws-docs/tiddlers/x-mws-tiddler.md +35 -0
- package/editions/mws-docs/tiddlers/x-mws-tiddler.md.meta +5 -0
- package/mws.run.mjs +30 -0
- package/package.json +47 -36
- package/plugins/client/package-lock.json +46 -83
- package/plugins/client/package.json +1 -6
- package/plugins/client/plugin.info +2 -2
- package/plugins/client/src/fflate.d.ts +1501 -0
- package/plugins/client/src/multiwikiclientadaptor.ts +768 -317
- package/plugins/client/src/mws.d.ts +4 -0
- package/plugins/client/src/types.d.ts +3928 -0
- package/plugins/client/tiddlers/en-US.multids +3 -0
- package/plugins/client/tiddlers/status/SaveWikiButtonTemplate.tid +3 -0
- package/plugins/client/tiddlers/status/icon-cloud.tid +4 -0
- package/plugins/client/tiddlers/status/info-segment.tid +8 -0
- package/plugins/client/tiddlers/status/readonly-styles.tid +27 -0
- package/plugins/client/tiddlers/status/save-offline.tid +7 -0
- package/plugins/client/tiddlers/status/save-wiki-button.tid +26 -0
- package/plugins/client/tiddlers/status/styles.tid +44 -0
- package/plugins/client/tiddlers/status/syncer-actions-copy-logs.tid +6 -0
- package/plugins/client/tiddlers/status/syncer-actions-login-status.tid +9 -0
- package/plugins/client/tiddlers/status/syncer-actions-login.tid +8 -0
- package/plugins/client/tiddlers/status/syncer-actions-logout.tid +8 -0
- package/plugins/client/tiddlers/status/syncer-actions-refresh.tid +9 -0
- package/plugins/client/tiddlers/status/syncer-actions-save-snapshot.tid +9 -0
- package/plugins/client/tiddlers/status/tags-syncerdropdown.tid +2 -0
- package/plugins/client/tiddlers/syncer/multiwikiclientadaptor.js +640 -0
- package/plugins/client/tiddlers/syncer/syncer.js +831 -0
- package/plugins/client/tsconfig.json +19 -16
- package/plugins/filter-ast-to-sql/example-run-series.ts +146 -0
- package/plugins/server/SplashScreen.tid +150 -0
- package/plugins/server/fflate.js +9 -0
- package/plugins/server/plugin.info +8 -0
- package/plugins/server/readme +1 -0
- package/plugins/server/url-polyfill.js +294 -0
- package/prisma/client/client.d.ts +1 -0
- package/prisma/client/client.js +3 -0
- package/prisma/client/default.d.ts +1 -0
- package/prisma/client/default.js +3 -0
- package/prisma/client/edge.d.ts +1 -0
- package/prisma/client/edge.js +297 -0
- package/prisma/client/index-browser.js +275 -0
- package/prisma/client/index.d.ts +17770 -0
- package/prisma/client/index.js +324 -0
- package/prisma/client/package.json +173 -0
- package/prisma/client/query_engine_bg.js +811 -0
- package/prisma/client/query_engine_bg.wasm +0 -0
- package/prisma/client/runtime/edge-esm.js +10000 -0
- package/prisma/client/runtime/edge.js +10036 -0
- package/prisma/client/runtime/index-browser.d.ts +370 -0
- package/prisma/client/runtime/index-browser.js +2300 -0
- package/prisma/client/runtime/library.d.ts +3681 -0
- package/prisma/client/runtime/library.js +10604 -0
- package/prisma/client/runtime/react-native.js +10629 -0
- package/prisma/client/runtime/wasm-compiler-edge.js +11238 -0
- package/prisma/client/runtime/wasm-engine-edge.js +7801 -0
- package/prisma/client/schema.prisma +156 -0
- package/prisma/client/wasm-edge-light-loader.mjs +4 -0
- package/prisma/client/wasm-worker-loader.mjs +4 -0
- package/prisma/client/wasm.d.ts +1 -0
- package/prisma/client/wasm.js +304 -0
- package/prisma/global.ts +53 -0
- package/prisma/migrations/{20250406213424_init → 20250606001949_init}/migration.sql +46 -48
- package/prisma/migrations/20250613000526_remove_group/migration.sql +22 -0
- package/prisma/migrations/20250620014502_settings/migration.sql +5 -0
- package/prisma/migrations/20250707205229_recipes/migration.sql +20 -0
- package/prisma/migrations/migration_lock.toml +1 -1
- package/prisma/notes.md +1 -2
- package/prisma/schema.prisma +52 -49
- package/prisma/test.sqlite +0 -0
- package/prisma/test.sqlite-journal +0 -0
- package/public/react-admin/android-chrome-192x192.png +0 -0
- package/public/react-admin/android-chrome-512x512.png +0 -0
- package/public/react-admin/apple-touch-icon.png +0 -0
- package/{react-user-mgmt/public/esm-QKDFEP3B.js → public/react-admin/esm-L4WLVWJN.js} +1 -1
- package/public/react-admin/esm-L4WLVWJN.js.map +7 -0
- package/public/react-admin/esm-QMNGI3LF.js +3 -0
- package/public/react-admin/favicon-16x16.png +0 -0
- package/public/react-admin/favicon-32x32.png +0 -0
- package/public/react-admin/favicon.ico +0 -0
- package/public/react-admin/index.html +36 -0
- package/public/react-admin/main.js +268 -0
- package/public/react-admin/main.js.map +7 -0
- package/public/react-admin/site.webmanifest +20 -0
- package/public/react-admin/stats.json +1 -0
- package/scripts.mjs +134 -25
- package/dist/server.d.ts +0 -945
- package/dist/server.js +0 -20775
- package/dist/server.js.map +0 -1
- package/editions/mws-docs/tiddlers/2025-04-03 - Phases of Development.md +0 -64
- package/editions/mws-docs/tiddlers/2025-04-03 - Phases of Development.md.meta +0 -5
- package/editions/mws-docs/tiddlers/2025-04-13 - Plugins.md +0 -18
- package/editions/mws-docs/tiddlers/2025-04-13 - Plugins.md.meta +0 -5
- package/editions/mws-docs/tiddlers/2025-05-04.md.meta +0 -5
- package/editions/mws-docs/tiddlers/2025-05-06.md.meta +0 -5
- package/editions/mws-docs/tiddlers/Moduler Design.md +0 -29
- package/editions/mws-docs/tiddlers/Moduler Design.md.meta +0 -5
- package/editions/mws-docs/tiddlers/Request Server.md +0 -20
- package/editions/mws-docs/tiddlers/Request Server.md.meta +0 -5
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Dark +0 -173
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Dark.meta +0 -6
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Light +0 -172
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Light.meta +0 -6
- package/plugins/client/tiddlers/config-tiddlers-filter.tid +0 -2
- package/plugins/client/tiddlers/config-use-server-sent-events.tid +0 -2
- package/plugins/client/tiddlers/info-segment.tid +0 -8
- package/plugins/client/tiddlers/multiwikiclientadaptor.js +0 -444
- package/prisma/migrations/20250407002306_disconnect_user_tables/migration.sql +0 -52
- package/prisma/old-db.sql +0 -144
- package/react-user-mgmt/README.md +0 -50
- package/react-user-mgmt/eslint.config.js +0 -28
- package/react-user-mgmt/package-lock.json +0 -2738
- package/react-user-mgmt/package.json +0 -31
- package/react-user-mgmt/public/index.html +0 -1
- package/react-user-mgmt/public/main.js +0 -295
- package/react-user-mgmt/public/main.js.map +0 -7
- package/react-user-mgmt/public/stats.json +0 -1
- package/react-user-mgmt/tsconfig.json +0 -40
- package/react-user-mgmt/types.d.ts +0 -2
- package/tiddlywiki-types/boot/boot.d.ts +0 -378
- package/tiddlywiki-types/boot/bootprefix.d.ts +0 -110
- package/tiddlywiki-types/core/modules/filters.d.ts +0 -107
- package/tiddlywiki-types/core/modules/tiddler.d.ts +0 -47
- package/tiddlywiki-types/core/modules/wiki-bulkops.d.ts +0 -36
- package/tiddlywiki-types/core/modules/wiki.d.ts +0 -208
- package/tiddlywiki-types/index.d.ts +0 -7
- package/tiddlywiki-types/package.json +0 -3
- /package/plugins/client/tiddlers/{sidebarsegment.tid → status/sidebarsegment.tid} +0 -0
- /package/plugins/client/tiddlers/{GettingStarted.tid → syncer/GettingStarted.tid} +0 -0
- /package/plugins/client/tiddlers/{config-incoming-updates-filter.tid → syncer/config-incoming-updates-filter.tid} +0 -0
- /package/plugins/client/tiddlers/{readme.tid → syncer/readme.tid} +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/chunk-YALWN5OT.js +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/chunk-YALWN5OT.js.map +0 -0
- /package/{react-user-mgmt/public/esm-QKDFEP3B.js.map → public/react-admin/esm-QMNGI3LF.js.map} +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/favicon.png +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/missing-favicon.png +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/motovun-jack.jpg +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/mws-icon.png +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/stats.css +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/stats.html +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/stats.js +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/stats.svg +0 -0
- /package/{react-user-mgmt/public → public/react-admin}/vite.svg +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Welcome to the MultiWikiServer wiki!
|
|
2
|
-
|
|
3
|
-
## Phases of development
|
|
4
|
-
|
|
5
|
-
### Phase 1 is to get a fully working system that can be extended.
|
|
6
|
-
|
|
7
|
-
The features here should cover all of the core requirements.
|
|
8
|
-
|
|
9
|
-
- Database fully async and concurrent with transactions and row locking.
|
|
10
|
-
- Recipes and bags fully supported.
|
|
11
|
-
- Support for both server-wide (wiki-like) and per-user (doc-like) recipes.
|
|
12
|
-
- Shadow bags to hold each user's drafts and customizations for server-wide or shared recipes.
|
|
13
|
-
- Possible integration of various tiddler namespace behaviors, like private `User:{username}` tiddlers.
|
|
14
|
-
- Option *on the server* for users to propose edits to existing tiddlers, probably by moving a tiddler to a different bag.
|
|
15
|
-
- The concept of multiple users fully supported. Auth state has a userID property.
|
|
16
|
-
- Auth with username and password by default, but allowing custom integrations to be built that use third-party auth libraries or services. Several of us already have different ideas in mind, and we need to build all the required mechanisms in phase 1 in order to make sure we're properly supporting them, even if we don't actually support the third-party integrations themselves until phase 2.
|
|
17
|
-
- Multiple sessions editing the same wiki supported *by the server*, with revision mechanisms to prevent overwriting edits with an old version.
|
|
18
|
-
- Sharing read or write access with other users via invite links.
|
|
19
|
-
|
|
20
|
-
### Phase 2 is to add all the other important features
|
|
21
|
-
|
|
22
|
-
- [Full integration with popular auth solutions.](https://github.com/TiddlyWiki/MultiWikiServer/issues/1)
|
|
23
|
-
- [Full Identity & Access Management support.](https://github.com/TiddlyWiki/MultiWikiServer/wiki/User-Management-3)
|
|
24
|
-
- Collaborative editing sessions.
|
|
25
|
-
|
|
26
|
-
## How the server classes work together
|
|
27
|
-
|
|
28
|
-
This implements a server that abstracts the various HTTP protocols into a single request state object which it then hands out to the routes.
|
|
29
|
-
|
|
30
|
-
- **Streamer** abstracts away the difference between HTTP/1.1 and HTTP/2 to allow both to be handled transparently.
|
|
31
|
-
- Normalizes the request and response into a single class.
|
|
32
|
-
- Currently it doesn't support push streams, but we could change that.
|
|
33
|
-
- **Listeners** handle the server listener and send requests they recieve to the router.
|
|
34
|
-
- ListenerHTTP: Sets up and handles HTTP requests using the http module.
|
|
35
|
-
- ListenerHTTPS: Sets up and handles HTTPS requests using the http2 module (with http1.1 support).
|
|
36
|
-
- **Router**: The main server instance. Handles route matching and sets up a state object for each request. It also instantiates subsystems.
|
|
37
|
-
- **AuthState** (subsystem): Contains all authentication logic and is called at various points in the request process. It may throw to abort the request.
|
|
38
|
-
- **StateObject**: Contains everything routes have access to, including a database connection. Subsystems may create their own state classes which take the StateObject as a constructor argument.
|
|
39
|
-
|
|
40
|
-
## Thoughts on routing
|
|
41
|
-
|
|
42
|
-
Routing generally works well, but the current routes are all strictly path based. They mix various concerns into one module based on path similarities.
|
|
43
|
-
|
|
44
|
-
I think it would be a lot more streamlined to separate the concerns into different sections. Each of those would operate as their own submodule.
|
|
45
|
-
|
|
46
|
-
Why? Because this is how complicated permissions can get:
|
|
47
|
-
|
|
48
|
-
- **Auth** determines who the user is.
|
|
49
|
-
- Auth adapters that connect third-party auth services, with fields like profile pic, display name, email, etc.
|
|
50
|
-
- Auth strategies like session cookies or access tokens.
|
|
51
|
-
- Login and registration forms, email and phone interactions, etc.
|
|
52
|
-
- **Users** contains all the code for changing what the user is allowed to do.
|
|
53
|
-
- List of users, with tabs for pending, roles, etc.
|
|
54
|
-
- Handle user registrations and initial setup.
|
|
55
|
-
- Manage sharing and collaboration permissions: [Roles](https://github.com/Arlen22/TW5-MWS/wiki/Roles) (eventually)
|
|
56
|
-
- **Recipes** shows the user their available recipes and lets them create or modify.
|
|
57
|
-
- (Phase 1): Users create their own recipes and bags and specify read/write permissions for those recipes and bags.
|
|
58
|
-
- (Phase 2): Admins can define scoped bags which are added to recipes based on the user's role.
|
|
59
|
-
- **Wikis** contains all the code that runs when accessing the wiki itself.
|
|
60
|
-
- Tiddler saving and loading based on the recipe instructions.
|
|
61
|
-
- Uploads and other third-party integrations requiring server support.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
We need the MWS server to be as modular as possible. Obviously certain things, like the route implementations, are difficult to make modular. But various sections are much more self-contained, or interact with the rest of the codebase in a small, well-defined way, and these can be turned into pluggable services.
|
|
3
|
-
|
|
4
|
-
Server routes for various sections of the UI can be kept separate, so the recipe/bag manger, user manager, and actual wiki routes can be put in separate modules so that one of them can easily be rewritten without affecting the others.
|
|
5
|
-
|
|
6
|
-
All of them interact with the database via the prisma adapter, which can be modified to handle different databases. We should support mariadb, sqlite, and postgresql to cover the main ones. Making sure the prisma client covers all three is probably important. There may be small differences between the prisma client for different database types, although this will be reflected in the types, so we should be able to figure that out pretty easily.
|
|
7
|
-
|
|
8
|
-
The attachment store isn't something I've taken a close look at.
|
|
9
|
-
|
|
10
|
-
The tiddlywiki instance on the server might stay. At this point I don't think we actually need it for anything besides rendering the index wiki. That might be moved to the start command instead of being part of the mws runtime. But it's also used for various import and export commands which still need to be available on the cli. We could make loading optional, or unload it after commands have completed, or once mws-listen starts.
|
|
11
|
-
|
|
12
|
-
I don't think things are quite where they should be with the client either. Currently we're adding recipe tiddlers into the wiki page dynamically, which is expected, but there are like six tiddlers that are being rendered statically, which doesn't really make sense. It also doesn't make sense that we're dumping some plugins into the database but rendering core from tiddlywiki, since this results in a version mismatch.
|
|
13
|
-
|
|
14
|
-
At the same time, we really don't want to be rendering plugins every time. They do need to be cached somewhere so they can be loaded quickly. I wonder if it would work to cache them in the wiki folder, per tiddlywiki version, so if you upgrade it would just create a new folder. The boot tiddlers would be cached in the folder as well. If we do it right, we wouldn't even have to parse the file, just read it onto the wire. We'd probably need an index file to keep everything straight. We could add plugins/themes/languages support to the wiki folder as well, which would also get cached in the same way. We could make a way for caching to be disabled, perhaps by adding a field to `plugin.info`.
|
|
15
|
-
|
|
16
|
-
It would be useful if the plugin syntax could specify NPM modules. We already have the `+` and `++` syntax. I'm not sure exactly how it'd work, but the NPM package would need to determine it's own path, which is fairly simple, and then export that so it can be imported via the standard import mechanism. Obviously the package would need to be installed, and it should probably be imported into the run file and then added as an absolute path to the list of imports. Actually, I guess that's already possible, so I just need to add the list of imports part of it.
|
|
17
|
-
|
|
18
|
-
-- Arlen22
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
### Sessions and Login
|
|
3
|
-
|
|
4
|
-
- `GET /login` and `POST /logout`
|
|
5
|
-
- parse incoming requests and provide AuthUser
|
|
6
|
-
|
|
7
|
-
### Users and Roles
|
|
8
|
-
|
|
9
|
-
- the user management UI
|
|
10
|
-
- provide lists for other features
|
|
11
|
-
- the list of roles `[name, description]`
|
|
12
|
-
- the list of users `[id, username]`
|
|
13
|
-
|
|
14
|
-
### Recipes and Bags (+ACL)
|
|
15
|
-
|
|
16
|
-
- manage recipes and bags
|
|
17
|
-
- manage the acl for them
|
|
18
|
-
- manage available plugins
|
|
19
|
-
- provide acl assertion checks for services to use
|
|
20
|
-
|
|
21
|
-
### Router and Transport
|
|
22
|
-
|
|
23
|
-
- Maps route definitions into service handlers
|
|
24
|
-
- HTTP, Websockets
|
|
25
|
-
|
|
26
|
-
### Database Connector
|
|
27
|
-
- Prisma handles query translation (wasm or native addon)
|
|
28
|
-
- Prisma supports custom adapters, and also provides standard ones
|
|
29
|
-
- Connector classes in MWS take care of database setup and schema updates
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
This is more or less a reference on the design philosophy.
|
|
3
|
-
|
|
4
|
-
## HTTP request path
|
|
5
|
-
|
|
6
|
-
The server comprises several classes which handle various parts of the request path.
|
|
7
|
-
|
|
8
|
-
The Listener classes call the Router class with incoming requests. The Router class starts an async (Promise-based) code path with a catch handler protecting it.
|
|
9
|
-
|
|
10
|
-
There are two kinds of classes, routing and state.
|
|
11
|
-
|
|
12
|
-
Routing classes hold config state for that part of the request path. They are used to reach a specific objective. Examples include the Router and Authentication classes.
|
|
13
|
-
|
|
14
|
-
State classes hold information specific to each request. It may be used by any of the routing classes. The primary goal is usually to hide implementation details, or to pass information between routing classes. The StateObject class is the primary example, but modules may have their own state classes.
|
|
15
|
-
|
|
16
|
-
Both kinds of classes should check incoming information thoroughly and throw quickly if anything is wrong. The constructors of state classes are part of the request chain and may throw as well.
|
|
17
|
-
|
|
18
|
-
The request may be completed at any point in the request chain by throwing the STREAM_ENDED symbol. The catch all handler will ignore the symbol, but will send an error 500 if headers are not marked as sent at that point.
|
|
19
|
-
|
|
20
|
-
It is important that the entire request be awaited and eventually resolve or reject. A promise should never be left hanging. The Router class takes care of making sure every request has finished with some response, but if the promise never resolves or rejects, there is no way to do this.
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/* generated by ChatGPT o3 */
|
|
2
|
-
alert-background: #ffb74d /* warning.light */
|
|
3
|
-
alert-border: #ff9800 /* warning.main */
|
|
4
|
-
alert-highlight: #c66900 /* warning.dark */
|
|
5
|
-
alert-muted-foreground: rgba(255,255,255,0.70)
|
|
6
|
-
|
|
7
|
-
background: #121212 /* background.default / paper */
|
|
8
|
-
page-background: #121212
|
|
9
|
-
|
|
10
|
-
foreground: rgba(255,255,255,0.87) /* text.primary */
|
|
11
|
-
muted-foreground: rgba(255,255,255,0.70) /* text.secondary */
|
|
12
|
-
very-muted-foreground: rgba(255,255,255,0.50)
|
|
13
|
-
|
|
14
|
-
primary: #90caf9 /* primary.main */
|
|
15
|
-
|
|
16
|
-
blockquote-bar: <<colour muted-foreground>>
|
|
17
|
-
button-background: #90caf9
|
|
18
|
-
button-foreground: #000000
|
|
19
|
-
button-border: #42a5f5
|
|
20
|
-
|
|
21
|
-
code-background: #1e1e1e
|
|
22
|
-
code-border: #424242
|
|
23
|
-
code-foreground: #ff8a80 /* error.light */
|
|
24
|
-
|
|
25
|
-
diff-delete-background: #b71c1c
|
|
26
|
-
diff-delete-foreground: #ffffff
|
|
27
|
-
diff-equal-background: #424242
|
|
28
|
-
diff-insert-background: #2e7d32
|
|
29
|
-
diff-insert-foreground: #ffffff
|
|
30
|
-
diff-invisible-foreground: <<colour very-muted-foreground>>
|
|
31
|
-
|
|
32
|
-
dirty-indicator: #ff1744
|
|
33
|
-
download-background: #66bb6a
|
|
34
|
-
download-foreground: #000000
|
|
35
|
-
|
|
36
|
-
dropdown-background: <<colour background>>
|
|
37
|
-
dropdown-border: rgba(255,255,255,0.12)
|
|
38
|
-
dropdown-tab-background-selected: #1e1e1e
|
|
39
|
-
dropdown-tab-background: #333333
|
|
40
|
-
dropzone-background: rgba(76,175,80,0.70)
|
|
41
|
-
|
|
42
|
-
external-link-foreground: #90caf9
|
|
43
|
-
external-link-foreground-visited: #ce93d8
|
|
44
|
-
|
|
45
|
-
footnote-target-background: #1565c0
|
|
46
|
-
|
|
47
|
-
highlight-background: #ffff00
|
|
48
|
-
highlight-foreground: #000000
|
|
49
|
-
|
|
50
|
-
message-background: #0277bd
|
|
51
|
-
message-border: #0288d1
|
|
52
|
-
message-foreground: #ffffff
|
|
53
|
-
|
|
54
|
-
modal-backdrop: rgba(0,0,0,0.5)
|
|
55
|
-
modal-background: #1e1e1e
|
|
56
|
-
modal-border: #666666
|
|
57
|
-
modal-footer-background: #242424
|
|
58
|
-
modal-footer-border: #333333
|
|
59
|
-
modal-header-border: #333333
|
|
60
|
-
|
|
61
|
-
network-activity-foreground: #66bb6a
|
|
62
|
-
|
|
63
|
-
notification-background: #424242
|
|
64
|
-
notification-border: rgba(255,255,255,0.12)
|
|
65
|
-
|
|
66
|
-
pre-background: #2d2d2d
|
|
67
|
-
pre-border: #424242
|
|
68
|
-
|
|
69
|
-
selection-background: #004ba0
|
|
70
|
-
selection-foreground: #ffffff
|
|
71
|
-
|
|
72
|
-
select-tag-background: #90caf9
|
|
73
|
-
select-tag-foreground: #000000
|
|
74
|
-
|
|
75
|
-
sidebar-button-foreground: <<colour foreground>>
|
|
76
|
-
sidebar-controls-foreground-hover: #ffffff
|
|
77
|
-
sidebar-controls-foreground: #aaaaaa
|
|
78
|
-
sidebar-foreground-shadow: rgba(0,0,0,0.80)
|
|
79
|
-
sidebar-foreground: #8c8c8c
|
|
80
|
-
sidebar-muted-foreground-hover: #dddddd
|
|
81
|
-
sidebar-muted-foreground: #9e9e9e
|
|
82
|
-
sidebar-tab-background-selected: #1e1e1e
|
|
83
|
-
sidebar-tab-background: #333333
|
|
84
|
-
sidebar-tab-border-selected: #90caf9
|
|
85
|
-
sidebar-tab-border: rgba(255,255,255,0.12)
|
|
86
|
-
sidebar-tab-divider: rgba(255,255,255,0.12)
|
|
87
|
-
sidebar-tab-foreground-selected: <<colour foreground>>
|
|
88
|
-
sidebar-tab-foreground: <<colour tab-foreground>>
|
|
89
|
-
sidebar-tiddler-link-foreground-hover: #90caf9
|
|
90
|
-
sidebar-tiddler-link-foreground: #bbbbbb
|
|
91
|
-
|
|
92
|
-
site-title-foreground: #bbdefb
|
|
93
|
-
|
|
94
|
-
stability-stable: #66bb6a
|
|
95
|
-
stability-experimental: #ffb74d
|
|
96
|
-
stability-deprecated: #ff5252
|
|
97
|
-
stability-legacy: #82b1ff
|
|
98
|
-
|
|
99
|
-
static-alert-foreground: #bbbbbb
|
|
100
|
-
|
|
101
|
-
tab-background-selected: #1e1e1e
|
|
102
|
-
tab-background: #333333
|
|
103
|
-
tab-border-selected: #333333
|
|
104
|
-
tab-border: rgba(255,255,255,0.12)
|
|
105
|
-
tab-divider: rgba(255,255,255,0.12)
|
|
106
|
-
tab-foreground-selected: <<colour foreground>>
|
|
107
|
-
tab-foreground: #bbbbbb
|
|
108
|
-
|
|
109
|
-
table-border: #424242
|
|
110
|
-
table-footer-background: #2d2d2d
|
|
111
|
-
table-header-background: #1e1e1e
|
|
112
|
-
|
|
113
|
-
tag-background: #ff9800
|
|
114
|
-
tag-foreground: #000000
|
|
115
|
-
|
|
116
|
-
testcase-accent-level-1: #003c8f
|
|
117
|
-
testcase-accent-level-2: #8d6e63
|
|
118
|
-
testcase-accent-level-3: #2e7d32
|
|
119
|
-
|
|
120
|
-
tiddler-background: <<colour background>>
|
|
121
|
-
tiddler-border: #333
|
|
122
|
-
|
|
123
|
-
tiddler-controls-foreground-hover: #bbbbbb
|
|
124
|
-
tiddler-controls-foreground-selected: #ffffff
|
|
125
|
-
tiddler-controls-foreground: #888888
|
|
126
|
-
|
|
127
|
-
tiddler-editor-background: #1e1e1e
|
|
128
|
-
tiddler-editor-border-image: <<colour background>>
|
|
129
|
-
tiddler-editor-border: #424242
|
|
130
|
-
tiddler-editor-fields-even: #1b5e20
|
|
131
|
-
tiddler-editor-fields-odd: #263238
|
|
132
|
-
|
|
133
|
-
tiddler-info-background: #1e1e1e
|
|
134
|
-
tiddler-info-border: #424242
|
|
135
|
-
tiddler-info-tab-background: #1e1e1e
|
|
136
|
-
|
|
137
|
-
tiddler-link-background: <<colour background>>
|
|
138
|
-
tiddler-link-foreground: <<colour primary>>
|
|
139
|
-
tiddler-subtitle-foreground: rgba(255,255,255,0.50)
|
|
140
|
-
tiddler-title-foreground: #bbdefb
|
|
141
|
-
|
|
142
|
-
toolbar-new-button: #90caf9
|
|
143
|
-
toolbar-options-button: #90caf9
|
|
144
|
-
toolbar-save-button: #66bb6a
|
|
145
|
-
toolbar-info-button: #64b5f6
|
|
146
|
-
toolbar-edit-button: #ffb74d
|
|
147
|
-
toolbar-close-button: #ff1744
|
|
148
|
-
toolbar-delete-button: #ff1744
|
|
149
|
-
toolbar-cancel-button: #757575
|
|
150
|
-
toolbar-done-button: #66bb6a
|
|
151
|
-
|
|
152
|
-
untagged-background: #757575
|
|
153
|
-
|
|
154
|
-
wikilist-background: #2d2d2d
|
|
155
|
-
wikilist-item: #1e1e1e
|
|
156
|
-
wikilist-info: <<colour foreground>>
|
|
157
|
-
wikilist-title: #bbbbbb
|
|
158
|
-
wikilist-title-svg: <<colour wikilist-title>>
|
|
159
|
-
wikilist-url: #9e9e9e
|
|
160
|
-
|
|
161
|
-
wikilist-button-open: #66bb6a
|
|
162
|
-
wikilist-button-open-hover: #388e3c
|
|
163
|
-
wikilist-button-reveal: #90caf9
|
|
164
|
-
wikilist-button-reveal-hover: #1565c0
|
|
165
|
-
wikilist-button-remove: #ff5252
|
|
166
|
-
wikilist-button-remove-hover: #d32f2f
|
|
167
|
-
|
|
168
|
-
wikilist-toolbar-background: #424242
|
|
169
|
-
wikilist-toolbar-foreground: #bbbbbb
|
|
170
|
-
wikilist-droplink-dragover: rgba(255,192,192,0.5)
|
|
171
|
-
|
|
172
|
-
wikilist-button-background: #8c8c8c
|
|
173
|
-
wikilist-button-foreground: #000000
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/* generated by ChatGPT o3 */
|
|
2
|
-
alert-background: #fff8e1 /* warning.light (amber 100) */
|
|
3
|
-
alert-border: #ff9800 /* warning.main */
|
|
4
|
-
alert-highlight: #c66900 /* warning.dark */
|
|
5
|
-
alert-muted-foreground: rgba(0,0,0,0.60)
|
|
6
|
-
|
|
7
|
-
background: #ffffff /* background.paper */
|
|
8
|
-
page-background: #fafafa /* background.default */
|
|
9
|
-
|
|
10
|
-
foreground: rgba(0,0,0,0.87) /* text.primary */
|
|
11
|
-
muted-foreground: rgba(0,0,0,0.60) /* text.secondary*/
|
|
12
|
-
very-muted-foreground: rgba(0,0,0,0.38) /* text.disabled*/
|
|
13
|
-
|
|
14
|
-
primary: #1976d2 /* primary.main */
|
|
15
|
-
|
|
16
|
-
blockquote-bar: <<colour muted-foreground>>
|
|
17
|
-
button-background: #1976d2
|
|
18
|
-
button-foreground: #ffffff
|
|
19
|
-
button-border: #1565c0 /* primary.dark */
|
|
20
|
-
|
|
21
|
-
code-background: #f5f5f5
|
|
22
|
-
code-border: #e0e0e0
|
|
23
|
-
code-foreground: #d32f2f /* error.main */
|
|
24
|
-
|
|
25
|
-
diff-delete-background: #ffcdd2 /* error.light */
|
|
26
|
-
diff-delete-foreground: <<colour foreground>>
|
|
27
|
-
diff-equal-background: #e0e0e0
|
|
28
|
-
diff-insert-background: #c8e6c9 /* success.light */
|
|
29
|
-
diff-invisible-foreground: <<colour muted-foreground>>
|
|
30
|
-
|
|
31
|
-
dirty-indicator: #d32f2f
|
|
32
|
-
download-background: #4caf50 /* success.main */
|
|
33
|
-
download-foreground: <<colour background>>
|
|
34
|
-
|
|
35
|
-
dropdown-background: <<colour background>>
|
|
36
|
-
dropdown-border: #e0e0e0 /* divider */
|
|
37
|
-
dropdown-tab-background-selected: #ffffff
|
|
38
|
-
dropdown-tab-background: #eeeeee
|
|
39
|
-
dropzone-background: rgba(76,175,80,0.70)
|
|
40
|
-
|
|
41
|
-
external-link-foreground: #1976d2
|
|
42
|
-
external-link-foreground-visited: #551a8b
|
|
43
|
-
|
|
44
|
-
footnote-target-background: #bbdefb /* info.light */
|
|
45
|
-
|
|
46
|
-
highlight-background: #ffff00
|
|
47
|
-
highlight-foreground: #000000
|
|
48
|
-
|
|
49
|
-
message-background: #e3f2fd /* info.light */
|
|
50
|
-
message-border: #90caf9 /* info.main */
|
|
51
|
-
message-foreground: #0277bd /* info.dark */
|
|
52
|
-
|
|
53
|
-
modal-backdrop: rgba(0,0,0,0.5)
|
|
54
|
-
modal-background: <<colour background>>
|
|
55
|
-
modal-border: #9e9e9e
|
|
56
|
-
modal-footer-background: #f5f5f5
|
|
57
|
-
modal-footer-border: #e0e0e0
|
|
58
|
-
modal-header-border: #e0e0e0
|
|
59
|
-
|
|
60
|
-
network-activity-foreground: #2e7d32 /* success.dark */
|
|
61
|
-
|
|
62
|
-
notification-background: #fffde7 /* warning.50 */
|
|
63
|
-
notification-border: #e0e0e0
|
|
64
|
-
|
|
65
|
-
pre-background: #f5f5f5
|
|
66
|
-
pre-border: #cccccc
|
|
67
|
-
|
|
68
|
-
selection-background: #bbdefb /* primary.100 */
|
|
69
|
-
selection-foreground: #000000
|
|
70
|
-
|
|
71
|
-
select-tag-background: #1976d2
|
|
72
|
-
select-tag-foreground: #ffffff
|
|
73
|
-
|
|
74
|
-
sidebar-button-foreground: <<colour foreground>>
|
|
75
|
-
sidebar-controls-foreground-hover: #000000
|
|
76
|
-
sidebar-controls-foreground: #aaaaaa
|
|
77
|
-
sidebar-foreground-shadow: rgba(255,255,255,0.80)
|
|
78
|
-
sidebar-foreground: #acacac
|
|
79
|
-
sidebar-muted-foreground-hover: #444444
|
|
80
|
-
sidebar-muted-foreground: #c0c0c0
|
|
81
|
-
sidebar-tab-background-selected: #e3f2fd
|
|
82
|
-
sidebar-tab-background: #d6d6d6
|
|
83
|
-
sidebar-tab-border-selected: #90caf9
|
|
84
|
-
sidebar-tab-border: #cccccc
|
|
85
|
-
sidebar-tab-divider: #e4e4e4
|
|
86
|
-
sidebar-tab-foreground-selected: <<colour foreground>>
|
|
87
|
-
sidebar-tab-foreground: <<colour tab-foreground>>
|
|
88
|
-
sidebar-tiddler-link-foreground-hover: #1976d2
|
|
89
|
-
sidebar-tiddler-link-foreground: #666666
|
|
90
|
-
|
|
91
|
-
site-title-foreground: #0d47a1 /* primary.deep‑dark */
|
|
92
|
-
|
|
93
|
-
stability-stable: #2e7d32
|
|
94
|
-
stability-experimental: #ed6c02
|
|
95
|
-
stability-deprecated: #d32f2f
|
|
96
|
-
stability-legacy: #303f9f
|
|
97
|
-
|
|
98
|
-
static-alert-foreground: #aaaaaa
|
|
99
|
-
|
|
100
|
-
tab-background-selected: #ffffff
|
|
101
|
-
tab-background: #d8d8d8
|
|
102
|
-
tab-border-selected: #d8d8d8
|
|
103
|
-
tab-border: #cccccc
|
|
104
|
-
tab-divider: #d8d8d8
|
|
105
|
-
tab-foreground-selected: <<colour foreground>>
|
|
106
|
-
tab-foreground: #666666
|
|
107
|
-
|
|
108
|
-
table-border: #dddddd
|
|
109
|
-
table-footer-background: #eeeeee
|
|
110
|
-
table-header-background: #f0f0f0
|
|
111
|
-
|
|
112
|
-
tag-background: #ff9800
|
|
113
|
-
tag-foreground: #ffffff
|
|
114
|
-
|
|
115
|
-
testcase-accent-level-1: #c1eaff
|
|
116
|
-
testcase-accent-level-2: #e3b740
|
|
117
|
-
testcase-accent-level-3: #5fd564
|
|
118
|
-
|
|
119
|
-
tiddler-background: <<colour background>>
|
|
120
|
-
tiddler-border: <<colour background>>
|
|
121
|
-
|
|
122
|
-
tiddler-controls-foreground-hover: #888888
|
|
123
|
-
tiddler-controls-foreground-selected: #444444
|
|
124
|
-
tiddler-controls-foreground: #cccccc
|
|
125
|
-
|
|
126
|
-
tiddler-editor-background: #f8f8f8
|
|
127
|
-
tiddler-editor-border-image: <<colour background>>
|
|
128
|
-
tiddler-editor-border: #cccccc
|
|
129
|
-
tiddler-editor-fields-even: #e8f5e9
|
|
130
|
-
tiddler-editor-fields-odd: #f1f8e9
|
|
131
|
-
|
|
132
|
-
tiddler-info-background: #f8f8f8
|
|
133
|
-
tiddler-info-border: #dddddd
|
|
134
|
-
tiddler-info-tab-background: #f8f8f8
|
|
135
|
-
|
|
136
|
-
tiddler-link-background: <<colour background>>
|
|
137
|
-
tiddler-link-foreground: <<colour primary>>
|
|
138
|
-
tiddler-subtitle-foreground: rgba(0,0,0,0.38)
|
|
139
|
-
tiddler-title-foreground: #0d47a1
|
|
140
|
-
|
|
141
|
-
toolbar-new-button: #1976d2
|
|
142
|
-
toolbar-options-button: #1976d2
|
|
143
|
-
toolbar-save-button: #2e7d32
|
|
144
|
-
toolbar-info-button: #0288d1
|
|
145
|
-
toolbar-edit-button: #ed6c02
|
|
146
|
-
toolbar-close-button: #d32f2f
|
|
147
|
-
toolbar-delete-button: #d32f2f
|
|
148
|
-
toolbar-cancel-button: #9e9e9e
|
|
149
|
-
toolbar-done-button: #2e7d32
|
|
150
|
-
|
|
151
|
-
untagged-background: #9e9e9e
|
|
152
|
-
|
|
153
|
-
wikilist-background: #e5e5e5
|
|
154
|
-
wikilist-item: #ffffff
|
|
155
|
-
wikilist-info: <<colour foreground>>
|
|
156
|
-
wikilist-title: #666666
|
|
157
|
-
wikilist-title-svg: <<colour wikilist-title>>
|
|
158
|
-
wikilist-url: #757575
|
|
159
|
-
|
|
160
|
-
wikilist-button-open: #4caf50
|
|
161
|
-
wikilist-button-open-hover: #388e3c
|
|
162
|
-
wikilist-button-reveal: #1976d2
|
|
163
|
-
wikilist-button-reveal-hover: #0d47a1
|
|
164
|
-
wikilist-button-remove: #d32f2f
|
|
165
|
-
wikilist-button-remove-hover: #b71c1c
|
|
166
|
-
|
|
167
|
-
wikilist-toolbar-background: #d3d3d3
|
|
168
|
-
wikilist-toolbar-foreground: #888888
|
|
169
|
-
wikilist-droplink-dragover: rgba(255,192,192,0.5)
|
|
170
|
-
|
|
171
|
-
wikilist-button-background: #acacac
|
|
172
|
-
wikilist-button-foreground: #000000
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
title: $:/plugins/tiddlywiki/multiwikiclient/info-segment
|
|
2
|
-
tags: $:/tags/TiddlerInfoSegment
|
|
3
|
-
|
|
4
|
-
<$reveal type="nomatch" state=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
|
5
|
-
<div class="tc-subtitle">
|
|
6
|
-
Bag: <$view tiddler="$:/state/multiwikiclient/tiddlers/bag" index=<<currentTiddler>>>(none)</$view>
|
|
7
|
-
</div>
|
|
8
|
-
</$reveal>
|