@naturalcycles/backend-lib 9.2.0 → 9.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.
|
@@ -2,7 +2,7 @@ import { _filterNullishValues, localTime } from '@naturalcycles/js-lib';
|
|
|
2
2
|
import { memoryUsageFull, processSharedUtil } from '@naturalcycles/nodejs-lib';
|
|
3
3
|
import { getDeployInfo } from './deployInfo.util.js';
|
|
4
4
|
const { versions, arch, platform } = process;
|
|
5
|
-
const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, K_SERVICE, K_REVISION, APP_ENV, NODE_OPTIONS } = process.env;
|
|
5
|
+
const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, GOOGLE_CLOUD_PROJECT, K_SERVICE, K_REVISION, APP_ENV, NODE_OPTIONS, } = process.env;
|
|
6
6
|
export function serverStatusMiddleware(projectDir, extra) {
|
|
7
7
|
return async (_req, res) => {
|
|
8
8
|
res.json(getServerStatusData(projectDir, extra));
|
|
@@ -18,6 +18,7 @@ export function getServerStatusData(projectDir = process.cwd(), extra) {
|
|
|
18
18
|
deployBuildTime,
|
|
19
19
|
APP_ENV,
|
|
20
20
|
buildInfo,
|
|
21
|
+
GOOGLE_CLOUD_PROJECT,
|
|
21
22
|
GAE_APPLICATION,
|
|
22
23
|
GAE_SERVICE,
|
|
23
24
|
GAE_VERSION,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/backend-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.3.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@sentry/node": "^9"
|
|
7
7
|
},
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"lint": "dev-lib lint",
|
|
70
70
|
"bt": "dev-lib bt",
|
|
71
71
|
"clean": "dev-lib clean",
|
|
72
|
+
"check": "dev-lib check",
|
|
72
73
|
"typecheck": "dev-lib typecheck",
|
|
73
74
|
"dev": "APP_ENV=dev tsx watch src/test/server/server.ts",
|
|
74
75
|
"deploy-gae": "tsx src/bin/deploy-gae.ts",
|
|
@@ -4,8 +4,16 @@ import { getDeployInfo } from './deployInfo.util.js'
|
|
|
4
4
|
import type { BackendRequestHandler } from './server.model.js'
|
|
5
5
|
|
|
6
6
|
const { versions, arch, platform } = process
|
|
7
|
-
const {
|
|
8
|
-
|
|
7
|
+
const {
|
|
8
|
+
GAE_APPLICATION,
|
|
9
|
+
GAE_SERVICE,
|
|
10
|
+
GAE_VERSION,
|
|
11
|
+
GOOGLE_CLOUD_PROJECT,
|
|
12
|
+
K_SERVICE,
|
|
13
|
+
K_REVISION,
|
|
14
|
+
APP_ENV,
|
|
15
|
+
NODE_OPTIONS,
|
|
16
|
+
} = process.env
|
|
9
17
|
|
|
10
18
|
export function serverStatusMiddleware(projectDir?: string, extra?: any): BackendRequestHandler {
|
|
11
19
|
return async (_req, res) => {
|
|
@@ -27,6 +35,7 @@ export function getServerStatusData(
|
|
|
27
35
|
deployBuildTime,
|
|
28
36
|
APP_ENV,
|
|
29
37
|
buildInfo,
|
|
38
|
+
GOOGLE_CLOUD_PROJECT,
|
|
30
39
|
GAE_APPLICATION,
|
|
31
40
|
GAE_SERVICE,
|
|
32
41
|
GAE_VERSION,
|