@promster/server 6.0.2 → 6.0.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.
@@ -1,2 +1,2 @@
1
- import { createServer } from './server';
2
- export { createServer };
1
+ import { createServer } from './server';
2
+ export { createServer };
@@ -1,2 +1,2 @@
1
- import { default as createServer } from './server';
2
- export { createServer };
1
+ import { default as createServer } from './server';
2
+ export { createServer };
@@ -1,8 +1,8 @@
1
- import * as http from 'http';
2
- declare type TServerOptions = {
3
- port: number;
4
- hostname: string;
5
- detectKubernetes: boolean;
6
- };
7
- declare const createServer: (options: Partial<TServerOptions>) => Promise<http.Server>;
8
- export { createServer as default };
1
+ import * as http from 'http';
2
+ declare type TServerOptions = {
3
+ port: number;
4
+ hostname: string;
5
+ detectKubernetes: boolean;
6
+ };
7
+ declare const createServer: (options: Partial<TServerOptions>) => Promise<http.Server>;
8
+ export { createServer as default };
@@ -14,14 +14,12 @@ function _interopNamespace(e) {
14
14
  var d = Object.getOwnPropertyDescriptor(e, k);
15
15
  Object.defineProperty(n, k, d.get ? d : {
16
16
  enumerable: true,
17
- get: function () {
18
- return e[k];
19
- }
17
+ get: function () { return e[k]; }
20
18
  });
21
19
  }
22
20
  });
23
21
  }
24
- n['default'] = e;
22
+ n["default"] = e;
25
23
  return Object.freeze(n);
26
24
  }
27
25
 
@@ -33,12 +31,12 @@ const defaultOptions = {
33
31
  detectKubernetes: false
34
32
  };
35
33
 
