@lensmcp/core 1.21.0 → 1.21.2
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/lib/thresholds.d.ts +10 -0
- package/lib/thresholds.js +1 -1
- package/package.json +2 -2
package/lib/thresholds.d.ts
CHANGED
|
@@ -19,6 +19,16 @@ export interface LensmcpThresholds {
|
|
|
19
19
|
slowRenderMs: number;
|
|
20
20
|
/** DB query durationMs at/above which its query shape is "slow" (`db://slow-queries`). Default 100. */
|
|
21
21
|
slowQueryMs: number;
|
|
22
|
+
/**
|
|
23
|
+
* CONCURRENT in-flight requests to one identical endpoint before
|
|
24
|
+
* `duplicate-requests` fires. Default 3 — i.e. more than two at once.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately above 2: React `<StrictMode>` double-invokes effects in dev, so
|
|
27
|
+
* every correct effect-driven fetch legitimately appears twice. A threshold of
|
|
28
|
+
* 2 would fire on the whole app and get switched off, and then it would not be
|
|
29
|
+
* there for the case that matters.
|
|
30
|
+
*/
|
|
31
|
+
duplicateRequestPeak: number;
|
|
22
32
|
}
|
|
23
33
|
export declare const DEFAULT_THRESHOLDS: LensmcpThresholds;
|
|
24
34
|
/**
|
package/lib/thresholds.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var s=(e,o)=>n(e,"name",{value:o,configurable:!0});var u=Object.defineProperty,l=s((e,o)=>u(e,"name",{value:o,configurable:!0}),"n");export const DEFAULT_THRESHOLDS={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3};export function resolveThresholds(e){const o={...DEFAULT_THRESHOLDS};if(e)for(const t of Object.keys(DEFAULT_THRESHOLDS)){const r=e[t];typeof r=="number"&&Number.isFinite(r)&&r>=0&&(o[t]=r)}return o}s(resolveThresholds,"resolveThresholds"),l(resolveThresholds,"resolveThresholds");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lensmcp/core",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lensmcp/protocol-types": "1.21.
|
|
22
|
+
"@lensmcp/protocol-types": "1.21.2",
|
|
23
23
|
"tslib": "^2.3.0"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|