@naturalcycles/backend-lib 5.4.0 → 5.4.1

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.
@@ -126,7 +126,7 @@ class BaseAdminService {
126
126
  const grantedPermissions = hasPermissions
127
127
  ? reqPermissions.filter(p => hasPermissions.has(p))
128
128
  : [];
129
- let granted = false;
129
+ let granted;
130
130
  if (andComparison) {
131
131
  granted = !!hasPermissions && grantedPermissions.length === reqPermissions.length; // All permissions granted
132
132
  void this.onPermissionCheck(req, email, reqPermissions, true, granted, meta);
@@ -36,6 +36,6 @@ function getServerStatusData(projectDir = process.cwd(), extra) {
36
36
  }
37
37
  exports.getServerStatusData = getServerStatusData;
38
38
  function getStartedStr() {
39
- const started = (0, js_lib_1.localTimeNow)().subtract(process.uptime(), 'second');
39
+ const started = (0, js_lib_1.localTimeNow)().minus(process.uptime(), 'second');
40
40
  return `${started.toPretty()} (${started.fromNow()})`;
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
6
  "dev": "APP_ENV=dev nodemon",
@@ -191,7 +191,7 @@ export class BaseAdminService {
191
191
  ? reqPermissions.filter(p => hasPermissions.has(p))
192
192
  : []
193
193
 
194
- let granted = false
194
+ let granted: boolean
195
195
  if (andComparison) {
196
196
  granted = !!hasPermissions && grantedPermissions.length === reqPermissions.length // All permissions granted
197
197
  void this.onPermissionCheck(req, email, reqPermissions, true, granted, meta)
@@ -40,6 +40,6 @@ export function getServerStatusData(
40
40
  }
41
41
 
42
42
  function getStartedStr(): string {
43
- const started = localTimeNow().subtract(process.uptime(), 'second')
43
+ const started = localTimeNow().minus(process.uptime(), 'second')
44
44
  return `${started.toPretty()} (${started.fromNow()})`
45
45
  }