@naturalcycles/backend-lib 9.52.0 → 9.53.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,7 +1,7 @@
1
1
  import type { CommonLogger } from '@naturalcycles/js-lib/log';
2
2
  import type { Primitive, StringMap } from '@naturalcycles/js-lib/types';
3
- import type { Breadcrumb, SeverityLevel } from '@sentry/node';
4
- import type * as SentryLib from '@sentry/node';
3
+ import type { Breadcrumb, SeverityLevel } from '@sentry/node-core/light';
4
+ import type * as SentryLib from '@sentry/node-core/light';
5
5
  export interface SentrySharedServiceCfg {
6
6
  sentry: typeof SentryLib;
7
7
  }
@@ -64,8 +64,11 @@ 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()
67
68
  const _end = res.end;
69
+ // oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
68
70
  const _on = res.on;
71
+ // oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
69
72
  const _write = res.write;
70
73
  res.flush = function flush() {
71
74
  if (stream) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
3
  "type": "module",
4
- "version": "9.52.0",
4
+ "version": "9.53.0",
5
5
  "peerDependencies": {
6
- "@sentry/node": "^10"
6
+ "@sentry/node-core": "^10"
7
7
  },
8
8
  "dependencies": {
9
9
  "@naturalcycles/db-lib": "^10",
@@ -32,7 +32,7 @@
32
32
  "vary": "^1"
33
33
  },
34
34
  "devDependencies": {
35
- "@sentry/node": "^10",
35
+ "@sentry/node-core": "^10",
36
36
  "@typescript/native-preview": "7.0.0-dev.20260201.1",
37
37
  "fastify": "^5",
38
38
  "@naturalcycles/dev-lib": "18.4.2"
@@ -162,19 +162,16 @@ export function createAppYaml(
162
162
  .split(',')
163
163
  .filter(Boolean)
164
164
  // oxlint-disable-next-line unicorn/no-array-reduce
165
- .reduce(
166
- (map, key) => {
167
- const v = process.env[key]
168
- if (!v) {
169
- throw new Error(
170
- `appYamlPassEnv.${key} is requested, but process.env.${key} is not defined!`,
171
- )
172
- }
173
- map[key] = v
174
- return map
175
- },
176
- {} as Record<string, string>,
177
- )
165
+ .reduce<Record<string, string>>((map, key) => {
166
+ const v = process.env[key]
167
+ if (!v) {
168
+ throw new Error(
169
+ `appYamlPassEnv.${key} is requested, but process.env.${key} is not defined!`,
170
+ )
171
+ }
172
+ map[key] = v
173
+ return map
174
+ }, {})
178
175
 
179
176
  if (Object.keys(passEnv).length) {
180
177
  console.log(
@@ -3,8 +3,8 @@ import type { CommonLogger, CommonLogLevel } from '@naturalcycles/js-lib/log'
3
3
  import type { Primitive, StringMap } from '@naturalcycles/js-lib/types'
4
4
  import type { InspectAnyOptions } from '@naturalcycles/nodejs-lib'
5
5
  import { _inspect } from '@naturalcycles/nodejs-lib'
6
- import type { Breadcrumb, SeverityLevel } from '@sentry/node'
7
- import type * as SentryLib from '@sentry/node'
6
+ import type { Breadcrumb, SeverityLevel } from '@sentry/node-core/light'
7
+ import type * as SentryLib from '@sentry/node-core/light'
8
8
  import { getRequestLogger } from '../server/asyncLocalStorageMiddleware.js'
9
9
 
10
10
  export interface SentrySharedServiceCfg {
@@ -114,8 +114,11 @@ 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()
117
118
  const _end = res.end
119
+ // oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
118
120
  const _on = res.on
121
+ // oxlint-disable-next-line typescript/unbound-method -- monkey-patching, rebound via .call()
119
122
  const _write = res.write
120
123
 
121
124
  // flush