@promster/types 1.0.7 → 3.0.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @promster/types
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
## 3.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [`daf8605`](https://github.com/tdeekens/promster/commit/daf86055e64cb420c83dbc7abbcd5024d449c53f) [#557](https://github.com/tdeekens/promster/pull/557) Thanks [@tdeekens](https://github.com/tdeekens)! - # Breaking Changes
|
|
14
|
+
|
|
15
|
+
This requires your to update your peer dependency of `prom-client` to v13.
|
|
16
|
+
|
|
17
|
+
The new version of `prom-client` has additional small breaking changes `promster` has to incorporate which can leak into your application.
|
|
18
|
+
|
|
19
|
+
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())`.
|
|
20
|
+
|
|
21
|
+
You can find more on the `prom-client` changes [here](https://github.com/siimon/prom-client/blob/master/CHANGELOG.md).
|
|
22
|
+
|
|
23
|
+
## 2.0.0
|
|
24
|
+
|
|
25
|
+
### Major Changes
|
|
26
|
+
|
|
27
|
+
- [`0eb64ca`](https://github.com/tdeekens/promster/commit/0eb64cac9a4a51dab1a556f46c97a2a5542bcc88) [#529](https://github.com/tdeekens/promster/pull/529) Thanks [@tdeekens](https://github.com/tdeekens)! - # Introduction
|
|
28
|
+
|
|
29
|
+
refactor: to use preconstruct for building
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
# Breaking Change
|
|
34
|
+
|
|
35
|
+
This release can _potentially_ be breaking for you. We want to respect semantic versioning and follow it strictly.
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
```diff
|
|
40
|
+
- const { version } = require('@promster/server');
|
|
41
|
+
+ const { version } = require('@promster/server/package.json');
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- [`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
|
|
47
|
+
|
|
48
|
+
## 1.0.8
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- [`158e7b9`](https://github.com/tdeekens/promster/commit/158e7b9af01133db54376bb96dbdccdd96bfa7a3) Thanks [@tdeekens](https://github.com/tdeekens)! - Dependency updates across all packages
|
|
53
|
+
|
|
3
54
|
## 1.0.7
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import { Gauge, Counter, Summary, Histogram } from 'prom-client';
|
|
2
|
-
export declare type TLabelValues =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
httpRequestDurationInSeconds: Array<Histogram<string>>;
|
|
31
|
-
httpRequestsTotal: Array<Counter<string>>;
|
|
32
|
-
};
|
|
33
|
-
export declare type TValueOf<T> = T[keyof T];
|
|
1
|
+
import { Gauge, Counter, Summary, Histogram } from 'prom-client';
|
|
2
|
+
export declare type TLabelValues = Record<string, string | number>;
|
|
3
|
+
export declare type TPromsterOptions = {
|
|
4
|
+
labels?: string[];
|
|
5
|
+
accuracies?: Array<'ms' | 's'>;
|
|
6
|
+
metricPrefix?: string;
|
|
7
|
+
metricTypes?: string[];
|
|
8
|
+
metricNames?: Record<string, string | string[]>;
|
|
9
|
+
normalizePath?: (path: string) => string;
|
|
10
|
+
normalizeStatusCode?: (code: number) => number;
|
|
11
|
+
normalizeMethod?: (method: string) => string;
|
|
12
|
+
getLabelValues?: <Q, S>(request: Q, response: S) => TLabelValues;
|
|
13
|
+
detectKubernetes?: boolean;
|
|
14
|
+
buckets?: [number];
|
|
15
|
+
percentiles?: [number];
|
|
16
|
+
skip?: <Q, S>(request: Q, response: S, labels: TLabelValues) => boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare type TMetricTypes = {
|
|
19
|
+
up: Array<Gauge<string>>;
|
|
20
|
+
countOfGcs: Array<Counter<string>>;
|
|
21
|
+
durationOfGc: Array<Counter<string>>;
|
|
22
|
+
reclaimedInGc: Array<Counter<string>>;
|
|
23
|
+
httpRequestDurationPerPercentileInMilliseconds: Array<Summary<string>>;
|
|
24
|
+
httpRequestDurationInMilliseconds: Array<Histogram<string>>;
|
|
25
|
+
httpRequestDurationPerPercentileInSeconds: Array<Summary<string>>;
|
|
26
|
+
httpRequestDurationInSeconds: Array<Histogram<string>>;
|
|
27
|
+
httpRequestsTotal: Array<Counter<string>>;
|
|
28
|
+
};
|
|
29
|
+
export declare type TValueOf<T> = T[keyof T];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./declarations/src/index";
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promster/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Shared types of promster",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
5
|
+
"main": "dist/promster-types.cjs.js",
|
|
6
|
+
"typings": "dist/promster-types.cjs.d.ts",
|
|
7
|
+
"types": "dist/promster-types.cjs.d.ts",
|
|
8
|
+
"scripts": {},
|
|
10
9
|
"files": [
|
|
11
10
|
"readme.md",
|
|
12
11
|
"package.json",
|
|
@@ -36,9 +35,9 @@
|
|
|
36
35
|
"prometheus"
|
|
37
36
|
],
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"prom-client": "
|
|
38
|
+
"prom-client": "13.1.0"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
|
-
"prom-client": "
|
|
41
|
+
"prom-client": "13.x.x"
|
|
43
42
|
}
|
|
44
43
|
}
|