@luckystack/server 0.2.6 → 0.3.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 +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.js +141 -70
- package/dist/index.js.map +1 -1
- package/docs/http-routes.md +1 -1
- package/package.json +10 -10
package/docs/http-routes.md
CHANGED
|
@@ -188,7 +188,7 @@ A handler returns `true` (or simply ends `res`) to short-circuit dispatch; retur
|
|
|
188
188
|
|
|
189
189
|
**Behavior:**
|
|
190
190
|
|
|
191
|
-
- `/assets/*` paths:
|
|
191
|
+
- `/assets/*` paths: matched via `startsWith('/assets/')`; the (percent-decoded) routePath is rejected with `404` when it contains `..` (path-traversal guard at the framework boundary), then `req.url` is temporarily rewritten to the routePath, `options.serveFile` is called, and `req.url` restored. Without `serveFile`, returns `404 Not Found`.
|
|
192
192
|
- Paths matching `KNOWN_STATIC_FILE_REGEX` (`/^\/(assets\/[a-zA-Z0-9_\-/]+|[a-zA-Z0-9_\-]+)\.(png|jpg|jpeg|gif|svg|html|css|js)$/`): call `serveFile` directly without URL rewrite.
|
|
193
193
|
- Other paths that have an extension `path.extname(routePath)`: `404 Not Found` (text/plain).
|
|
194
194
|
- Extensionless paths (SPA routes): rewrite `req.url` to `/`, call `serveFile`. Without `serveFile`, returns `404 Not Found`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luckystack/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
"test": "vitest run"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@luckystack/api": "^0.
|
|
61
|
-
"@luckystack/core": "^0.
|
|
60
|
+
"@luckystack/api": "^0.3.0",
|
|
61
|
+
"@luckystack/core": "^0.3.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@prisma/client": "^6.19.0",
|
|
65
65
|
"socket.io": "^4.8.0",
|
|
66
|
-
"@luckystack/devkit": "^0.
|
|
67
|
-
"@luckystack/docs-ui": "^0.
|
|
68
|
-
"@luckystack/email": "^0.
|
|
69
|
-
"@luckystack/error-tracking": "^0.
|
|
70
|
-
"@luckystack/login": "^0.
|
|
71
|
-
"@luckystack/presence": "^0.
|
|
72
|
-
"@luckystack/sync": "^0.
|
|
66
|
+
"@luckystack/devkit": "^0.3.0",
|
|
67
|
+
"@luckystack/docs-ui": "^0.3.0",
|
|
68
|
+
"@luckystack/email": "^0.3.0",
|
|
69
|
+
"@luckystack/error-tracking": "^0.3.0",
|
|
70
|
+
"@luckystack/login": "^0.3.0",
|
|
71
|
+
"@luckystack/presence": "^0.3.0",
|
|
72
|
+
"@luckystack/sync": "^0.3.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"@luckystack/devkit": {
|