@tiddlywiki/mws 0.1.9 → 0.1.11
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 +2 -2
- package/dist/metafile-esm.json +1 -1
- package/dist/mws.js +43 -50
- package/dist/mws.js.map +1 -1
- package/editions/mws-docs/tiddlers/$__StoryList.tid +5 -2
- package/editions/mws-docs/tiddlers/$__config_RelinkOnRename.tid +6 -0
- package/editions/mws-docs/tiddlers/2025-05-06 - syncer design.md +5 -1
- package/editions/mws-docs/tiddlers/2025-05-06 - syncer design.md.meta +1 -1
- package/editions/mws-docs/tiddlers/Bag.md +1 -0
- package/editions/mws-docs/tiddlers/Bag.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Complex Example.md +11 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Complex Example.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Model.md +14 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Model.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Simple Example.md +13 -0
- package/editions/mws-docs/tiddlers/Bags and Recipes Simple Example.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Code Layout.md +94 -0
- package/editions/mws-docs/tiddlers/Code Layout.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Entity Access Control.md +1 -0
- package/editions/mws-docs/tiddlers/Entity Access Control.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Entity Owner.md +3 -0
- package/editions/mws-docs/tiddlers/Entity Owner.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Entity Permissions.md +7 -0
- package/editions/mws-docs/tiddlers/Entity Permissions.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Entity.md +3 -0
- package/editions/mws-docs/tiddlers/Entity.md.meta +5 -0
- package/editions/mws-docs/tiddlers/HelloThere.tid +2 -2
- package/editions/mws-docs/tiddlers/Installation.md +31 -0
- package/editions/mws-docs/tiddlers/Installation.md.meta +5 -0
- package/editions/mws-docs/tiddlers/MWS Architecture_1.md +2 -0
- package/editions/mws-docs/tiddlers/{MWS Architecture.tid → MWS Architecture_1.md.meta } +2 -4
- package/editions/mws-docs/tiddlers/Recipe Bag Priority.md +5 -0
- package/editions/mws-docs/tiddlers/Recipe Bag Priority.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Recipe.tid +6 -0
- package/editions/mws-docs/tiddlers/Security.md +7 -7
- package/editions/mws-docs/tiddlers/Security.md.meta +1 -1
- package/editions/mws-docs/tiddlers/Server Routes.md +54 -0
- package/editions/mws-docs/tiddlers/Server Routes.md.meta +5 -0
- package/editions/mws-docs/tiddlers/Site Admin.md +3 -0
- package/editions/mws-docs/tiddlers/Site Admin.md.meta +4 -0
- package/editions/mws-docs/tiddlers/Wiki.md +2 -0
- package/editions/mws-docs/tiddlers/Wiki.md.meta +4 -0
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css +1 -1
- package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css.meta +1 -1
- package/mws.run.mjs +2 -2
- package/package.json +1 -1
- package/plugins/client/src/multiwikiclientadaptor.ts +16 -9
- package/plugins/client/tiddlers/syncer/multiwikiclientadaptor.js +9 -10
- package/plugins/client/tiddlers/syncer/syncer.js +3 -3
- package/public/react-admin/main.js +10 -10
- package/public/react-admin/main.js.map +3 -3
- package/public/react-admin/stats.json +1 -1
- package/scripts.mjs +4 -5
- package/editions/mws-docs/tiddlers/Bags and Recipes.tid +0 -41
- package/editions/mws-docs/tiddlers/Installation.tid +0 -32
- package/prisma/test.sqlite +0 -0
- package/prisma/test.sqlite-journal +0 -0
package/scripts.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const workspaces = [
|
|
|
23
23
|
SKIPDTS: "1"
|
|
24
24
|
});
|
|
25
25
|
await start("node --trace-uncaught --trace-warnings mws.dev.mjs", process.argv.slice(3), {
|
|
26
|
-
|
|
26
|
+
ENABLE_DEV_SERVER: "mws",
|
|
27
27
|
ENABLE_EXTERNAL_PLUGINS: "1",
|
|
28
28
|
});
|
|
29
29
|
break;
|
|
@@ -69,7 +69,7 @@ const workspaces = [
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
await Promise.resolve().then(async () => {
|
|
72
|
-
await start("mv node_modules
|
|
72
|
+
await start("mv node_modules node_modules_off");
|
|
73
73
|
}).then(async () => {
|
|
74
74
|
await start("git clean -dfx tests");
|
|
75
75
|
const filesFolder = path.resolve("create-package/files");
|
|
@@ -93,7 +93,7 @@ const workspaces = [
|
|
|
93
93
|
}).then(async () => {
|
|
94
94
|
await start("npx mws init-store", [], {}, { cwd: "tests" });
|
|
95
95
|
}).finally(async () => {
|
|
96
|
-
await start("mv
|
|
96
|
+
await start("mv node_modules_off node_modules");
|
|
97
97
|
});
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
@@ -118,7 +118,6 @@ function start(cmd, args = [], env2 = {}, { cwd = process.cwd(), pipeOut } = {})
|
|
|
118
118
|
events.on("exit", (code) => { cp.kill(code); });
|
|
119
119
|
|
|
120
120
|
if(pipeOut) {
|
|
121
|
-
|
|
122
121
|
return new Promise((r, c) => {
|
|
123
122
|
const chunks = [];
|
|
124
123
|
cp.stdout.on("data", (data) => {
|
|
@@ -138,6 +137,6 @@ function start(cmd, args = [], env2 = {}, { cwd = process.cwd(), pipeOut } = {})
|
|
|
138
137
|
cp.on("exit", (code) => { if(code) c(code); else r(); });
|
|
139
138
|
});
|
|
140
139
|
}
|
|
140
|
+
}
|
|
141
141
|
|
|
142
142
|
|
|
143
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
created: 20240309135835396
|
|
2
|
-
modified: 20240309142156125
|
|
3
|
-
title: Bags and Recipes
|
|
4
|
-
type: text/vnd.tiddlywiki
|
|
5
|
-
|
|
6
|
-
The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008.
|
|
7
|
-
|
|
8
|
-
The principles of bags and recipes can be simply stated:
|
|
9
|
-
|
|
10
|
-
# Tiddlers are stored in named "bags"
|
|
11
|
-
# Bags have access controls that determines which users can read or write to them
|
|
12
|
-
# Recipes are named lists of bags, ordered from lowest priority to highest
|
|
13
|
-
# The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler
|
|
14
|
-
# Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template
|
|
15
|
-
|
|
16
|
-
A very simple example of the recipe/bag model might be for a single user who maintains the following bags:
|
|
17
|
-
|
|
18
|
-
* ''recipes'' - tiddlers related to cooking recipes
|
|
19
|
-
* ''work'' - tiddlers related to work
|
|
20
|
-
* ''app'' - common tiddlers for customising TiddlyWiki
|
|
21
|
-
|
|
22
|
-
Those bags would be used with the following recipes:
|
|
23
|
-
|
|
24
|
-
* ''recipes'' --> recipes, app - wiki for working with recipes, with common custom components
|
|
25
|
-
* ''work'' --> work, app - wiki for working with work, with common custom components
|
|
26
|
-
* ''app'' --> app - wiki for maintaining custom components
|
|
27
|
-
|
|
28
|
-
All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis.
|
|
29
|
-
|
|
30
|
-
A more complex example might be for a teacher working with a group of students:
|
|
31
|
-
|
|
32
|
-
* ''student-{name}'' bag for each students work
|
|
33
|
-
* ''teacher-course'' bag for the coursework, editable by the teacher
|
|
34
|
-
* ''teacher-tools'' bag for custom tools used by the teacher
|
|
35
|
-
|
|
36
|
-
Those bags would be exposed through the following hosted wikis:
|
|
37
|
-
|
|
38
|
-
* ''student-{name}'' hosted wiki for each students work, including the coursework material
|
|
39
|
-
* ''teacher-course'' hosted wiki for the coursework, editable by the teacher
|
|
40
|
-
* ''teacher'' hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work
|
|
41
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
created: 20241105133737778
|
|
2
|
-
modified: 20250612235731394
|
|
3
|
-
tags: TableOfContents
|
|
4
|
-
title: Installation
|
|
5
|
-
type: text/vnd.tiddlywiki
|
|
6
|
-
|
|
7
|
-
These instructions require minimal knowledge of the terminal and require NodeJS to be installed.
|
|
8
|
-
|
|
9
|
-
# Open a terminal window and set the current directory to the folder you want to create the project folder in.
|
|
10
|
-
# The init command creates the project folder and installs the required dependencies and config files. You can change the name to whatever you like. <<.copy-code-to-clipboard """npm init @tiddlywiki/mws@latest "new_folder_name" """>>
|
|
11
|
-
# Set the current directory to the project folder that was just created: <<.copy-code-to-clipboard """cd "new_folder_name" """>>
|
|
12
|
-
# Start MWS: <<.copy-code-to-clipboard "npm start">>
|
|
13
|
-
# Visit http://localhost:8080 in a browser on the same computer.
|
|
14
|
-
# When you have finished using MWS, stop the server with <kbd>ctrl-C</kbd>
|
|
15
|
-
|
|
16
|
-
See [[Troubleshooting]] if you encounter any errors.
|
|
17
|
-
|
|
18
|
-
!!! Updating MWS
|
|
19
|
-
|
|
20
|
-
To update your copy of MWS in the future with newer changes will require re-downloading the code, taking care not to lose any changes you might have made.
|
|
21
|
-
|
|
22
|
-
# Make a backup: Copy or zip your project folder to a safe backup folder. <<.copy-code-to-clipboard "tar -cf archive.tar my_folder">>
|
|
23
|
-
# Get the latest version. Notice that the second word is `install` instead of `init`. This pulls the latest version from NPM and installs it. <<.copy-code-to-clipboard "npm install @tiddlywiki/mws@latest --save-exact">>
|
|
24
|
-
# Start the server. On startup, MWS checks the database schema and updates it automatically if there are changes. Normally this works just fine, but it can fail, which is why it's important to save a backup first. <<.copy-code-to-clipboard "npm start">>
|
|
25
|
-
|
|
26
|
-
!!! Git repo
|
|
27
|
-
|
|
28
|
-
It is recommended to save a history of your project configuration using git,
|
|
29
|
-
|
|
30
|
-
* On Windows you can use [[GitHub Desktop|https://github.com/apps/desktop]].
|
|
31
|
-
* On Linux, git is usually preinstalled or available via the default package manager for your distro.
|
|
32
|
-
|
package/prisma/test.sqlite
DELETED
|
Binary file
|
|
Binary file
|