@tramvai/module-server 1.101.2 → 1.101.6
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 +6 -0
- package/lib/server.es.js +6 -1
- package/lib/server.js +6 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -107,6 +107,12 @@ _For example, we want to distribute sw.js file from the project's root:_ for thi
|
|
|
107
107
|
|
|
108
108
|
This function is also available in production. For this purpose, copy the folder `public` into the docker container
|
|
109
109
|
|
|
110
|
+
:::caution
|
|
111
|
+
|
|
112
|
+
Module will not serve the newly added file on the filesystem, works only for all defined files in the served folder at the time of the server startup.
|
|
113
|
+
|
|
114
|
+
:::
|
|
115
|
+
|
|
110
116
|
### PAPI
|
|
111
117
|
|
|
112
118
|
Papi - API routes for the `tramvai` application. More information is available in [Papi](features/papi/introduction.md)
|
package/lib/server.es.js
CHANGED
|
@@ -547,7 +547,12 @@ ServerStaticsModule = __decorate([
|
|
|
547
547
|
return (instance) => {
|
|
548
548
|
instance.register(FastifyStatic, {
|
|
549
549
|
decorateReply: false,
|
|
550
|
-
prefix
|
|
550
|
+
// for backward compatibility, leaving default prefix.
|
|
551
|
+
// without `wildcard: false` property, this middleware has conflicts with express compatibility plugin
|
|
552
|
+
prefix: `/`,
|
|
553
|
+
// prevent errors by use FastifyStatic only for all defined files in the served folder,
|
|
554
|
+
// will not serve the newly added file on the filesystem - https://github.com/fastify/fastify-static#wildcard
|
|
555
|
+
wildcard: false,
|
|
551
556
|
root: resolve(process.cwd(), path),
|
|
552
557
|
setHeaders: (res) => {
|
|
553
558
|
const oneYearForward = new Date(Date.now() + ONE_YEAR * 1000);
|
package/lib/server.js
CHANGED
|
@@ -572,7 +572,12 @@ ServerStaticsModule = tslib.__decorate([
|
|
|
572
572
|
return (instance) => {
|
|
573
573
|
instance.register(FastifyStatic__default["default"], {
|
|
574
574
|
decorateReply: false,
|
|
575
|
-
prefix
|
|
575
|
+
// for backward compatibility, leaving default prefix.
|
|
576
|
+
// without `wildcard: false` property, this middleware has conflicts with express compatibility plugin
|
|
577
|
+
prefix: `/`,
|
|
578
|
+
// prevent errors by use FastifyStatic only for all defined files in the served folder,
|
|
579
|
+
// will not serve the newly added file on the filesystem - https://github.com/fastify/fastify-static#wildcard
|
|
580
|
+
wildcard: false,
|
|
576
581
|
root: path.resolve(process.cwd(), path$1),
|
|
577
582
|
setHeaders: (res) => {
|
|
578
583
|
const oneYearForward = new Date(Date.now() + ONE_YEAR * 1000);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-server",
|
|
3
|
-
"version": "1.101.
|
|
3
|
+
"version": "1.101.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"@tinkoff/monkeypatch": "1.3.3",
|
|
24
24
|
"@tinkoff/terminus": "0.0.3",
|
|
25
25
|
"@tinkoff/url": "0.7.37",
|
|
26
|
-
"@tramvai/module-cache-warmup": "1.101.
|
|
27
|
-
"@tramvai/module-metrics": "1.101.
|
|
28
|
-
"@tramvai/papi": "1.101.
|
|
29
|
-
"@tramvai/tokens-server": "1.101.
|
|
30
|
-
"@tramvai/tokens-server-private": "1.101.
|
|
26
|
+
"@tramvai/module-cache-warmup": "1.101.6",
|
|
27
|
+
"@tramvai/module-metrics": "1.101.6",
|
|
28
|
+
"@tramvai/papi": "1.101.6",
|
|
29
|
+
"@tramvai/tokens-server": "1.101.6",
|
|
30
|
+
"@tramvai/tokens-server-private": "1.101.6",
|
|
31
31
|
"compression": "^1.7.4",
|
|
32
32
|
"express": "^4.17.1",
|
|
33
33
|
"fastify": "^3.29.0",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"http-proxy-middleware": "^2.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@tinkoff/dippy": "0.7.
|
|
41
|
+
"@tinkoff/dippy": "0.7.40",
|
|
42
42
|
"@tinkoff/utils": "^2.1.2",
|
|
43
|
-
"@tramvai/cli": "1.101.
|
|
44
|
-
"@tramvai/core": "1.101.
|
|
45
|
-
"@tramvai/module-common": "1.101.
|
|
46
|
-
"@tramvai/module-environment": "1.101.
|
|
47
|
-
"@tramvai/tokens-common": "1.101.
|
|
43
|
+
"@tramvai/cli": "1.101.6",
|
|
44
|
+
"@tramvai/core": "1.101.6",
|
|
45
|
+
"@tramvai/module-common": "1.101.6",
|
|
46
|
+
"@tramvai/module-environment": "1.101.6",
|
|
47
|
+
"@tramvai/tokens-common": "1.101.6",
|
|
48
48
|
"tslib": "^2.0.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|