@naturalcycles/backend-lib 9.0.6 → 9.0.7
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cookieParser from 'cookie-parser';
|
|
2
2
|
import cors from 'cors';
|
|
3
3
|
import express from 'express';
|
|
4
|
-
import { isGAE } from '../util.js';
|
|
4
|
+
import { isCloudRun, isGAE } from '../util.js';
|
|
5
5
|
import { asyncLocalStorageMiddleware } from './asyncLocalStorageMiddleware.js';
|
|
6
6
|
import { genericErrorMiddleware } from './genericErrorMiddleware.js';
|
|
7
7
|
import { logMiddleware } from './logMiddleware.js';
|
|
@@ -26,7 +26,7 @@ export async function createDefaultApp(cfg) {
|
|
|
26
26
|
app.use(requestTimeoutMiddleware());
|
|
27
27
|
// app.use(serverStatsMiddleware()) // disabled by default
|
|
28
28
|
// app.use(bodyParserTimeout()) // removed by default
|
|
29
|
-
if (!isGAE() && !isTest) {
|
|
29
|
+
if (!isGAE() && !isCloudRun() && !isTest) {
|
|
30
30
|
app.use(simpleRequestLoggerMiddleware());
|
|
31
31
|
}
|
|
32
32
|
// app.use(safeJsonMiddleware()) // optional
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/backend-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.7",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@sentry/node": "^9"
|
|
7
7
|
},
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"simple-git": "^3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
+
"@naturalcycles/dev-lib": "^18",
|
|
27
28
|
"@sentry/node": "^9",
|
|
28
29
|
"@types/ejs": "^3",
|
|
29
30
|
"fastify": "^5"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cookieParser from 'cookie-parser'
|
|
2
2
|
import cors from 'cors'
|
|
3
3
|
import express from 'express'
|
|
4
|
-
import { isGAE } from '../util.js'
|
|
4
|
+
import { isCloudRun, isGAE } from '../util.js'
|
|
5
5
|
import { asyncLocalStorageMiddleware } from './asyncLocalStorageMiddleware.js'
|
|
6
6
|
import type {
|
|
7
7
|
BackendRequestHandlerCfg,
|
|
@@ -41,7 +41,7 @@ export async function createDefaultApp(cfg: DefaultAppCfg): Promise<BackendAppli
|
|
|
41
41
|
// app.use(serverStatsMiddleware()) // disabled by default
|
|
42
42
|
// app.use(bodyParserTimeout()) // removed by default
|
|
43
43
|
|
|
44
|
-
if (!isGAE() && !isTest) {
|
|
44
|
+
if (!isGAE() && !isCloudRun() && !isTest) {
|
|
45
45
|
app.use(simpleRequestLoggerMiddleware())
|
|
46
46
|
}
|
|
47
47
|
|