@tiddlywiki/mws 0.0.12 → 0.0.14

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.
Files changed (66) hide show
  1. package/.env-cmdrc +5 -0
  2. package/README.md +3 -1
  3. package/dist/server.d.ts +923 -0
  4. package/dist/server.js +1763 -1415
  5. package/dist/server.js.map +1 -1
  6. package/editions/mws-docs/tiddlers/$__StoryList.tid +3 -3
  7. package/editions/mws-docs/tiddlers/MWS and SQLite.md +11 -0
  8. package/editions/mws-docs/tiddlers/Request Server.md +20 -0
  9. package/editions/mws-docs/tiddlers/Request Server.md.meta +5 -0
  10. package/package.json +17 -10
  11. package/prisma/schema.prisma +1 -0
  12. package/react-user-mgmt/package-lock.json +76 -321
  13. package/react-user-mgmt/package.json +2 -5
  14. package/react-user-mgmt/public/chunk-YALWN5OT.js +2 -0
  15. package/react-user-mgmt/public/chunk-YALWN5OT.js.map +7 -0
  16. package/react-user-mgmt/public/esm-QKDFEP3B.js +3 -0
  17. package/react-user-mgmt/public/esm-QKDFEP3B.js.map +7 -0
  18. package/react-user-mgmt/public/index.html +1 -26
  19. package/react-user-mgmt/public/main.js +68 -109
  20. package/react-user-mgmt/public/main.js.map +4 -4
  21. package/react-user-mgmt/public/stats.css +597 -0
  22. package/react-user-mgmt/public/stats.html +59 -0
  23. package/react-user-mgmt/public/stats.js +2013 -0
  24. package/react-user-mgmt/public/stats.json +1 -0
  25. package/react-user-mgmt/public/stats.svg +4 -0
  26. package/react-user-mgmt/tsconfig.json +3 -0
  27. package/dist/server.cjs +0 -16677
  28. package/dist/server.cjs.map +0 -1
  29. package/src/StateObject.ts +0 -316
  30. package/src/commander.ts +0 -417
  31. package/src/commands/divider.ts +0 -20
  32. package/src/commands/index.ts +0 -24
  33. package/src/commands/mws-init-store.ts +0 -77
  34. package/src/commands/mws-listen.ts +0 -136
  35. package/src/commands/mws-load-archive.ts +0 -281
  36. package/src/commands/mws-load-plugin-bags.ts +0 -151
  37. package/src/commands/mws-load-tiddlers.ts +0 -37
  38. package/src/commands/mws-load-wiki-folder.ts +0 -124
  39. package/src/commands/mws-render-tiddlywiki5.ts +0 -55
  40. package/src/commands/mws-save-archive.ts +0 -111
  41. package/src/commands/mws-save-tiddler-text.ts +0 -33
  42. package/src/commands/tests-complete.ts +0 -21
  43. package/src/global.ts +0 -247
  44. package/src/routes/TiddlerStore.ts +0 -722
  45. package/src/routes/bag-file-server.ts +0 -340
  46. package/src/routes/cache.ts +0 -25
  47. package/src/routes/index.ts +0 -138
  48. package/src/routes/managers/index.ts +0 -17
  49. package/src/routes/managers/manager-recipes.ts +0 -438
  50. package/src/routes/managers/manager-users.ts +0 -201
  51. package/src/routes/managers/router-tiddlers.ts +0 -313
  52. package/src/routes/router.ts +0 -429
  53. package/src/routes/services/PasswordService.ts +0 -178
  54. package/src/routes/services/attachments.ts +0 -259
  55. package/src/routes/services/sessions.ts +0 -166
  56. package/src/routes/tw-test.ts +0 -65
  57. package/src/server.ts +0 -151
  58. package/src/setupDevServer.ts +0 -71
  59. package/src/streamer.ts +0 -430
  60. package/src/tiddlywiki.ts +0 -94
  61. package/src/utils/data-checks.ts +0 -172
  62. package/src/utils/index.ts +0 -4
  63. package/src/utils/rootRoute.ts +0 -237
  64. package/src/utils/utils.ts +0 -403
  65. package/src/utils/zodAssert.ts +0 -269
  66. /package/prisma/{migrations/notes.md → notes.md} +0 -0
