@tiddlywiki/mws 0.1.13 → 0.2.0
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 +41 -20
- package/dist/metafile-esm.json +1 -1
- package/dist/mws.js +40249 -20249
- package/dist/mws.js.map +1 -1
- package/mws.run.mjs +28 -8
- package/package.json +20 -33
- package/plugins/client/plugin.info +1 -1
- package/plugins/client/src/multiwikiclientadaptor.ts +11 -39
- package/plugins/client/src/mws.d.ts +2 -1
- package/plugins/client/src/new-multiwikiclientadaptor.ts +634 -0
- package/plugins/client/src/types.d.ts +2531 -1036
- package/plugins/client/tiddlers/managetiddleraction.js +0 -5
- package/plugins/client/tiddlers/syncer/multiwikiclientadaptor.js +1 -1
- package/plugins/client/tiddlers/syncer/new-multiwikiclientadaptor.js +432 -0
- package/plugins/client/tiddlers/syncer/syncer.js +123 -241
- package/plugins/client/tsconfig.json +5 -1
- package/prisma/browser.ts +2 -0
- package/prisma/client/browser.ts +84 -0
- package/prisma/client/client.ts +108 -0
- package/prisma/client/commonInputTypes.ts +598 -0
- package/prisma/client/enums.ts +42 -0
- package/prisma/client/internal/class.ts +326 -0
- package/prisma/client/internal/prismaNamespace.ts +1870 -0
- package/prisma/client/internal/prismaNamespaceBrowser.ts +259 -0
- package/prisma/client/models/Bag.ts +1701 -0
- package/prisma/client/models/BagPermission.ts +1284 -0
- package/prisma/client/models/Recipe.ts +1722 -0
- package/prisma/client/models/RecipeBag.ts +1518 -0
- package/prisma/client/models/RecipePermission.ts +1284 -0
- package/prisma/client/models/Roles.ts +1316 -0
- package/prisma/client/models/Sessions.ts +1344 -0
- package/prisma/client/models/Settings.ts +1093 -0
- package/prisma/client/models/Template.ts +1477 -0
- package/prisma/client/models/TemplatePermission.ts +1284 -0
- package/prisma/client/models/Tiddler.ts +1434 -0
- package/prisma/client/models/TiddlerEvent.ts +1360 -0
- package/prisma/client/models/Users.ts +1579 -0
- package/prisma/client/models.ts +24 -0
- package/prisma/client/pjtg.ts +183 -0
- package/prisma/index.ts +74 -0
- package/prisma/migrations/20260708160259_init/migration.sql +172 -0
- package/prisma/migrations-v1/migration_lock.toml +3 -0
- package/prisma/package.json +12 -0
- package/prisma/schema.prisma +147 -89
- package/prisma/types.ts +9 -0
- package/public/.default.html +1 -0
- package/public/admin-vanilla/fish.svg +399 -0
- package/public/admin-vanilla/fish2.svg +389 -0
- package/public/admin-vanilla/main-64WYHWYI.js +1791 -0
- package/public/admin-vanilla/main-64WYHWYI.js.map +7 -0
- package/public/admin-vanilla/main-LYDE4NDJ.css +1 -0
- package/public/admin-vanilla/normalize.css +349 -0
- package/public/admin-vanilla/polyfill-ADOI2A4V.js +2 -0
- package/public/admin-vanilla/polyfill-ADOI2A4V.js.map +7 -0
- package/public/{react-admin → admin-vanilla}/site.webmanifest +1 -1
- package/public/admin-vanilla.html +62 -0
- package/public/admin-vanilla.json +1 -0
- package/public/{react-admin → stats}/stats.html +5 -2
- package/public/{react-admin → stats}/stats.js +2 -1
- package/scripts/build-docs.sh +30 -0
- package/scripts/helpers.mjs +107 -0
- package/scripts/json.js +8 -0
- package/scripts/scripts.mjs +114 -0
- package/prisma/client/client.d.ts +0 -1
- package/prisma/client/client.js +0 -3
- package/prisma/client/default.d.ts +0 -1
- package/prisma/client/default.js +0 -3
- package/prisma/client/edge.d.ts +0 -1
- package/prisma/client/edge.js +0 -297
- package/prisma/client/index-browser.js +0 -275
- package/prisma/client/index.d.ts +0 -17770
- package/prisma/client/index.js +0 -324
- package/prisma/client/package.json +0 -173
- package/prisma/client/query_engine_bg.js +0 -811
- package/prisma/client/query_engine_bg.wasm +0 -0
- package/prisma/client/runtime/edge-esm.js +0 -10000
- package/prisma/client/runtime/edge.js +0 -10036
- package/prisma/client/runtime/index-browser.d.ts +0 -370
- package/prisma/client/runtime/index-browser.js +0 -2300
- package/prisma/client/runtime/library.d.ts +0 -3681
- package/prisma/client/runtime/library.js +0 -10604
- package/prisma/client/runtime/react-native.js +0 -10629
- package/prisma/client/runtime/wasm-compiler-edge.js +0 -11238
- package/prisma/client/runtime/wasm-engine-edge.js +0 -7801
- package/prisma/client/schema.prisma +0 -156
- package/prisma/client/wasm-edge-light-loader.mjs +0 -4
- package/prisma/client/wasm-worker-loader.mjs +0 -4
- package/prisma/client/wasm.d.ts +0 -1
- package/prisma/client/wasm.js +0 -304
- package/prisma/global.ts +0 -53
- package/public/react-admin/chunk-YALWN5OT.js +0 -2
- package/public/react-admin/esm-L4WLVWJN.js +0 -3
- package/public/react-admin/esm-L4WLVWJN.js.map +0 -7
- package/public/react-admin/esm-QMNGI3LF.js +0 -3
- package/public/react-admin/esm-QMNGI3LF.js.map +0 -7
- package/public/react-admin/index.html +0 -36
- package/public/react-admin/main.js +0 -268
- package/public/react-admin/main.js.map +0 -7
- package/public/react-admin/stats.json +0 -1
- package/scripts.mjs +0 -142
- /package/prisma/{migrations → migrations-v1}/20250606001949_init/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250613000526_remove_group/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250620014502_settings/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250707205229_recipes/migration.sql +0 -0
- /package/public/{react-admin → admin-vanilla}/android-chrome-192x192.png +0 -0
- /package/public/{react-admin → admin-vanilla}/android-chrome-512x512.png +0 -0
- /package/public/{react-admin → admin-vanilla}/apple-touch-icon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon-16x16.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon-32x32.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon.ico +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon.png +0 -0
- /package/public/{react-admin/chunk-YALWN5OT.js.map → admin-vanilla/main-LYDE4NDJ.css.map} +0 -0
- /package/public/{react-admin → admin-vanilla}/missing-favicon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/motovun-jack.jpg +0 -0
- /package/public/{react-admin → admin-vanilla}/mws-icon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/vite.svg +0 -0
- /package/public/{react-admin → stats}/stats.css +0 -0
- /package/public/{react-admin → stats}/stats.svg +0 -0
package/README.md
CHANGED
|
@@ -23,13 +23,25 @@ Multiple users, multiple wikis for TiddlyWiki.
|
|
|
23
23
|
|
|
24
24
|
Most of these features are still in development.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
## Here's a sneak peak at the new UI that's coming
|
|
27
|
+
|
|
28
|
+
### Dark Mode
|
|
29
|
+
|
|
30
|
+
<img width="800" alt="light mode" src="https://github.com/user-attachments/assets/d2c8177a-e504-4bff-999d-4b260467ac2e" />
|
|
31
|
+
|
|
32
|
+
### Light Mode
|
|
33
|
+
|
|
34
|
+
<img width="800" alt="dark mode" src="https://github.com/user-attachments/assets/301cb61c-1f39-4d4f-8f4a-8ecd5306c084" />
|
|
35
|
+
|
|
36
|
+
## Warning: Security between users is still a dumpster fire.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
**While the database structure is reliable, the security mechanism is more like swiss cheese.**
|
|
29
39
|
|
|
30
|
-
**
|
|
40
|
+
**Do not use it to protect feelings or intellectual property.**
|
|
41
|
+
|
|
42
|
+
**There are plenty of ways for anyone with write access to get around the security restrictions.**
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
<img width="800" alt="this is fine" src="https://github.com/user-attachments/assets/49505d25-7a48-42f1-b4f7-73e8630c1ba1" />
|
|
33
45
|
|
|
34
46
|
|
|
35
47
|
## Also, this is a database, please make backups
|
|
@@ -42,13 +54,12 @@ The init command creates a new folder and installs what you need to get started.
|
|
|
42
54
|
|
|
43
55
|
- `npm init @tiddlywiki/mws@latest my-folder`
|
|
44
56
|
- `cd my-folder`
|
|
45
|
-
- `npx mws init-store`
|
|
46
57
|
- `npx mws listen --listener`
|
|
47
58
|
|
|
48
59
|
You can run `npx mws help` to get more information about the commands.
|
|
49
60
|
|
|
50
61
|
- the server runs on port `8080`. It does not use HTTPS by default, but you can enable it by specifying a key and cert.
|
|
51
|
-
- A `passwords.key` file is created which contains the password master salt. If this file changes, all passwords will need to be reset.
|
|
62
|
+
- A `passwords.key` file is created which contains the password master salt. If this file changes, all passwords will become unusable and need to be reset.
|
|
52
63
|
- Your database is in the `store` folder. All files in the `store` folder are data files, not temp or lock files! Never delete them!
|
|
53
64
|
|
|
54
65
|
The initial user created on first run has the username `admin` and password `1234`.
|
|
@@ -57,38 +68,48 @@ If you run into trouble, or need help figuring something out, feel free to [star
|
|
|
57
68
|
|
|
58
69
|
## Updates
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
Within 0.x versions, please do NOT use `npm install` to update your instance from one minor version to the next.
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
To update between 0.x versions, open each wiki and click the cloud status icon, then click "save snapshot for offline use". You can then create a new instance and import your wikis via the browser.
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
- `npm install @tiddlywiki/mws@latest`
|
|
75
|
+
_Always, always, always save a backup of your store folder before updating._
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
### Starting with 0.2
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
- You can update to the latest version of MWS using `npm update`.
|
|
80
|
+
- You can update to the latest version of tiddywiki using `npx mws update-tiddlywiki`.
|
|
81
|
+
|
|
82
|
+
If there are any database changes, MWS should pick them up and apply them on startup. The changes are generated by prisma's builtin migration and are supposed to preserve data, but backups are still highly recommended.
|
|
70
83
|
|
|
71
84
|
## Backups
|
|
72
85
|
|
|
73
|
-
It is recommended to backup your entire data folder, not just the `store` folder,
|
|
86
|
+
It is recommended to backup your entire data folder, not just the `store` folder, with a few exceptions.
|
|
74
87
|
|
|
75
88
|
- You must *always* backup the *entire* `store` folder. Never delete any files in the `store` folder. All files in the `store` folder are data files!
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- The `node_modules` folder
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
- `passwords.key` can be backed up, but since it never changes you could also just save a copy of it in a more secure location separate from your normal backups.
|
|
90
|
+
- You should backup `package.json` and `package-lock.json`.
|
|
91
|
+
- The `node_modules` folder can be ignored. `npm ci` will reinstall the `node_modules` folder based on `package-lock.json`.
|
|
92
|
+
- The `cache` folder (next to the `store` folder) is generated every time MWS starts, so it's nothing but bloat. You can always ignore it.
|
|
93
|
+
- Only the `tw5/versions.txt` file needs to be saved from the `tw5` folder.
|
|
94
|
+
|
|
95
|
+
So essentially, the paths you need to backup are:
|
|
96
|
+
- `/package.json`
|
|
97
|
+
- `/package-lock.json`
|
|
98
|
+
- `/store`
|
|
99
|
+
- `/tw5/versions.txt`
|
|
100
|
+
- `/passwords.key` (or save it separately)
|
|
81
101
|
|
|
82
102
|
## Development
|
|
83
103
|
|
|
84
|
-
In 0.
|
|
104
|
+
In 0.2, the development data folder is `/dev/wiki`.
|
|
85
105
|
|
|
86
|
-
If you want to work on the project,
|
|
106
|
+
If you want to work on the project, or just try out the latest changes,
|
|
87
107
|
|
|
88
108
|
- `git clone https://github.com/TiddlyWiki/MultiWikiServer`
|
|
89
109
|
- `cd MultiWikiServer`
|
|
90
110
|
- `npm install` or `npm run install-android`
|
|
91
111
|
- `npm run certs` - if you want https (unix only)
|
|
112
|
+
- `npm start update-tiddlywiki` - Download the latest TiddlyWiki version
|
|
92
113
|
- `npm start init-store` - Create the `admin` user and import default wikis.
|
|
93
114
|
- `npm start` - this will run the build every time, but it's very fast.
|
|
94
115
|
|