@webdecoy/nextjs 0.25.2 → 0.26.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.
package/dist/index.d.mts CHANGED
@@ -96,8 +96,8 @@ interface WebDecoyMiddlewareOptions extends ProtectOptions {
96
96
  declare function withWebDecoy(config: WebDecoyConfig & WebDecoyMiddlewareOptions): (req: NextRequest) => Promise<NextResponse>;
97
97
  interface WithBotProtectionOptions extends WebDecoyMiddlewareOptions {
98
98
  /**
99
- * Block threshold (0-100). Requests with scores above this are blocked.
100
- * Default: 80
99
+ * Minimum confidence (0–100) required to act on a cloud verdict.
100
+ * Defaults to 80 in legacy mode. Unified mode uses ingest's confidence gates.
101
101
  */
102
102
  blockThreshold?: number;
103
103
  }
package/dist/index.d.ts CHANGED
@@ -96,8 +96,8 @@ interface WebDecoyMiddlewareOptions extends ProtectOptions {
96
96
  declare function withWebDecoy(config: WebDecoyConfig & WebDecoyMiddlewareOptions): (req: NextRequest) => Promise<NextResponse>;
97
97
  interface WithBotProtectionOptions extends WebDecoyMiddlewareOptions {
98
98
  /**
99
- * Block threshold (0-100). Requests with scores above this are blocked.
100
- * Default: 80
99
+ * Minimum confidence (0–100) required to act on a cloud verdict.
100
+ * Defaults to 80 in legacy mode. Unified mode uses ingest's confidence gates.
101
101
  */
102
102
  blockThreshold?: number;
103
103
  }
package/dist/index.js CHANGED
@@ -124,7 +124,7 @@ function withWebDecoy(config) {
124
124
  }
125
125
  function withBotProtection(handler, config) {
126
126
  const sdk = new import_node.WebDecoy(config);
127
- const threshold = config.blockThreshold ?? 80;
127
+ const threshold = config.blockThreshold ?? (config.decisionMode === "unified_v1" ? void 0 : 80);
128
128
  const mode = config.mode ?? "monitor";
129
129
  return (async (...args) => {
130
130
  const [req, res] = args;
package/dist/index.mjs CHANGED
@@ -99,7 +99,7 @@ function withWebDecoy(config) {
99
99
  }
100
100
  function withBotProtection(handler, config) {
101
101
  const sdk = new WebDecoy(config);
102
- const threshold = config.blockThreshold ?? 80;
102
+ const threshold = config.blockThreshold ?? (config.decisionMode === "unified_v1" ? void 0 : 80);
103
103
  const mode = config.mode ?? "monitor";
104
104
  return (async (...args) => {
105
105
  const [req, res] = args;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webdecoy/nextjs",
3
- "version": "0.25.2",
3
+ "version": "0.26.0",
4
4
  "description": "Web Decoy middleware for Next.js",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "url": "https://github.com/WebDecoy/node/issues"
55
55
  },
56
56
  "dependencies": {
57
- "@webdecoy/node": "^0.25.2"
57
+ "@webdecoy/node": "^0.26.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "next": ">=13.0.0"