@@ -0,0 +1,597 @@
1
+ html:not([data-theme=dark]) {
2
+ --bg: #fff;
3
+ --fg-on: #000;
4
+ --fg: #222;
5
+ --pre-dim: #777;
6
+ --pre-val: #870;
7
+ --pre: #222;
8
+ --bar-min-width: 1px
9
+ }
10
+
11
+ html[data-theme=dark] {
12
+ color-scheme: dark;
13
+ --bg: #191919;
14
+ --fg-on: #ddd;
15
+ --fg: #aaa;
16
+ --pre-dim: #999;
17
+ --pre-val: #cb8;
18
+ --pre: #ccc;
19
+ --bar-min-width: 3px
20
+ }
21
+
22
+ @media (prefers-color-scheme: dark) {
23
+ html:not([data-theme=light]) {
24
+ color-scheme:dark;
25
+ --bg: #191919;
26
+ --fg-on: #ddd;
27
+ --fg: #aaa;
28
+ --pre-dim: #999;
29
+ --pre-val: #cb8;
30
+ --pre: #ccc;
31
+ --bar-min-width: 3px
32
+ }
33
+ }
34
+
35
+ body {
36
+ margin: 50px;
37
+ font: 16px/20px sans-serif;
38
+ background: var(--bg);
39
+ color: var(--fg)
40
+ }
41
+
42
+ #startPanel {
43
+ margin: 10% auto 0
44
+ }
45
+
46
+ #resultsPanel {
47
+ display: none
48
+ }
49
+
50
+ section {
51
+ margin: auto;
52
+ max-width: 600px
53
+ }
54
+
55
+ #logo {
56
+ background-image: url(stats.svg);
57
+ background-size: 80px;
58
+ background-repeat: no-repeat;
59
+ padding-left: 100px;
60
+ display: inline-block;
61
+ text-align: left;
62
+ margin-bottom: 10px
63
+ }
64
+
65
+ h1 {
66
+ font-size: 80px;
67
+ line-height: 1em;
68
+ color: var(--fg-on);
69
+ margin: 0
70
+ }
71
+
72
+ blockquote {
73
+ font-size: 29px;
74
+ line-height: 1em;
75
+ margin: 5px 0;
76
+ font-style: italic
77
+ }
78
+
79
+ p {
80
+ margin: 20px 0
81
+ }
82
+
83
+ a,b {
84
+ color: var(--fg-on)
85
+ }
86
+
87
+ code {
88
+ font: 14px/20px Noto Sans Mono,monospace;
89
+ background: rgba(127,127,127,.2);
90
+ padding: 2px 4px;
91
+ margin-bottom: -2px;
92
+ border-radius: 3px
93
+ }
94
+
95
+ pre {
96
+ color: var(--pre);
97
+ font: 14px/20px Noto Sans Mono,monospace;
98
+ padding: 0;
99
+ margin: 0;
100
+ white-space: pre-wrap
101
+ }
102
+
103
+ .center {
104
+ text-align: center
105
+ }
106
+
107
+ .noscript {
108
+ color: #e24834
109
+ }
110
+
111
+ button {
112
+ padding: 5px 30px;
113
+ line-height: 1.5em;
114
+ background: none;
115
+ color: var(--fg);
116
+ border: 1px solid var(--fg);
117
+ border-radius: 100px;
118
+ cursor: pointer
119
+ }
120
+
121
+ button:active,button:hover {
122
+ color: var(--fg-on);
123
+ border: 1px solid var(--fg-on);
124
+ background: rgba(127,127,127,.2)
125
+ }
126
+
127
+ button:active {
128
+ padding: 6px 30px 4px;
129
+ background: rgba(0,0,0,.2)
130
+ }
131
+
132
+ #settingsPanel {
133
+ text-align: center
134
+ }
135
+
136
+ #settingsPanel .chartSwitcher {
137
+ position: relative;
138
+ margin: 50px 0;
139
+ display: flex;
140
+ justify-content: center
141
+ }
142
+
143
+ #settingsPanel .chartSwitcher:after {
144
+ position: absolute;
145
+ left: 0;
146
+ right: 0;
147
+ top: .5em;
148
+ content: "";
149
+ display: block;
150
+ border: 1px solid #FFCF00;
151
+ z-index: -1
152
+ }
153
+
154
+ #settingsPanel .chartSwitcher span {
155
+ background: var(--bg);
156
+ padding: 0 1em;
157
+ border-left: 2px solid #FFCF00
158
+ }
159
+
160
+ #settingsPanel .chartSwitcher span:first-child {
161
+ border: none
162
+ }
163
+
164
+ #settingsPanel a {
165
+ text-decoration: none;
166
+ color: var(--fg)
167
+ }
168
+
169
+ #settingsPanel a:hover {
170
+ text-decoration: underline
171
+ }
172
+
173
+ #settingsPanel a.r {
174
+ font-weight: 700;
175
+ color: var(--fg-on)
176
+ }
177
+
178
+ .n {
179
+ max-width: 600px;
180
+ margin: auto
181
+ }
182
+
183
+ .p {
184
+ position: absolute;
185
+ background: black;
186
+ color: #999;
187
+ border-radius: 30px;
188
+ padding: 0 10px;
189
+ font-size: 14px;
190
+ line-height: 30px;
191
+ display: none;
192
+ -webkit-user-select: none;
193
+ user-select: none;
194
+ touch-action: none;
195
+ pointer-events: none;
196
+ z-index: 1;
197
+ white-space: pre
198
+ }
199
+
200
+ .p b {
201
+ color: #fff
202
+ }
203
+
204
+ #dragTarget {
205
+ display: none;
206
+ position: fixed;
207
+ top: 0;
208
+ right: 0;
209
+ bottom: 0;
210
+ left: 0;
211
+ -webkit-user-select: none;
212
+ user-select: none;
213
+ touch-action: none;
214
+ box-shadow: inset 0 0 0 10px #ffcf00;
215
+ z-index: 10
216
+ }
217
+
218
+ #summaryPanel {
219
+ text-align: center
220
+ }
221
+
222
+ #summaryPanel table {
223
+ border-collapse: collapse;
224
+ margin: auto
225
+ }
226
+
227
+ #summaryPanel td:first-child {
228
+ text-align: right
229
+ }
230
+
231
+ #summaryPanel h2 {
232
+ font-size: 30px;
233
+ line-height: 1em;
234
+ color: var(--fg-on);
235
+ margin: 0
236
+ }
237
+
238
+ #summaryPanel .l {
239
+ font-size: 30px;
240
+ padding: 0 30px
241
+ }
242
+
243
+ #summaryPanel .o {
244
+ display: inline-block;
245
+ margin: 20px auto 0;
246
+ white-space: nowrap;
247
+ text-decoration: none
248
+ }
249
+
250
+ #summaryPanel .o:hover .d {
251
+ text-decoration: underline
252
+ }
253
+
254
+ #summaryPanel .g {
255
+ display: inline-table;
256
+ vertical-align: middle;
257
+ margin: 0 .8em;
258
+ border: 1px solid #222
259
+ }
260
+
261
+ #summaryPanel .g>div {
262
+ height: 20px;
263
+ display: table-cell
264
+ }
265
+
266
+ #x {
267
+ padding-left: 1.6em;
268
+ line-height: 1.1em
269
+ }
270
+
271
+ #x .c {
272
+ display: inline-block;
273
+ vertical-align: middle;
274
+ width: 1.1em;
275
+ height: 1.1em;
276
+ margin-left: -1.6em;
277
+ margin-right: .5em;
278
+ border: 1px solid #222;
279
+ box-sizing: border-box
280
+ }
281
+
282
+ #x small {
283
+ display: block;
284
+ opacity: .5;
285
+ margin-bottom: 1em
286
+ }
287
+
288
+ #s {
289
+ margin: 0 -50px;
290
+ padding: 0 50px
291
+ }
292
+
293
+ #s main {
294
+ position: relative;
295
+ margin-top: 60px
296
+ }
297
+
298
+ #s canvas {
299
+ position: absolute;
300
+ left: 0;
301
+ top: 0;
302
+ right: 0;
303
+ margin: auto;
304
+ padding-bottom: 50px
305
+ }
306
+
307
+ #s section {
308
+ margin-top: 30px;
309
+ min-height: 200px
310
+ }
311
+
312
+ #b {
313
+ position: fixed;
314
+ top: 0;
315
+ right: 0;
316
+ bottom: 0;
317
+ left: 0;
318
+ padding: 50px;
319
+ background: rgba(0,0,0,.6);
320
+ overflow-y: auto
321
+ }
322
+
323
+ #b .m {
324
+ position: relative;
325
+ margin: 0 auto;
326
+ padding: 50px;
327
+ max-width: 1000px;
328
+ background: var(--bg);
329
+ box-shadow: 0 10px 20px rgba(0,0,0,.6);
330
+ box-sizing: border-box;
331
+ border-radius: 20px
332
+ }
333
+
334
+ #b .m:focus {
335
+ outline: none
336
+ }
337
+
338
+ #b .h {
339
+ position: absolute;
340
+ right: 0;
341
+ top: 0;
342
+ width: 50px;
343
+ text-decoration: none;
344
+ font-size: 30px;
345
+ line-height: 50px;
346
+ text-align: center;
347
+ color: var(--fg)
348
+ }
349
+
350
+ #b .h:hover {
351
+ font-size: 35px;
352
+ color: var(--fg-on)
353
+ }
354
+
355
+ #b .h:active {
356
+ font-size: 30px
357
+ }
358
+
359
+ #b h2 {
360
+ border-bottom: 2px solid #FFCF00;
361
+ padding-bottom: 4px;
362
+ margin: 0;
363
+ font-size: 20px;
364
+ line-height: 1.2em;
365
+ color: var(--fg-on)
366
+ }
367
+
368
+ #b .f {
369
+ position: relative;
370
+ border: 1px solid rgba(127,127,127,.5);
371
+ padding: 30px 10px 10px;
372
+ border-radius: 10px;
373
+ white-space: pre-wrap;
374
+ margin-top: 10px;
375
+ line-height: 22px
376
+ }
377
+
378
+ #b .u {
379
+ position: absolute;
380
+ left: 0;
381
+ top: 0;
382
+ background: rgba(127,127,127,.1);
383
+ border-right: 1px solid rgba(127,127,127,.5);
384
+ border-bottom: 1px solid rgba(127,127,127,.5);
385
+ border-top-left-radius: 10px;
386
+ border-bottom-right-radius: 10px;
387
+ padding: 5px 10px
388
+ }
389
+
390
+ #b pre {
391
+ padding: 0 0 0 30px
392
+ }
393
+
394
+ #b .v {
395
+ color: var(--pre-dim)
396
+ }
397
+
398
+ #b .w {
399
+ color: var(--fg-on)
400
+ }
401
+
402
+ #b .k {
403
+ color: var(--pre-val)
404
+ }
405
+
406
+ #b .e,#b .i {
407
+ position: relative
408
+ }
409
+
410
+ #b .e:after,#b .i:after {
411
+ content: "";
412
+ position: absolute;
413
+ top: 0;
414
+ width: 30px;
415
+ background: var(--fg);
416
+ opacity: .5
417
+ }
418
+
419
+ #b .e:after {
420
+ height: 40px;
421
+ --icon: url('data:image/svg+xml,<svg width="30" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M16.5 26L20.5 35L23 25.5L16.5 26Z"/><path d="M5 7C15 7 19 15 20 30" fill="none" stroke="black"/></svg>');
422
+ -webkit-mask-image: var(--icon);
423
+ mask-image: var(--icon)
424
+ }
425
+
426
+ #b .i:after {
427
+ height: 90px;
428
+ --icon: url('data:image/svg+xml,<svg width="30" height="90" xmlns="http://www.w3.org/2000/svg"><path d="M17 76L20 85L23 76H17Z"/><path d="M5 7C15 7 20 25 20 80" fill="none" stroke="black"/></svg>');
429
+ -webkit-mask-image: var(--icon);
430
+ mask-image: var(--icon)
431
+ }
432
+
433
+ #y main {
434
+ display: flex;
435
+ justify-content: center;
436
+ margin-top: 50px;
437
+ margin-bottom: 500px
438
+ }
439
+
440
+ #y .z {
441
+ margin-right: 20px;
442
+ display: flex;
443
+ flex-direction: column;
444
+ align-items: center
445
+ }
446
+
447
+ #y canvas {
448
+ display: block;
449
+ margin-bottom: 30px
450
+ }
451
+
452
+ #y .F {
453
+ flex: 1;
454
+ max-width: 800px;
455
+ position: relative
456
+ }
457
+
458
+ #y .P {
459
+ font-size: 20px;
460
+ line-height: 1.2em;
461
+ display: flex;
462
+ white-space: pre;
463
+ margin: 0 10px 20px
464
+ }
465
+
466
+ #y .P .C {
467
+ flex: 1;
468
+ height: 20px
469
+ }
470
+
471
+ #y .P a {
472
+ opacity: .5;
473
+ text-decoration: none
474
+ }
475
+
476
+ #y .P a[href]:hover {
477
+ text-decoration: underline
478
+ }
479
+
480
+ #y .P a:last-child {
481
+ opacity: 1;
482
+ color: var(--fg-on);
483
+ font-weight: 700
484
+ }
485
+
486
+ #y .S {
487
+ width: 100%
488
+ }
489
+
490
+ #y .S .j {
491
+ display: table-row;
492
+ text-decoration: none;
493
+ line-height: 26px;
494
+ color: var(--fg)
495
+ }
496
+
497
+ #y .S .j.a {
498
+ background: rgba(127,127,127,.2);
499
+ color: var(--fg-on)
500
+ }
501
+
502
+ #y .S .j.a .t:after {
503
+ content: "";
504
+ position: absolute;
505
+ left: 1px;
506
+ top: 1px;
507
+ right: 1px;
508
+ bottom: 1px;
509
+ background: rgba(255,255,255,.3)
510
+ }
511
+
512
+ #y .S .j>div {
513
+ display: table-cell
514
+ }
515
+
516
+ #y .S .M {
517
+ padding: 0 10px;
518
+ vertical-align: top;
519
+ white-space: pre
520
+ }
521
+
522
+ #y .S .N {
523
+ width: 100%;
524
+ padding-right: 100px
525
+ }
526
+
527
+ #y .S .t {
528
+ position: relative;
529
+ height: 27px;
530
+ box-shadow: inset 0 0 0 1px #222;
531
+ margin-bottom: -1px;
532
+ min-width: var(--bar-min-width)
533
+ }
534
+
535
+ #y .S .t.q {
536
+ min-width: 0
537
+ }
538
+
539
+ #y .S .T {
540
+ position: absolute;
541
+ right: -10px;
542
+ width: 0;
543
+ white-space: nowrap
544
+ }
545
+
546
+ #A main {
547
+ position: relative;
548
+ margin-top: 60px
549
+ }
550
+
551
+ #A canvas {
552
+ position: absolute;
553
+ left: -50px;
554
+ top: 0
555
+ }
556
+
557
+ #A section {
558
+ margin-top: 30px;
559
+ min-height: 500px
560
+ }
561
+
562
+ #warningsPanel {
563
+ max-width: 1000px;
564
+ margin: auto
565
+ }
566
+
567
+ #warningsPanel .B {
568
+ margin-top: 20px;
569
+ text-align: center
570
+ }
571
+
572
+ #warningsPanel .D {
573
+ display: none
574
+ }
575
+
576
+ #warningsPanel .E {
577
+ margin: 30px 0;
578
+ white-space: pre-wrap;
579
+ color: var(--fg-on)
580
+ }
581
+
582
+ #warningsPanel ul {
583
+ color: var(--fg);
584
+ margin: 5px 0 0
585
+ }
586
+
587
+ #warningsPanel .G {
588
+ opacity: .5
589
+ }
590
+
591
+ #warningsPanel pre a {
592
+ text-decoration: none
593
+ }
594
+
595
+ #warningsPanel pre a:hover {
596
+ text-decoration: underline
597
+ }
@@ -0,0 +1,59 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf8">
6
+ <title>esbuild - Bundle Size Analyzer</title>
7
+ <link rel="icon" type="image/svg+xml" href="stats.svg">
8
+ <link rel="stylesheet" href="stats.css">
9
+ <meta property="og:title" content="esbuild - Bundle Size Analyzer" />
10
+ <meta property="og:type" content="website" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1">
12
+ </head>
13
+
14
+ <body>
15
+ <div id="dragTarget"></div>
16
+ <div id="startPanel">
17
+ <section>
18
+ <div class="center">
19
+ <div id="logo">
20
+ <h1>esbuild</h1>
21
+ <blockquote>Bundle Size Analyzer</blockquote>
22
+ </div>
23
+ </div>
24
+ <p>
25
+ This page provides a way to visualize the contents of your esbuild bundle.
26
+ Add the <a href="/api/#metafile">metafile</a> option to your esbuild command, then import it using the button
27
+ below:
28
+ </p>
29
+ <p class="center">
30
+ <button id="importButton">Import your metafile...</button>
31
+ </p>
32
+ <p>
33
+ Or you can <a href="javascript:void 0" id="loadExample">load an example</a> to play around with the
34
+ visualization.
35
+ </p>
36
+ <noscript>
37
+ <p class="noscript">
38
+ &#x274C; This page requires JavaScript.
39
+ Please enable JavaScript and reload the page.
40
+ </p>
41
+ </noscript>
42
+ </section>
43
+ </div>
44
+ <div id="resultsPanel">
45
+ <div id="summaryPanel"></div>
46
+ <div id="warningsPanel"></div>
47
+ <div id="settingsPanel">
48
+ <div class="chartSwitcher">
49
+ <span><a id="useTreemap" href="javascript:void 0">Treemap Chart</a></span>
50
+ <span><a id="useSunburst" href="javascript:void 0">Sunburst Chart</a></span>
51
+ <span><a id="useFlame" href="javascript:void 0">Flame Chart</a></span>
52
+ </div>
53
+ </div>
54
+ <div id="chartPanel"></div>
55
+ </div>
56
+ <script src="stats.js"></script>
57
+ </body>
58
+
59
+ </html>