@naturalcycles/backend-lib 9.55.0 → 9.57.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,3 +1,4 @@
|
|
|
1
|
+
import { loadEnvFileIfExists } from '@naturalcycles/nodejs-lib';
|
|
1
2
|
import { dimGrey } from '@naturalcycles/nodejs-lib/colors';
|
|
2
3
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2';
|
|
3
4
|
import { kpySync } from '@naturalcycles/nodejs-lib/kpy';
|
|
@@ -52,7 +53,7 @@ const DEFAULT_FILES = [
|
|
|
52
53
|
];
|
|
53
54
|
const defaultFilesDir = `${srcDir}/deploy/files-default`;
|
|
54
55
|
export async function deployPrepare(opt = {}) {
|
|
55
|
-
|
|
56
|
+
loadEnvFileIfExists();
|
|
56
57
|
const { projectDir = '.', targetDir = './tmp/deploy', createNpmrc = true } = opt;
|
|
57
58
|
const backendCfg = getBackendCfg(projectDir);
|
|
58
59
|
const inputPatterns = backendCfg.files || DEFAULT_FILES;
|
|
@@ -64,11 +64,8 @@ export function compressionMiddleware(options) {
|
|
|
64
64
|
let length;
|
|
65
65
|
let listeners = [];
|
|
66
66
|
let stream;
|
|
67
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
68
67
|
const _end = res.end;
|
|
69
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
70
68
|
const _on = res.on;
|
|
71
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
72
69
|
const _write = res.write;
|
|
73
70
|
res.flush = function flush() {
|
|
74
71
|
if (stream) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/backend-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.
|
|
5
|
-
"peerDependencies": {
|
|
6
|
-
"@sentry/node-core": "^10"
|
|
7
|
-
},
|
|
4
|
+
"version": "9.57.0",
|
|
8
5
|
"dependencies": {
|
|
9
6
|
"@naturalcycles/db-lib": "^10",
|
|
10
7
|
"@naturalcycles/js-lib": "^15",
|
|
@@ -20,20 +17,33 @@
|
|
|
20
17
|
"compressible": "^2",
|
|
21
18
|
"cookie-parser": "^1",
|
|
22
19
|
"cors": "^2",
|
|
23
|
-
"dotenv": "^17",
|
|
24
20
|
"express": "^5",
|
|
25
|
-
"firebase-admin": "^13",
|
|
26
21
|
"helmet": "^8",
|
|
27
22
|
"negotiator": "^1",
|
|
28
23
|
"on-headers": "^1",
|
|
29
24
|
"on-finished": "^2",
|
|
30
|
-
"simple-git": "^3",
|
|
31
25
|
"tslib": "^2",
|
|
32
26
|
"vary": "^1"
|
|
33
27
|
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@sentry/node-core": "^10",
|
|
30
|
+
"firebase-admin": "^13",
|
|
31
|
+
"simple-git": "^3"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"@sentry/node-core": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"firebase-admin": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"simple-git": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
34
44
|
"devDependencies": {
|
|
35
45
|
"@sentry/node-core": "^10",
|
|
36
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
46
|
+
"@typescript/native-preview": "7.0.0-dev.20260301.1",
|
|
37
47
|
"fastify": "^5",
|
|
38
48
|
"@naturalcycles/dev-lib": "18.4.2"
|
|
39
49
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadEnvFileIfExists } from '@naturalcycles/nodejs-lib'
|
|
1
2
|
import { dimGrey } from '@naturalcycles/nodejs-lib/colors'
|
|
2
3
|
import { fs2 } from '@naturalcycles/nodejs-lib/fs2'
|
|
3
4
|
import { kpySync } from '@naturalcycles/nodejs-lib/kpy'
|
|
@@ -69,7 +70,7 @@ const DEFAULT_FILES = [
|
|
|
69
70
|
const defaultFilesDir = `${srcDir}/deploy/files-default`
|
|
70
71
|
|
|
71
72
|
export async function deployPrepare(opt: DeployPrepareOptions = {}): Promise<DeployInfo> {
|
|
72
|
-
|
|
73
|
+
loadEnvFileIfExists()
|
|
73
74
|
|
|
74
75
|
const { projectDir = '.', targetDir = './tmp/deploy', createNpmrc = true } = opt
|
|
75
76
|
|
|
@@ -114,11 +114,8 @@ export function compressionMiddleware(options?: CompressionOptions): BackendRequ
|
|
|
114
114
|
let listeners: [string, (...args: any[]) => void][] | null = []
|
|
115
115
|
let stream: zlib.Gzip | zlib.Deflate | zlib.BrotliCompress | zlib.ZstdCompress | undefined
|
|
116
116
|
|
|
117
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
118
117
|
const _end = res.end
|
|
119
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
120
118
|
const _on = res.on
|
|
121
|
-
// oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
|
|
122
119
|
const _write = res.write
|
|
123
120
|
|
|
124
121
|
// flush
|