@naturalcycles/backend-lib 9.5.0 → 9.6.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,5 +1,5 @@
1
1
  import { DBQuery, InMemoryDB } from '@naturalcycles/db-lib';
2
- import { commonDBOptionsSchema, commonDBSaveOptionsSchema, dbQuerySchema, } from '@naturalcycles/db-lib/dist/validation/index.js';
2
+ import { commonDBOptionsSchema, commonDBSaveOptionsSchema, dbQuerySchema, } from '@naturalcycles/db-lib/validation';
3
3
  import { anyObjectSchema, arraySchema, objectSchema, stringSchema } from '@naturalcycles/nodejs-lib';
4
4
  import { getDefaultRouter } from '../server/getDefaultRouter.js';
5
5
  import { validateRequest } from '../server/validation/validateRequest.js';
@@ -60,7 +60,7 @@ export class SentrySharedService {
60
60
  const data = _isErrorObject(err) ? err.data : undefined;
61
61
  // Using request-aware logger here
62
62
  // Log both the error and attached ErrorData (if any)
63
- getRequestLogger().error('captureException:', ...[err_, data].filter(Boolean));
63
+ getRequestLogger().error(...[err_, data].filter(Boolean));
64
64
  if (data?.report === false) {
65
65
  // Skip reporting the error
66
66
  return;
@@ -1,4 +1,4 @@
1
- import type { ZodSchema, ZodValidationError } from '@naturalcycles/js-lib/dist/zod/index.js';
1
+ import type { ZodSchema, ZodValidationError } from '@naturalcycles/js-lib/zod';
2
2
  import type { BackendRequestHandler } from '../server.model.js';
3
3
  import type { ReqValidationOptions } from './validateRequest.js';
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { _get, AppError } from '@naturalcycles/js-lib';
2
- import { zSafeValidate } from '@naturalcycles/js-lib/dist/zod/index.js';
2
+ import { zSafeValidate } from '@naturalcycles/js-lib/zod';
3
3
  const REDACTED = 'REDACTED';
4
4
  /**
5
5
  * Validates req property (body, params or query).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
3
  "type": "module",
4
- "version": "9.5.0",
4
+ "version": "9.6.0",
5
5
  "peerDependencies": {
6
6
  "@sentry/node": "^9"
7
7
  },
@@ -4,7 +4,7 @@ import {
4
4
  commonDBOptionsSchema,
5
5
  commonDBSaveOptionsSchema,
6
6
  dbQuerySchema,
7
- } from '@naturalcycles/db-lib/dist/validation/index.js'
7
+ } from '@naturalcycles/db-lib/validation'
8
8
  import type { ObjectWithId } from '@naturalcycles/js-lib'
9
9
  import { anyObjectSchema, arraySchema, objectSchema, stringSchema } from '@naturalcycles/nodejs-lib'
10
10
  import { getDefaultRouter } from '../server/getDefaultRouter.js'
@@ -77,7 +77,7 @@ export class SentrySharedService {
77
77
 
78
78
  // Using request-aware logger here
79
79
  // Log both the error and attached ErrorData (if any)
80
- getRequestLogger().error('captureException:', ...[err_, data].filter(Boolean))
80
+ getRequestLogger().error(...[err_, data].filter(Boolean))
81
81
 
82
82
  if (data?.report === false) {
83
83
  // Skip reporting the error
@@ -1,6 +1,6 @@
1
1
  import { _get, AppError } from '@naturalcycles/js-lib'
2
- import type { ZodSchema, ZodValidationError } from '@naturalcycles/js-lib/dist/zod/index.js'
3
- import { zSafeValidate } from '@naturalcycles/js-lib/dist/zod/index.js'
2
+ import type { ZodSchema, ZodValidationError } from '@naturalcycles/js-lib/zod'
3
+ import { zSafeValidate } from '@naturalcycles/js-lib/zod'
4
4
  import type { BackendRequestHandler } from '../server.model.js'
5
5
  import type { ReqValidationOptions } from './validateRequest.js'
6
6