@naturalcycles/backend-lib 4.11.0 → 4.12.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.
@@ -5,7 +5,7 @@ const js_lib_1 = require("@naturalcycles/js-lib");
5
5
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
6
6
  const deployInfo_util_1 = require("./deployInfo.util");
7
7
  const { versions } = process;
8
- const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, APP_ENV } = process.env;
8
+ const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, APP_ENV, NODE_OPTIONS } = process.env;
9
9
  function serverStatusMiddleware(projectDir, extra) {
10
10
  return async (req, res) => {
11
11
  res.json(getServerStatusData(projectDir, extra));
@@ -17,7 +17,7 @@ function getServerStatusData(projectDir = process.cwd(), extra) {
17
17
  const t = (0, js_lib_1.localTime)(ts);
18
18
  const deployBuildTime = t.toPretty();
19
19
  const buildInfo = [t.toStringCompact(), gitBranch, gitRev].filter(Boolean).join('_');
20
- return (0, js_lib_1._filterFalsyValues)({
20
+ return (0, js_lib_1._filterNullishValues)({
21
21
  started: getStartedStr(),
22
22
  deployBuildTime,
23
23
  APP_ENV,
@@ -30,6 +30,8 @@ function getServerStatusData(projectDir = process.cwd(), extra) {
30
30
  cpuAvg: nodejs_lib_1.processSharedUtil.cpuAvg(),
31
31
  // resourceUsage: process.resourceUsage?.(),
32
32
  versions,
33
+ NODE_OPTIONS,
34
+ fetch: typeof globalThis.fetch === 'function',
33
35
  ...extra,
34
36
  });
35
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install && patch-package",
6
6
  "serve": "APP_ENV=dev nodemon",
@@ -1,10 +1,10 @@
1
- import { _filterFalsyValues, localTime } from '@naturalcycles/js-lib'
1
+ import { _filterNullishValues, localTime } from '@naturalcycles/js-lib'
2
2
  import { memoryUsageFull, processSharedUtil } from '@naturalcycles/nodejs-lib'
3
3
  import { getDeployInfo } from './deployInfo.util'
4
4
  import { BackendRequestHandler } from './server.model'
5
5
 
6
6
  const { versions } = process
7
- const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, APP_ENV } = process.env
7
+ const { GAE_APPLICATION, GAE_SERVICE, GAE_VERSION, APP_ENV, NODE_OPTIONS } = process.env
8
8
 
9
9
  export function serverStatusMiddleware(projectDir?: string, extra?: any): BackendRequestHandler {
10
10
  return async (req, res) => {
@@ -21,7 +21,7 @@ export function getServerStatusData(
21
21
  const deployBuildTime = t.toPretty()
22
22
  const buildInfo = [t.toStringCompact(), gitBranch, gitRev].filter(Boolean).join('_')
23
23
 
24
- return _filterFalsyValues({
24
+ return _filterNullishValues({
25
25
  started: getStartedStr(),
26
26
  deployBuildTime,
27
27
  APP_ENV,
@@ -34,6 +34,8 @@ export function getServerStatusData(
34
34
  cpuAvg: processSharedUtil.cpuAvg(),
35
35
  // resourceUsage: process.resourceUsage?.(),
36
36
  versions,
37
+ NODE_OPTIONS,
38
+ fetch: typeof globalThis.fetch === 'function',
37
39
  ...extra,
38
40
  })
39
41
  }