@naturalcycles/backend-lib 4.21.0 → 4.21.1

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.
@@ -186,7 +186,7 @@ class BaseAdminService {
186
186
  res
187
187
  .cookie(this.cfg.adminTokenKey, token, {
188
188
  maxAge,
189
- sameSite: 'lax',
189
+ sameSite: 'lax', // can be: none, lax, strict
190
190
  // comment these 2 lines to debug on localhost
191
191
  httpOnly: true,
192
192
  secure: true,
@@ -30,7 +30,7 @@ const DEFAULT_FILES = [
30
30
  // '!dist/**/*.test.*',
31
31
  // '!dist/**/*.mock.*',
32
32
  '!dist/**/*.script.*',
33
- 'src',
33
+ 'src', // For Sentry
34
34
  '!src/test',
35
35
  '!src/**/*.test.*',
36
36
  '!src/**/*.mock.*',
@@ -38,15 +38,15 @@ const DEFAULT_FILES = [
38
38
  '!**/__snapshots__',
39
39
  '!**/__exclude',
40
40
  'static',
41
- 'secret/**/*.enc',
41
+ 'secret/**/*.enc', // encrypted secrets
42
42
  'package.json',
43
43
  'yarn.lock',
44
44
  '.yarnrc',
45
- 'tsconfig.json',
45
+ 'tsconfig.json', // for path-mapping to work!
46
46
  'tsconfig.dist.json',
47
47
  '.gcloudignore',
48
48
  'app.yaml',
49
- 'patches',
49
+ 'patches', // to allow patch-package
50
50
  'resources',
51
51
  ];
52
52
  const defaultFilesDir = `${paths_cnst_1.srcDir}/deploy/files-default`;
@@ -35,7 +35,7 @@ class SentrySharedService {
35
35
  console.log('SentryService init...');
36
36
  }
37
37
  sentry.init({
38
- maxValueLength: 2000,
38
+ maxValueLength: 2000, // default is 250 characters
39
39
  ...this.sentryServiceCfg,
40
40
  });
41
41
  return sentry;
@@ -113,8 +113,8 @@ class SentrySharedService {
113
113
  */
114
114
  getCommonLogger() {
115
115
  return {
116
- log: () => { },
117
- warn: () => { },
116
+ log: () => { }, // noop
117
+ warn: () => { }, // noop
118
118
  error: (...args) => {
119
119
  const message = args.map(arg => (0, nodejs_lib_1._inspect)(arg, INSPECT_OPT)).join(' ');
120
120
  this.sentry().addBreadcrumb({
@@ -31,8 +31,8 @@ class ExpressTestService {
31
31
  retry: { count: 0 },
32
32
  logRequest: true,
33
33
  logResponse: true,
34
- logWithBaseUrl: false,
35
- fetchFn: nativeFetchFn,
34
+ logWithBaseUrl: false, // for stable error snapshots
35
+ fetchFn: nativeFetchFn, // this is to make it NOT mockable
36
36
  ...opt,
37
37
  }).onAfterResponse(async () => {
38
38
  // This "empty" hook exists to act like `await pDelay`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.21.0",
3
+ "version": "4.21.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "serve": "APP_ENV=dev nodemon",
@@ -29,7 +29,7 @@
29
29
  "ejs": "^3.0.1",
30
30
  "express": "^4.16.4",
31
31
  "express-promise-router": "^4.0.0",
32
- "firebase-admin": "^11.0.0",
32
+ "firebase-admin": "^12.0.0",
33
33
  "helmet": "^7.0.0",
34
34
  "js-yaml": "^4.0.0",
35
35
  "on-finished": "^2.3.0",