securenow 8.11.1 → 8.11.3
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/NPM_README.md +3 -1
- package/README.md +2 -0
- package/SKILL-API.md +3 -1
- package/SKILL-CLI.md +625 -632
- package/TELEMETRY-SQL.md +6 -1
- package/cidr.js +83 -83
- package/cli/client.js +102 -102
- package/cli/diagnostics.js +4 -0
- package/cli/firewall.js +141 -141
- package/cli/fp.js +638 -638
- package/cli/monitor.js +398 -398
- package/cli/run.js +132 -132
- package/cli/security.js +1866 -1856
- package/cli/ui.js +374 -374
- package/cli.js +923 -922
- package/firewall-cloud.js +202 -202
- package/firewall-iptables.js +139 -139
- package/firewall-only.js +46 -46
- package/firewall-tcp.js +74 -74
- package/firewall.js +1470 -1470
- package/legacy-semconv.js +4 -3
- package/mcp/catalog.js +2358 -2346
- package/nextjs-auto-capture.d.ts +29 -29
- package/nextjs-auto-capture.js +280 -274
- package/nextjs-middleware.d.ts +57 -57
- package/nextjs-middleware.js +274 -268
- package/nextjs-webpack-config.js +79 -79
- package/nextjs-wrapper.d.ts +95 -95
- package/nextjs-wrapper.js +240 -234
- package/nextjs.js +19 -12
- package/nuxt-server-plugin.mjs +11 -5
- package/nuxt.mjs +74 -74
- package/otp-redaction.js +99 -0
- package/package.json +3 -2
- package/register.d.ts +42 -42
- package/register.js +44 -44
- package/resolve-ip.js +13 -13
- package/telemetry-schema.json +3 -1
- package/tracing.js +860 -855
package/nextjs-middleware.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SecureNow Next.js Middleware TypeScript Declarations
|
|
3
|
-
*
|
|
4
|
-
* Provides middleware for capturing request bodies in Next.js API routes.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { NextRequest, NextResponse } from 'next/server';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Next.js middleware function for request body capture
|
|
11
|
-
*
|
|
12
|
-
* @param request - Next.js request object
|
|
13
|
-
* @returns Promise<NextResponse> - Passes through to next handler
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // middleware.ts
|
|
18
|
-
* import { NextRequest, NextResponse } from 'next/server';
|
|
19
|
-
* import { middleware as securenowMiddleware } from 'securenow/nextjs-middleware';
|
|
20
|
-
*
|
|
21
|
-
* export async function middleware(request: NextRequest) {
|
|
22
|
-
* // Capture body with SecureNow
|
|
23
|
-
* await securenowMiddleware(request);
|
|
24
|
-
*
|
|
25
|
-
* // Your custom middleware logic
|
|
26
|
-
* return NextResponse.next();
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* export const config = {
|
|
30
|
-
* matcher: '/api/:path*',
|
|
31
|
-
* };
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export function middleware(request: NextRequest): Promise<NextResponse>;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Configuration options for body capture middleware
|
|
38
|
-
*/
|
|
39
|
-
export interface BodyCaptureOptions {
|
|
40
|
-
/**
|
|
41
|
-
* Maximum body size to capture in bytes
|
|
42
|
-
* @default 10240 (10KB)
|
|
43
|
-
*/
|
|
44
|
-
maxBodySize?: number;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Additional sensitive field names to redact
|
|
48
|
-
* @default []
|
|
49
|
-
*/
|
|
50
|
-
sensitiveFields?: string[];
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Enable body capture
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
enabled?: boolean;
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* SecureNow Next.js Middleware TypeScript Declarations
|
|
3
|
+
*
|
|
4
|
+
* Provides middleware for capturing request bodies in Next.js API routes.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { NextRequest, NextResponse } from 'next/server';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Next.js middleware function for request body capture
|
|
11
|
+
*
|
|
12
|
+
* @param request - Next.js request object
|
|
13
|
+
* @returns Promise<NextResponse> - Passes through to next handler
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // middleware.ts
|
|
18
|
+
* import { NextRequest, NextResponse } from 'next/server';
|
|
19
|
+
* import { middleware as securenowMiddleware } from 'securenow/nextjs-middleware';
|
|
20
|
+
*
|
|
21
|
+
* export async function middleware(request: NextRequest) {
|
|
22
|
+
* // Capture body with SecureNow
|
|
23
|
+
* await securenowMiddleware(request);
|
|
24
|
+
*
|
|
25
|
+
* // Your custom middleware logic
|
|
26
|
+
* return NextResponse.next();
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* export const config = {
|
|
30
|
+
* matcher: '/api/:path*',
|
|
31
|
+
* };
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export function middleware(request: NextRequest): Promise<NextResponse>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Configuration options for body capture middleware
|
|
38
|
+
*/
|
|
39
|
+
export interface BodyCaptureOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Maximum body size to capture in bytes
|
|
42
|
+
* @default 10240 (10KB)
|
|
43
|
+
*/
|
|
44
|
+
maxBodySize?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Additional sensitive field names to redact
|
|
48
|
+
* @default []
|
|
49
|
+
*/
|
|
50
|
+
sensitiveFields?: string[];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Enable body capture
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
enabled?: boolean;
|
|
57
|
+
}
|