@naturalcycles/backend-lib 9.65.0 → 9.67.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 {
|
|
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 =
|
|
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 {
|
|
2
|
+
import { _memoized } from '@naturalcycles/js-lib/decorators';
|
|
3
3
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
|
|
4
|
-
export const getDeployInfo =
|
|
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.
|
|
4
|
+
"version": "9.67.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@naturalcycles/db-lib": "^10",
|
|
7
7
|
"@naturalcycles/js-lib": "^15",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@naturalcycles/dev-lib": "0.0.0",
|
|
46
47
|
"@sentry/node-core": "^10",
|
|
47
48
|
"@types/busboy": "^1",
|
|
48
49
|
"typescript": "^7",
|
|
49
|
-
"fastify": "^5"
|
|
50
|
-
"@naturalcycles/dev-lib": "0.0.0"
|
|
50
|
+
"fastify": "^5"
|
|
51
51
|
},
|
|
52
52
|
"exports": {
|
|
53
53
|
".": "./dist/index.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 =
|
|
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 {
|
|
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 =
|
|
6
|
+
export const getDeployInfo = _memoized((projectDir: string): DeployInfo => {
|
|
7
7
|
const deployInfoPath = `${projectDir}/deployInfo.json`
|
|
8
8
|
try {
|
|
9
9
|
return fs2.readJson(deployInfoPath)
|