@visulima/health-check 2.0.19 → 2.0.21

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/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## @visulima/health-check [2.0.21](https://github.com/visulima/visulima/compare/@visulima/health-check@2.0.20...@visulima/health-check@2.0.21) (2025-03-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ * updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
10
+
11
+ ## @visulima/health-check [2.0.20](https://github.com/visulima/visulima/compare/@visulima/health-check@2.0.19...@visulima/health-check@2.0.20) (2025-01-25)
12
+
13
+ ### Bug Fixes
14
+
15
+ * fixed wrong node version range in package.json ([4ae2929](https://github.com/visulima/visulima/commit/4ae292984681c71a770e4d4560432f7b7c5a141a))
16
+
17
+ ### Miscellaneous Chores
18
+
19
+ * fixed typescript url ([fe65a8c](https://github.com/visulima/visulima/commit/fe65a8c0296ece7ee26474c70d065b06d4d0da89))
20
+ * updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
21
+ * updated all dev dependencies and all dependencies in the app folder ([87f4ccb](https://github.com/visulima/visulima/commit/87f4ccbf9f7900ec5b56f3c1477bc4a0ef571bcf))
22
+
23
+ ### Tests
24
+
25
+ * **health-check:** improved test of dns check ([47d60cd](https://github.com/visulima/visulima/commit/47d60cdd5b8d2959620de278cfe85ac910f7dd2d))
26
+
1
27
  ## @visulima/health-check [2.0.19](https://github.com/visulima/visulima/compare/@visulima/health-check@2.0.18...@visulima/health-check@2.0.19) (2025-01-12)
2
28
 
3
29
  ### Bug Fixes
package/README.md CHANGED
@@ -197,7 +197,8 @@ If you would like to help take a look at the [list of issues](https://github.com
197
197
  The visulima health-check is open-sourced software licensed under the [MIT][license-url]
198
198
 
199
199
  [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
200
- [typescript-url]: "typescript"
200
+
201
+ [typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
201
202
  [license-image]: https://img.shields.io/npm/l/@visulima/health-check?color=blueviolet&style=for-the-badge
202
203
  [license-url]: LICENSE.md "license"
203
204
  [npm-image]: https://img.shields.io/npm/v/@visulima/health-check/latest.svg?style=for-the-badge&logo=npm
package/dist/index.cjs CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
5
  const dnsCheck = require('./packem_shared/dnsCheck-CKpwi39o.cjs');
6
- const httpCheck = require('./packem_shared/httpCheck-CmLmorh2.cjs');
7
- const nodeEnvCheck = require('./packem_shared/nodeEnvCheck-C2C9wY2Q.cjs');
6
+ const httpCheck = require('./packem_shared/httpCheck-BS8O0ZEs.cjs');
7
+ const nodeEnvCheck = require('./packem_shared/nodeEnvCheck-DcTXz_-V.cjs');
8
8
  const pingCheck = require('./packem_shared/pingCheck-CYOzCjjQ.cjs');
9
9
  const healthCheckHandler = require('./packem_shared/healthCheckHandler-BIIllStf.cjs');
10
10
  const healthReadyHandler = require('./packem_shared/healthReadyHandler-vdf1928k.cjs');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as dnsCheck } from './packem_shared/dnsCheck-DJXOtLo2.mjs';
2
- export { default as httpCheck } from './packem_shared/httpCheck-ivA5vEeE.mjs';
3
- export { default as nodeEnvCheck } from './packem_shared/nodeEnvCheck-CYVfgkJ_.mjs';
2
+ export { default as httpCheck } from './packem_shared/httpCheck-hHYnlgcd.mjs';
3
+ export { default as nodeEnvCheck } from './packem_shared/nodeEnvCheck-Cjo3FyXK.mjs';
4
4
  export { default as pingCheck } from './packem_shared/pingCheck-W2tp3p2k.mjs';
5
5
  export { default as healthCheckHandler } from './packem_shared/healthCheckHandler-C0NYbHG_.mjs';
6
6
  export { default as healthReadyHandler } from './packem_shared/healthReadyHandler-Bd4123kn.mjs';
@@ -8,10 +8,10 @@ const DISPLAY_NAME = "HTTP check for";
8
8
  const httpCheck = /* @__PURE__ */ __name((host, options) => async () => {
9
9
  try {
10
10
  const response = await fetch(host, options?.fetchOptions ?? {});
11
- if (options?.expected?.status !== undefined && options.expected.status !== response.status) {
11
+ if (options?.expected?.status !== void 0 && options.expected.status !== response.status) {
12
12
  throw new Error(`${DISPLAY_NAME} ${host} returned status ${response.status} instead of ${options.expected.status}`);
13
13
  }
14
- if (options?.expected?.body !== undefined) {
14
+ if (options?.expected?.body !== void 0) {
15
15
  const textBody = await response.text();
16
16
  try {
17
17
  node_assert.deepStrictEqual(textBody, options.expected.body);
@@ -6,10 +6,10 @@ const DISPLAY_NAME = "HTTP check for";
6
6
  const httpCheck = /* @__PURE__ */ __name((host, options) => async () => {
7
7
  try {
8
8
  const response = await fetch(host, options?.fetchOptions ?? {});
9
- if (options?.expected?.status !== undefined && options.expected.status !== response.status) {
9
+ if (options?.expected?.status !== void 0 && options.expected.status !== response.status) {
10
10
  throw new Error(`${DISPLAY_NAME} ${host} returned status ${response.status} instead of ${options.expected.status}`);
11
11
  }
12
- if (options?.expected?.body !== undefined) {
12
+ if (options?.expected?.body !== void 0) {
13
13
  const textBody = await response.text();
14
14
  try {
15
15
  deepStrictEqual(textBody, options.expected.body);
@@ -4,12 +4,12 @@ const DISPLAY_NAME = "Node Environment Check";
4
4
  const nodeEnvironmentCheck = /* @__PURE__ */ __name((expectedEnvironment) => async () => {
5
5
  const environment = process.env.NODE_ENV;
6
6
  let errorMessage;
7
- if (environment !== undefined && expectedEnvironment !== undefined && environment !== expectedEnvironment) {
7
+ if (environment !== void 0 && expectedEnvironment !== void 0 && environment !== expectedEnvironment) {
8
8
  errorMessage = `NODE_ENV environment variable is set to "${environment}" instead of "${expectedEnvironment}".`;
9
9
  } else if (!environment) {
10
10
  errorMessage = ["Missing NODE_ENV environment variable.", "It can make some parts of the application misbehave"].join(" ");
11
11
  }
12
- if (errorMessage !== undefined) {
12
+ if (errorMessage !== void 0) {
13
13
  return {
14
14
  displayName: DISPLAY_NAME,
15
15
  health: {
@@ -6,12 +6,12 @@ const DISPLAY_NAME = "Node Environment Check";
6
6
  const nodeEnvironmentCheck = /* @__PURE__ */ __name((expectedEnvironment) => async () => {
7
7
  const environment = process.env.NODE_ENV;
8
8
  let errorMessage;
9
- if (environment !== undefined && expectedEnvironment !== undefined && environment !== expectedEnvironment) {
9
+ if (environment !== void 0 && expectedEnvironment !== void 0 && environment !== expectedEnvironment) {
10
10
  errorMessage = `NODE_ENV environment variable is set to "${environment}" instead of "${expectedEnvironment}".`;
11
11
  } else if (!environment) {
12
12
  errorMessage = ["Missing NODE_ENV environment variable.", "It can make some parts of the application misbehave"].join(" ");
13
13
  }
14
- if (errorMessage !== undefined) {
14
+ if (errorMessage !== void 0) {
15
15
  return {
16
16
  displayName: DISPLAY_NAME,
17
17
  health: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/health-check",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
4
4
  "description": "A library built to provide support for defining service health for node services. It allows you to register async health checks for your dependencies and the service itself, provides a health endpoint that exposes their status, and health metrics.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -72,53 +72,11 @@
72
72
  "http-status-codes": "^2.3.0",
73
73
  "pingman": "^2.0.0"
74
74
  },
75
- "devDependencies": {
76
- "@anolilab/eslint-config": "^15.0.3",
77
- "@anolilab/prettier-config": "^5.0.14",
78
- "@anolilab/semantic-release-pnpm": "^1.1.6",
79
- "@anolilab/semantic-release-preset": "^9.0.3",
80
- "@arethetypeswrong/cli": "^0.17.2",
81
- "@arthurgeron/eslint-plugin-react-usememo": "^2.4.4",
82
- "@babel/core": "^7.26.0",
83
- "@rushstack/eslint-plugin-security": "^0.8.3",
84
- "@testing-library/react": "^16.1.0",
85
- "@types/node": "18.19.15",
86
- "@visulima/packem": "1.10.7",
87
- "@vitest/coverage-v8": "^2.1.8",
88
- "@vitest/ui": "^2.1.8",
89
- "conventional-changelog-conventionalcommits": "8.0.0",
90
- "cross-env": "^7.0.3",
91
- "cross-fetch": "^4.1.0",
92
- "esbuild": "0.24.2",
93
- "eslint": "8.57.0",
94
- "eslint-plugin-deprecation": "^3.0.0",
95
- "eslint-plugin-etc": "^2.0.3",
96
- "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
97
- "eslint-plugin-jsx-a11y": "^6.10.2",
98
- "eslint-plugin-mdx": "^3.1.5",
99
- "eslint-plugin-react": "^7.37.3",
100
- "eslint-plugin-react-hooks": "^5.1.0",
101
- "eslint-plugin-ssr-friendly": "^1.3.0",
102
- "eslint-plugin-testing-library": "^7.1.1",
103
- "eslint-plugin-validate-jsx-nesting": "^0.1.1",
104
- "eslint-plugin-vitest": "^0.4.1",
105
- "eslint-plugin-vitest-globals": "^1.5.0",
106
- "msw": "^2.7.0",
107
- "next": "^14.2.4",
108
- "node-mocks-http": "^1.16.2",
109
- "prettier": "^3.4.2",
110
- "react": "^19.0.0",
111
- "react-dom": "^19.0.0",
112
- "rimraf": "6.0.1",
113
- "semantic-release": "24.2.1",
114
- "typescript": "5.7.3",
115
- "vitest": "^2.1.8"
116
- },
117
75
  "optionalDependencies": {
118
- "next": ">=15.1"
76
+ "next": ">=15.2"
119
77
  },
120
78
  "engines": {
121
- "node": ">=18.* <=23.*"
79
+ "node": ">=18.0.0 <=23.x"
122
80
  },
123
81
  "os": [
124
82
  "darwin",
@@ -128,34 +86,5 @@
128
86
  "publishConfig": {
129
87
  "access": "public",
130
88
  "provenance": true
131
- },
132
- "anolilab": {
133
- "eslint-config": {
134
- "plugin": {
135
- "tsdoc": false
136
- },
137
- "warn_on_unsupported_typescript_version": false,
138
- "info_on_disabling_jsx_react_rule": false,
139
- "info_on_disabling_prettier_conflict_rule": false,
140
- "info_on_disabling_jsonc_sort_keys_rule": false,
141
- "info_on_disabling_etc_no_deprecated": false
142
- }
143
- },
144
- "scripts": {
145
- "build": "cross-env NODE_ENV=development packem build",
146
- "build:prod": "cross-env NODE_ENV=production packem build",
147
- "clean": "rimraf node_modules dist .eslintcache",
148
- "dev": "pnpm run build --watch",
149
- "lint:attw": "attw --pack",
150
- "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
151
- "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
152
- "lint:package-json": "publint --strict",
153
- "lint:prettier": "prettier --config=.prettierrc.cjs --check .",
154
- "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
155
- "lint:types": "tsc --noEmit",
156
- "test": "vitest run",
157
- "test:coverage": "vitest run --coverage",
158
- "test:ui": "vitest --ui --coverage.enabled=true",
159
- "test:watch": "vitest"
160
89
  }
161
90
  }