@naturalcycles/backend-lib 5.4.1 → 5.4.2
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.
|
@@ -32,7 +32,7 @@ exports.createAndSaveDeployInfo = createAndSaveDeployInfo;
|
|
|
32
32
|
async function createDeployInfo(backendCfg, overrideBranch) {
|
|
33
33
|
const simpleGit = require('simple-git'); // lazy load
|
|
34
34
|
const git = simpleGit('.');
|
|
35
|
-
const now =
|
|
35
|
+
const now = js_lib_1.localTime.now();
|
|
36
36
|
const gitBranch = overrideBranch || (await git.status()).current;
|
|
37
37
|
const gitRev = (await git.revparse(['HEAD'])).slice(0, 7);
|
|
38
38
|
let { gaeProject, gaeProjectByBranch = {}, gaeService, gaeServiceByBranch = {}, branchesWithTimestampVersions = [], } = backendCfg;
|
|
@@ -36,6 +36,6 @@ function getServerStatusData(projectDir = process.cwd(), extra) {
|
|
|
36
36
|
}
|
|
37
37
|
exports.getServerStatusData = getServerStatusData;
|
|
38
38
|
function getStartedStr() {
|
|
39
|
-
const started =
|
|
39
|
+
const started = js_lib_1.localTime.now().minus(process.uptime(), 'second');
|
|
40
40
|
return `${started.toPretty()} (${started.fromNow()})`;
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/backend-lib",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky",
|
|
6
|
-
"dev": "APP_ENV=dev
|
|
6
|
+
"dev": "APP_ENV=dev node -r ts-node/register --watch ./src/test/server/server.ts",
|
|
7
7
|
"docs-serve": "NODE_OPTIONS=--openssl-legacy-provider vuepress dev docs",
|
|
8
8
|
"docs-build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build docs",
|
|
9
9
|
"deploy-gae": "yarn tsn ./src/bin/deploy-gae.ts",
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
"yargs": "^17.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@naturalcycles/bench-lib": "^
|
|
39
|
+
"@naturalcycles/bench-lib": "^3.0.0",
|
|
40
40
|
"@naturalcycles/dev-lib": "^13.0.0",
|
|
41
41
|
"@sentry/node": "^7.0.0",
|
|
42
42
|
"@types/ejs": "^3.0.0",
|
|
43
43
|
"@types/node": "^20.1.0",
|
|
44
44
|
"@types/yargs": "^16.0.0",
|
|
45
45
|
"fastify": "^4.0.0",
|
|
46
|
-
"jest": "^29.0.1"
|
|
47
|
-
"nodemon": "^3.0.1"
|
|
46
|
+
"jest": "^29.0.1"
|
|
48
47
|
},
|
|
49
48
|
"files": [
|
|
50
49
|
"dist",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _assert, _mapValues, _merge, _truncate,
|
|
1
|
+
import { _assert, _mapValues, _merge, _truncate, localTime } from '@naturalcycles/js-lib'
|
|
2
2
|
import { dimGrey, fs2, white } from '@naturalcycles/nodejs-lib'
|
|
3
3
|
import { BackendCfg } from './backend.cfg.util'
|
|
4
4
|
import { AppYaml, DeployInfo } from './deploy.model'
|
|
@@ -40,7 +40,7 @@ export async function createDeployInfo(
|
|
|
40
40
|
const simpleGit = require('simple-git') // lazy load
|
|
41
41
|
const git = simpleGit('.')
|
|
42
42
|
|
|
43
|
-
const now =
|
|
43
|
+
const now = localTime.now()
|
|
44
44
|
const gitBranch = overrideBranch || (await git.status()).current!
|
|
45
45
|
const gitRev = (await git.revparse(['HEAD'])).slice(0, 7)
|
|
46
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _filterNullishValues, localTime
|
|
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'
|
|
@@ -40,6 +40,6 @@ export function getServerStatusData(
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function getStartedStr(): string {
|
|
43
|
-
const started =
|
|
43
|
+
const started = localTime.now().minus(process.uptime(), 'second')
|
|
44
44
|
return `${started.toPretty()} (${started.fromNow()})`
|
|
45
45
|
}
|