@promster/marblejs 14.0.0 → 15.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 suǝʞǝǝpʇ
3
+ Copyright (c) 2025 suǝʞǝǝpʇ
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,5 +1,5 @@
1
- import { type TPromsterOptions, createMiddleware, getRequestRecorder, signalIsUp, signalIsNotUp } from "./middleware/index.js";
2
- import { getSummary, getContentType, Prometheus, defaultRegister, defaultNormalizers, timing } from '@promster/metrics';
1
+ import { Prometheus, defaultNormalizers, defaultRegister, getContentType, getSummary, timing } from '@promster/metrics';
2
+ import { type TPromsterOptions, createMiddleware, getRequestRecorder, signalIsNotUp, signalIsUp } from "./middleware/index.js";
3
3
  export * from '@promster/types';
4
- export { type TPromsterOptions };
4
+ export type { TPromsterOptions };
5
5
  export { createMiddleware, getRequestRecorder, signalIsUp, signalIsNotUp, getSummary, getContentType, Prometheus, defaultRegister, defaultNormalizers, timing, };
@@ -1,2 +1,2 @@
1
- import { type TPromsterOptions, createMiddleware, getRequestRecorder, signalIsUp, signalIsNotUp } from "./middleware.js";
1
+ import { type TPromsterOptions, createMiddleware, getRequestRecorder, signalIsNotUp, signalIsUp } from "./middleware.js";
2
2
  export { type TPromsterOptions, createMiddleware, signalIsUp, signalIsNotUp, getRequestRecorder, };
@@ -1,6 +1,6 @@
1
- import { type TOptionalPromsterOptions, type TLabelValues } from '@promster/types';
2
- import { type TRequestRecorder } from '@promster/metrics';
3
- import { type HttpRequest, type HttpResponse } from '@marblejs/http';
1
+ import type { HttpRequest, HttpResponse } from '@marblejs/http';
2
+ import type { TRequestRecorder } from '@promster/metrics';
3
+ import type { TLabelValues, TOptionalPromsterOptions } from '@promster/types';
4
4
  import { type Observable } from 'rxjs';
5
5
  declare const extractPath: (req: HttpRequest) => string;
6
6
  declare const getRequestRecorder: () => TRequestRecorder;
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
1
+ export * from "./declarations/src/index.js";
2
2
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvbXN0ZXItbWFyYmxlanMuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var metrics = require('@promster/metrics');
5
6
  var merge = require('merge-options');
6
7
  var rxjs = require('rxjs');
7
8
  var operators = require('rxjs/operators');
8
- var metrics = require('@promster/metrics');
9
9
  var types = require('@promster/types');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -20,17 +20,17 @@ const signalIsUp = () => {
20
20
  if (!upMetric) {
21
21
  return;
22
22
  }
23
- upMetric.forEach(upMetricType => {
23
+ for (const upMetricType of upMetric) {
24
24
  upMetricType.set(1);
25
- });
25
+ }
26
26
  };
27
27
  const signalIsNotUp = () => {
28
28
  if (!upMetric) {
29
29
  return;
30
30
  }
31
- upMetric.forEach(upMetricType => {
31
+ for (const upMetricType of upMetric) {
32
32
  upMetricType.set(0);
33
- });
33
+ }
34
34
  };
35
35
  const recordHandler = (res, shouldSkipMetricsByEnvironment, opts) => stamp => rxjs.fromEvent(res, 'finish').pipe(operators.take(1), operators.mapTo(stamp.req), operators.map(req => ({
36
36
  req,
@@ -46,7 +46,6 @@ const recordHandler = (res, shouldSkipMetricsByEnvironment, opts) => stamp => rx
46
46
  res,
47
47
  req
48
48
  }),
49
- // eslint-disable-next-line camelcase
50
49
  status_code: opts.normalizeStatusCode(res.statusCode, {
51
50
  res,
52
51
  req
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var metrics = require('@promster/metrics');
5
6
  var merge = require('merge-options');
6
7
  var rxjs = require('rxjs');
7
8
  var operators = require('rxjs/operators');
8
- var metrics = require('@promster/metrics');
9
9
  var types = require('@promster/types');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -20,17 +20,17 @@ const signalIsUp = () => {
20
20
  if (!upMetric) {
21
21
  return;
22
22
  }
23
- upMetric.forEach(upMetricType => {
23
+ for (const upMetricType of upMetric) {
24
24
  upMetricType.set(1);
25
- });
25
+ }
26
26
  };
27
27
  const signalIsNotUp = () => {
28
28
  if (!upMetric) {
29
29
  return;
30
30
  }
31
- upMetric.forEach(upMetricType => {
31
+ for (const upMetricType of upMetric) {
32
32
  upMetricType.set(0);
33
- });
33
+ }
34
34
  };
35
35
  const recordHandler = (res, shouldSkipMetricsByEnvironment, opts) => stamp => rxjs.fromEvent(res, 'finish').pipe(operators.take(1), operators.mapTo(stamp.req), operators.map(req => ({
36
36
  req,
@@ -46,7 +46,6 @@ const recordHandler = (res, shouldSkipMetricsByEnvironment, opts) => stamp => rx
46
46
  res,
47
47
  req
48
48
  }),
49
- // eslint-disable-next-line camelcase
50
49
  status_code: opts.normalizeStatusCode(res.statusCode, {
51
50
  res,
52
51
  req
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promster/marblejs",
3
- "version": "14.0.0",
3
+ "version": "15.0.1",
4
4
  "description": "MarbleJs server integrations of promster",
5
5
  "main": "dist/promster-marblejs.cjs.js",
6
6
  "typings": "dist/promster-marblejs.cjs.d.ts",
@@ -36,17 +36,17 @@
36
36
  "prometheus"
37
37
  ],
38
38
  "dependencies": {
39
- "@promster/metrics": "^14.0.0",
40
- "@promster/types": "^14.0.0",
41
39
  "merge-options": "3.0.4",
42
40
  "rxjs": "^7.8.1",
43
- "tslib": "2.6.2"
41
+ "tslib": "2.8.1",
42
+ "@promster/metrics": "15.0.1",
43
+ "@promster/types": "15.0.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@marblejs/core": "4.1.0",
47
47
  "@marblejs/http": "4.1.0",
48
- "fp-ts": "2.16.5",
48
+ "fp-ts": "2.16.9",
49
49
  "parse-prometheus-text-format": "1.1.1",
50
- "@promster/server": "14.0.0"
50
+ "@promster/server": "15.0.1"
51
51
  }
52
52
  }