wiki-server 0.26.3 → 0.28.0-rc.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/lib/server.js +13 -4
- package/package.json +8 -8
package/lib/server.js
CHANGED
|
@@ -26,7 +26,7 @@ import { pipeline } from 'node:stream/promises'
|
|
|
26
26
|
|
|
27
27
|
// From npm
|
|
28
28
|
import express from 'express'
|
|
29
|
-
import
|
|
29
|
+
import { engine } from 'express-handlebars'
|
|
30
30
|
import f from 'flates'
|
|
31
31
|
|
|
32
32
|
import createDOMPurify from 'dompurify'
|
|
@@ -233,10 +233,18 @@ export default async argv => {
|
|
|
233
233
|
maxAge: '1h',
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
const viewsPath = path.join(require.resolve('wiki-client/package.json'), '..', 'views')
|
|
237
|
+
app.set('views', viewsPath)
|
|
238
|
+
|
|
239
|
+
app.engine(
|
|
240
|
+
'html',
|
|
241
|
+
engine({
|
|
242
|
+
extname: '.html',
|
|
243
|
+
layoutsDir: viewsPath,
|
|
244
|
+
defaultLayout: 'static',
|
|
245
|
+
}),
|
|
246
|
+
)
|
|
237
247
|
app.set('view engine', 'html')
|
|
238
|
-
app.engine('html', hbs.express4())
|
|
239
|
-
app.set('view options', { layout: false })
|
|
240
248
|
|
|
241
249
|
// return deterministically colored strings
|
|
242
250
|
const colorString = str => {
|
|
@@ -369,6 +377,7 @@ export default async argv => {
|
|
|
369
377
|
.split('/')
|
|
370
378
|
.slice(1)
|
|
371
379
|
.filter((_, index) => index % 2 === 0)
|
|
380
|
+
.map(u => (u.endsWith(':') ? u.slice(0, -1) : u))
|
|
372
381
|
if (['plugin', 'auth'].indexOf(urlLocs[0]) > -1) {
|
|
373
382
|
return next()
|
|
374
383
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-server",
|
|
3
3
|
"description": "A Federated Wiki Server",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.28.0-rc.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ward Cunningham",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"body-parser": "^2.2.1",
|
|
36
36
|
"client-sessions": "^0.8.0",
|
|
37
37
|
"cookie-parser": "^1.4.4",
|
|
38
|
-
"dompurify": "^3.
|
|
38
|
+
"dompurify": "^3.4.0",
|
|
39
39
|
"errorhandler": "^1.5.1",
|
|
40
40
|
"express": "^5.1.0",
|
|
41
|
-
"express-
|
|
41
|
+
"express-handlebars": "^9.0.1",
|
|
42
42
|
"flates": "0.0.5",
|
|
43
|
-
"jsdom": "^
|
|
43
|
+
"jsdom": "^29.0.2",
|
|
44
44
|
"method-override": "^3.0.0",
|
|
45
45
|
"minisearch": "^7.2.0",
|
|
46
46
|
"morgan": "^1.10.1",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@eslint/js": "^10.0.1",
|
|
59
|
-
"eslint": "^10.
|
|
60
|
-
"globals": "^17.
|
|
59
|
+
"eslint": "^10.2.0",
|
|
60
|
+
"globals": "^17.5.0",
|
|
61
61
|
"grunt-git-authors": "^3.2.0",
|
|
62
|
-
"prettier": "^3.
|
|
62
|
+
"prettier": "^3.8.2",
|
|
63
63
|
"supertest": "^7.1.4",
|
|
64
|
-
"wiki-client": "^0.
|
|
64
|
+
"wiki-client": "^0.32.0",
|
|
65
65
|
"wiki-plugin-activity": "0.7",
|
|
66
66
|
"wiki-plugin-video": "^0.4"
|
|
67
67
|
},
|