@naturalcycles/backend-lib 9.65.0 → 9.66.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.
@@ -1,4 +1,4 @@
1
- import { _memoFn } from '@naturalcycles/js-lib/decorators/memoFn.js';
1
+ import { _memoized } from '@naturalcycles/js-lib/decorators';
2
2
  import { AppError } from '@naturalcycles/js-lib/error/error.util.js';
3
3
  import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
4
4
  import { srcDir } from '../paths.cnst.js';
@@ -45,7 +45,7 @@ export function loginHtml(firebaseServiceCfg) {
45
45
  }));
46
46
  };
47
47
  }
48
- const getLoginHtml = _memoFn((cfg) => {
48
+ const getLoginHtml = _memoized((cfg) => {
49
49
  console.log(`reading login.html`);
50
50
  return fs2
51
51
  .readText(`${srcDir}/admin/login.html`)
@@ -1,7 +1,7 @@
1
1
  import { localTime } from '@naturalcycles/js-lib/datetime/localTime.js';
2
- import { _memoFn } from '@naturalcycles/js-lib/decorators/memoFn.js';
2
+ import { _memoized } from '@naturalcycles/js-lib/decorators';
3
3
  import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
4
- export const getDeployInfo = _memoFn((projectDir) => {
4
+ export const getDeployInfo = _memoized((projectDir) => {
5
5
  const deployInfoPath = `${projectDir}/deployInfo.json`;
6
6
  try {
7
7
  return fs2.readJson(deployInfoPath);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
3
  "type": "module",
4
- "version": "9.65.0",
4
+ "version": "9.66.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/db-lib": "^10",
7
7
  "@naturalcycles/js-lib": "^15",
@@ -1,4 +1,4 @@
1
- import { _memoFn } from '@naturalcycles/js-lib/decorators/memoFn.js'
1
+ import { _memoized } from '@naturalcycles/js-lib/decorators'
2
2
  import { AppError } from '@naturalcycles/js-lib/error/error.util.js'
3
3
  import { fs2 } from '@naturalcycles/nodejs-lib/fs2'
4
4
  import { srcDir } from '../paths.cnst.js'
@@ -114,7 +114,7 @@ export function loginHtml(firebaseServiceCfg: FirebaseSharedServiceCfg): Backend
114
114
  }
115
115
  }
116
116
 
117
- const getLoginHtml = _memoFn((cfg: LoginHtmlCfg) => {
117
+ const getLoginHtml = _memoized((cfg: LoginHtmlCfg) => {
118
118
  console.log(`reading login.html`)
119
119
  return fs2
120
120
  .readText(`${srcDir}/admin/login.html`)
@@ -1,9 +1,9 @@
1
1
  import { localTime } from '@naturalcycles/js-lib/datetime/localTime.js'
2
- import { _memoFn } from '@naturalcycles/js-lib/decorators/memoFn.js'
2
+ import { _memoized } from '@naturalcycles/js-lib/decorators'
3
3
  import { fs2 } from '@naturalcycles/nodejs-lib/fs2'
4
4
  import type { DeployInfo } from './deploy.model.js'
5
5
 
6
- export const getDeployInfo = _memoFn((projectDir: string): DeployInfo => {
6
+ export const getDeployInfo = _memoized((projectDir: string): DeployInfo => {
7
7
  const deployInfoPath = `${projectDir}/deployInfo.json`
8
8
  try {
9
9
  return fs2.readJson(deployInfoPath)