36
- const createServer = async (options) => {
34
+ const createServer = async options => {
37
35
  const defaultedOptions = { ...defaultOptions,
38
36
  ...options
39
37
  };
40
38
  return new Promise((resolve, reject) => {
41
- const skipServerStart = defaultedOptions.detectKubernetes && !metrics.isRunningInKubernetes();
39
+ const skipServerStart = defaultedOptions.detectKubernetes === true && !metrics.isRunningInKubernetes();
42
40
  const port = skipServerStart ? undefined : defaultedOptions.port;
43
41
  const server = http__namespace.createServer(async (_req, res) => {
44
42
  res.writeHead(200, 'OK', {
@@ -14,14 +14,12 @@ function _interopNamespace(e) {
14
14
  var d = Object.getOwnPropertyDescriptor(e, k);
15
15
  Object.defineProperty(n, k, d.get ? d : {
16
16
  enumerable: true,
17
- get: function () {
18
- return e[k];
19
- }
17
+ get: function () { return e[k]; }
20
18
  });
21
19
  }
22
20
  });
23
21
  }
24
- n['default'] = e;
22
+ n["default"] = e;
25
23
  return Object.freeze(n);
26
24
  }
27
25
 
@@ -33,12 +31,12 @@ const defaultOptions = {
33
31
  detectKubernetes: false
34
32
  };
35
33
 
36
- const createServer = async (options) => {
34
+ const createServer = async options => {
37
35
  const defaultedOptions = { ...defaultOptions,
38
36
  ...options
39
37
  };
40
38
  return new Promise((resolve, reject) => {
41
- const skipServerStart = defaultedOptions.detectKubernetes && !metrics.isRunningInKubernetes();
39
+ const skipServerStart = defaultedOptions.detectKubernetes === true && !metrics.isRunningInKubernetes();
42
40
  const port = skipServerStart ? undefined : defaultedOptions.port;
43
41
  const server = http__namespace.createServer(async (_req, res) => {
44
42
  res.writeHead(200, 'OK', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promster/server",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "description": "Server exposing metrics under GET /metrics",
5
5
  "main": "dist/promster-server.cjs.js",
6
6
  "typings": "dist/promster-server.cjs.d.ts",
@@ -36,10 +36,10 @@
36
36
  "prometheus"
37
37
  ],
38
38
  "dependencies": {
39
- "@promster/metrics": "^6.0.2",
40
- "tslib": "2.2.0"
39
+ "@promster/metrics": "^7.0.4",
40
+ "tslib": "2.3.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/node": "14.14.41"
43
+ "@types/node": "16.11.0"
44
44
  }
45
45
  }
package/CHANGELOG.md DELETED
@@ -1,112 +0,0 @@
1
- # @promster/server
2
-
3
- ## 6.0.2
4
-
5
- ### Patch Changes
6
-
7
- - [#618](https://github.com/tdeekens/promster/pull/618) [`bbab9ca`](https://github.com/tdeekens/promster/commit/bbab9cad6a3484e4894d159267d62e54e202812a) Thanks [@tdeekens](https://github.com/tdeekens)! - chore: update deps
8
-
9
- - Updated dependencies [[`ec2a8f8`](https://github.com/tdeekens/promster/commit/ec2a8f83a94bbe63360cf7027eeba92895315a19), [`bbab9ca`](https://github.com/tdeekens/promster/commit/bbab9cad6a3484e4894d159267d62e54e202812a)]:
10
- - @promster/metrics@6.0.2
11
-
12
- ## 6.0.1
13
-
14
- ### Patch Changes
15
-
16
- - [#601](https://github.com/tdeekens/promster/pull/601) [`17a24dc`](https://github.com/tdeekens/promster/commit/17a24dc0d735478001524c853b9f54f862153852) Thanks [@tdeekens](https://github.com/tdeekens)! - Update dependencies and apply eslint rule suggestions.
17
-
18
- - Updated dependencies [[`17a24dc`](https://github.com/tdeekens/promster/commit/17a24dc0d735478001524c853b9f54f862153852)]:
19
- - @promster/metrics@6.0.1
20
-
21
- ## 6.0.0
22
-
23
- ### Major Changes
24
-
25
- - [`daf8605`](https://github.com/tdeekens/promster/commit/daf86055e64cb420c83dbc7abbcd5024d449c53f) [#557](https://github.com/tdeekens/promster/pull/557) Thanks [@tdeekens](https://github.com/tdeekens)! - # Breaking Changes
26
-
27
- This requires your to update your peer dependency of `prom-client` to v13.
28
-
29
- The new version of `prom-client` has additional small breaking changes `promster` has to incorporate which can leak into your application.
30
-
31
- If you do not use our `@promster/server` package and have a `res.send(register.metrics())` you have to change it to `res.send(await register.metrics())`.
32
-
33
- You can find more on the `prom-client` changes [here](https://github.com/siimon/prom-client/blob/master/CHANGELOG.md).
34
-
35
- ### Patch Changes
36
-
37
- - [`8a97019`](https://github.com/tdeekens/promster/commit/8a97019ba9cefaaf4d64e9bd0be9d89f4b855ff2) [#554](https://github.com/tdeekens/promster/pull/554) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @types/node to v14.14.14
38
-
39
- - Updated dependencies [[`daf8605`](https://github.com/tdeekens/promster/commit/daf86055e64cb420c83dbc7abbcd5024d449c53f)]:
40
- - @promster/metrics@6.0.0
41
-
42
- ## 5.0.0
43
-
44
- ### Major Changes
45
-
46
- - [`0eb64ca`](https://github.com/tdeekens/promster/commit/0eb64cac9a4a51dab1a556f46c97a2a5542bcc88) [#529](https://github.com/tdeekens/promster/pull/529) Thanks [@tdeekens](https://github.com/tdeekens)! - # Introduction
47
-
48
- refactor: to use preconstruct for building
49
-
50
- Prior TypeScript was used to build bundles. In all this should not affect consumers of this library. Under the hood preconstruct uses rollup and babel which is now instructed to build for Node.js v12 using the preset-env preset.
51
-
52
- # Breaking Change
53
-
54
- This release can _potentially_ be breaking for you. We want to respect semantic versioning and follow it strictly.
55
-
56
- While migrating to preconstruct the `version` exports had to be removed as preconstruct's rollup will not resolve them. If you relied on this value you should either load the `package.json` of each module yourself or drop the usage.
57
-
58
- ```diff
59
- - const { version } = require('@promster/server');
60
- + const { version } = require('@promster/server/package.json');
61
- ```
62
-
63
- ### Patch Changes
64
-
65
- - [`bdf75de`](https://github.com/tdeekens/promster/commit/bdf75dec8d0ce6be65ecccf5963f348e1a0a96b3) [#531](https://github.com/tdeekens/promster/pull/531) Thanks [@tdeekens](https://github.com/tdeekens)! - fix: update dependencies
66
-
67
- - Updated dependencies [[`bdf75de`](https://github.com/tdeekens/promster/commit/bdf75dec8d0ce6be65ecccf5963f348e1a0a96b3), [`0eb64ca`](https://github.com/tdeekens/promster/commit/0eb64cac9a4a51dab1a556f46c97a2a5542bcc88)]:
68
- - @promster/metrics@5.0.0
69
-
70
- ## 4.2.16
71
-
72
- ### Patch Changes
73
-
74
- - [`4c3af06`](https://github.com/tdeekens/promster/commit/4c3af06bc0b65eb067f195591e48839e632375bd) [#483](https://github.com/tdeekens/promster/pull/483) Thanks [@tdeekens](https://github.com/tdeekens)! - chore: update dependencies
75
-
76
- - Updated dependencies [[`4c3af06`](https://github.com/tdeekens/promster/commit/4c3af06bc0b65eb067f195591e48839e632375bd)]:
77
- - @promster/metrics@4.1.13
78
-
79
- ## 4.2.15
80
-
81
- ### Patch Changes
82
-
83
- - [`447aa7e`](https://github.com/tdeekens/promster/commit/447aa7ebdf589200e7f1b192f99f781b8ca3031b) [#475](https://github.com/tdeekens/promster/pull/475) Thanks [@tdeekens](https://github.com/tdeekens)! - fix(server): to change import of http
84
-
85
- ## 4.2.14
86
-
87
- ### Patch Changes
88
-
89
- - [`158e7b9`](https://github.com/tdeekens/promster/commit/158e7b9af01133db54376bb96dbdccdd96bfa7a3) Thanks [@tdeekens](https://github.com/tdeekens)! - Dependency updates across all packages
90
-
91
- - Updated dependencies [[`158e7b9`](https://github.com/tdeekens/promster/commit/158e7b9af01133db54376bb96dbdccdd96bfa7a3)]:
92
- - @promster/metrics@4.1.12
93
-
94
- ## 4.2.13
95
-
96
- ### Patch Changes
97
-
98
- - [`7853faa`](https://github.com/tdeekens/promster/commit/7853faa4e140eaae0622fb7c66d8145d258d7f5e) [#447](https://github.com/tdeekens/promster/pull/447) Thanks [@tdeekens](https://github.com/tdeekens)! - chore: update deps
99
-
100
- - Updated dependencies [[`7853faa`](https://github.com/tdeekens/promster/commit/7853faa4e140eaae0622fb7c66d8145d258d7f5e)]:
101
- - @promster/metrics@4.1.11
102
-
103
- ## 4.2.12
104
-
105
- ### Patch Changes
106
-
107
- - [`c2b8e0d`](https://github.com/tdeekens/promster/commit/c2b8e0d472b6e31e053460d8f714eaf790a17eb9) [#358](https://github.com/tdeekens/promster/pull/358) Thanks [@tdeekens](https://github.com/tdeekens)! - Update dependencies.
108
-
109
- * [`6f99f64`](https://github.com/tdeekens/promster/commit/6f99f644ccd2cd0b60c172968266c3ac3f76e826) [#360](https://github.com/tdeekens/promster/pull/360) Thanks [@tdeekens](https://github.com/tdeekens)! - Update to eslint v7
110
-
111
- * Updated dependencies [[`c2b8e0d`](https://github.com/tdeekens/promster/commit/c2b8e0d472b6e31e053460d8f714eaf790a17eb9), [`6f99f64`](https://github.com/tdeekens/promster/commit/6f99f644ccd2cd0b60c172968266c3ac3f76e826)]:
112
- - @promster/metrics@4.1.10