@promster/types 3.2.5 → 5.0.0
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,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type DeepRequired } from 'ts-essentials';
|
|
2
|
+
import { type Gauge, type Counter, type Summary, type Histogram } from 'prom-client';
|
|
3
3
|
export type TLabelValues = Record<string, string | number>;
|
|
4
4
|
type TContext<Q, S> = {
|
|
5
5
|
req: Q;
|
|
6
6
|
res: S;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type TOptionalPromsterOptions = {
|
|
9
9
|
labels?: string[];
|
|
10
10
|
metricPrefix?: string;
|
|
11
11
|
metricTypes?: string[];
|
|
@@ -15,12 +15,11 @@ export type TPromsterOptions = {
|
|
|
15
15
|
normalizeMethod?: <Q, S>(method: string, context: TContext<Q, S>) => string;
|
|
16
16
|
getLabelValues?: <Q, S>(request: Q, response: S) => TLabelValues;
|
|
17
17
|
detectKubernetes?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
skip?: <Q, S>(request: Q, response: S, labels: TLabelValues) => boolean;
|
|
18
|
+
metricBuckets?: Record<string, number[]>;
|
|
19
|
+
metricPercentiles?: Record<string, number[]>;
|
|
21
20
|
disableGcMetrics?: boolean;
|
|
22
21
|
};
|
|
23
|
-
export type TDefaultedPromsterOptions = DeepRequired<
|
|
22
|
+
export type TDefaultedPromsterOptions = DeepRequired<TOptionalPromsterOptions>;
|
|
24
23
|
export type THttpMetrics = {
|
|
25
24
|
httpRequestDurationPerPercentileInSeconds?: Summary[];
|
|
26
25
|
httpRequestDurationInSeconds?: Histogram[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promster-types.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promster/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Shared types of promster",
|
|
5
5
|
"main": "dist/promster-types.cjs.js",
|
|
6
6
|
"typings": "dist/promster-types.cjs.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
19
|
-
"npm": ">=
|
|
18
|
+
"node": ">=16",
|
|
19
|
+
"npm": ">=8"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -34,10 +34,13 @@
|
|
|
34
34
|
"continousdelivery",
|
|
35
35
|
"prometheus"
|
|
36
36
|
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"ts-essentials": "9.4.0"
|
|
39
|
+
},
|
|
37
40
|
"devDependencies": {
|
|
38
|
-
"prom-client": "14.
|
|
41
|
+
"prom-client": "14.2.0"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|
|
41
44
|
"prom-client": "13.x.x || 14.x"
|
|
42
45
|
}
|
|
43
|
-
}
|
|
46
|
+
}
|