@naturalcycles/backend-lib 4.17.4 → 4.17.6
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.
- package/dist/deploy/deployHealthCheck.js +2 -2
- package/dist/server/catchWrapper.js +0 -1
- package/dist/server/genericErrorMiddleware.js +1 -1
- package/package.json +2 -3
- package/src/deploy/deployHealthCheck.ts +2 -2
- package/src/server/catchWrapper.ts +0 -1
- package/src/server/genericErrorMiddleware.ts +1 -1
|
@@ -67,7 +67,6 @@ async function deployHealthCheck(url, opt = {}) {
|
|
|
67
67
|
let currentInterval = intervalSec * 1000;
|
|
68
68
|
const fetcher = (0, js_lib_1.getFetcher)();
|
|
69
69
|
while (!done) {
|
|
70
|
-
// eslint-disable-next-line no-await-in-loop
|
|
71
70
|
await makeAttempt();
|
|
72
71
|
}
|
|
73
72
|
if (failed) {
|
|
@@ -84,7 +83,8 @@ async function deployHealthCheck(url, opt = {}) {
|
|
|
84
83
|
attempt++;
|
|
85
84
|
console.log([`>>`, (0, colors_1.dimGrey)(url), (0, node_util_1.inspect)({ attempt }, inspectOpt)].join(' '));
|
|
86
85
|
const started = Date.now();
|
|
87
|
-
const { err, fetchResponse } = await fetcher.doFetch(
|
|
86
|
+
const { err, fetchResponse } = await fetcher.doFetch({
|
|
87
|
+
url,
|
|
88
88
|
mode: 'json',
|
|
89
89
|
timeoutSeconds: timeoutSec,
|
|
90
90
|
retry: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.respondWithError = exports.genericErrorMiddleware = void 0;
|
|
4
4
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
5
5
|
const { APP_ENV } = process.env;
|
|
6
|
-
const includeErrorStack = APP_ENV
|
|
6
|
+
const includeErrorStack = APP_ENV === 'dev';
|
|
7
7
|
// Hacky way to store the sentryService, so it's available to `respondWithError` function
|
|
8
8
|
let sentryService;
|
|
9
9
|
let reportOnly5xx = false;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/backend-lib",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.6",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"prepare": "husky install
|
|
5
|
+
"prepare": "husky install",
|
|
6
6
|
"serve": "APP_ENV=dev nodemon",
|
|
7
7
|
"docs-serve": "NODE_OPTIONS=--openssl-legacy-provider vuepress dev docs",
|
|
8
8
|
"docs-build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build docs",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"fastify": "^4.0.0",
|
|
49
49
|
"jest": "^29.0.1",
|
|
50
50
|
"nodemon": "^2.0.14",
|
|
51
|
-
"patch-package": "^6.2.1",
|
|
52
51
|
"vue-class-component": "^7.2.6",
|
|
53
52
|
"vuepress": "^1.7.1",
|
|
54
53
|
"vuepress-plugin-typescript": "^0.3.1"
|
|
@@ -97,7 +97,6 @@ export async function deployHealthCheck(
|
|
|
97
97
|
const fetcher = getFetcher()
|
|
98
98
|
|
|
99
99
|
while (!done) {
|
|
100
|
-
// eslint-disable-next-line no-await-in-loop
|
|
101
100
|
await makeAttempt()
|
|
102
101
|
}
|
|
103
102
|
|
|
@@ -126,7 +125,8 @@ export async function deployHealthCheck(
|
|
|
126
125
|
|
|
127
126
|
const started = Date.now()
|
|
128
127
|
|
|
129
|
-
const { err, fetchResponse } = await fetcher.doFetch(
|
|
128
|
+
const { err, fetchResponse } = await fetcher.doFetch({
|
|
129
|
+
url,
|
|
130
130
|
mode: 'json',
|
|
131
131
|
timeoutSeconds: timeoutSec,
|
|
132
132
|
retry: {
|
|
@@ -26,7 +26,7 @@ export interface GenericErrorMiddlewareCfg {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const { APP_ENV } = process.env
|
|
29
|
-
const includeErrorStack = APP_ENV
|
|
29
|
+
const includeErrorStack = APP_ENV === 'dev'
|
|
30
30
|
|
|
31
31
|
// Hacky way to store the sentryService, so it's available to `respondWithError` function
|
|
32
32
|
let sentryService: SentrySharedService | undefined
|