nextjs-secure 0.6.0 → 0.7.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.cts CHANGED
@@ -5,6 +5,7 @@ export { ContentSecurityPolicy, PRESET_API, PRESET_RELAXED, PRESET_STRICT, Permi
5
5
  export { APIKeyConfig, AuthConfig, AuthError, AuthErrorCode, AuthUser, JWTConfig, JWTPayload, RBACConfig, SessionConfig, decodeJWT, extractBearerToken, verifyJWT, withAPIKey, withAuth, withJWT, withOptionalAuth, withRoles, withSession } from './auth.cjs';
6
6
  export { m as ContentTypeConfig, C as CustomSchema, a2 as DANGEROUS_EXTENSIONS, F as FieldRule, c as FieldType, p as FileInfo, n as FileValidationConfig, o as FileValidationError, V as InputValidationError, T as MIME_TYPES, P as PathValidationConfig, l as PathValidationResult, k as SQLDetection, j as SQLProtectionConfig, g as SanitizeConfig, f as SanitizeMode, e as ValidatedContext, d as ValidationConfig, a as ValidationResult, D as createValidator, Z as detectFileType, ac as detectSQLInjection, aa as detectXSS, a6 as escapeHtml, aj as hasPathTraversal, ae as hasSQLInjection, N as isFormRequest, L as isJsonRequest, a3 as sanitize, a5 as sanitizeFields, an as sanitizeFilename, a4 as sanitizeObject, ai as sanitizePath, af as sanitizeSQLInput, a8 as stripHtml, x as validate, y as validateBody, I as validateContentType, U as validateFile, W as validateFiles, ah as validatePath, z as validateQuery, B as validateRequest, t as withContentType, u as withFileValidation, s as withSQLProtection, q as withSanitization, v as withSecureValidation, w as withValidation, r as withXSSProtection } from './path-BVbunPfR.cjs';
7
7
  export { AuditConfig, AuditLogEntry, MemoryStore as AuditMemoryStore, MemoryStoreOptions as AuditMemoryStoreOptions, CLFFormatter, ConsoleStore, ConsoleStoreOptions, DEFAULT_PII_FIELDS, ExternalStore, ExternalStoreOptions, JSONFormatter, LogEntry, LogFormatter, LogLevel, LogQueryOptions, LogStore, MultiStore, PIIConfig, RequestLogEntry, SecurityEventConfig, SecurityEventEntry, SecurityEventTracker, SecurityEventType, StructuredFormatter, TextFormatter, createMemoryStore as createAuditMemoryStore, createAuditMiddleware, createCLFFormatter, createConsoleStore, createDatadogStore, createExternalStore, createJSONFormatter, createMultiStore, createRedactor, createSecurityTracker, createStructuredFormatter, createTextFormatter, mask, redactCreditCard, redactEmail, redactHeaders, redactIP, redactObject, redactPhone, redactQuery, trackSecurityEvent, withAuditLog, withRequestId, withTiming } from './audit.cjs';
8
+ export { BOT_PROTECTION_PRESETS, BehaviorAnalysisResult, BehaviorOptions, BehaviorStore, BotCategory, BotContext, BotDetectionResult, BotPattern, BotProtectionOptions, CaptchaOptions, CaptchaProvider, CaptchaResult, DEFAULT_ALLOWED_BOTS, DEFAULT_ALLOWED_CATEGORIES, DEFAULT_HONEYPOT_FIELDS, HoneypotOptions, KNOWN_BOT_PATTERNS, MemoryBehaviorStore, UserAgentOptions, analyzeBehavior, analyzeUserAgent, checkBehavior, checkCaptcha, checkHoneypot, createBotPattern, detectBot, generateHCaptcha, generateHoneypotCSS, generateHoneypotHTML, generateRecaptchaV2, generateRecaptchaV3, generateTurnstile, getBotsByCategory, getGlobalBehaviorStore, isBotAllowed, isSuspiciousUA, verifyCaptcha, withBehaviorAnalysis, withBehaviorProtection, withBotProtection, withBotProtectionPreset, withCaptcha, withCaptchaProtection, withHoneypot, withHoneypotProtection, withUserAgentProtection } from './bot.cjs';
8
9
  import 'next/server';
9
10
 
10
11
  /**
@@ -306,6 +307,6 @@ declare function getGeoInfo(request: NextRequest): {
306
307
  /**
307
308
  * Package version
308
309
  */
309
- declare const VERSION = "0.6.0";
310
+ declare const VERSION = "0.7.0";
310
311
 
311
312
  export { AuthenticationError, AuthorizationError, ConfigurationError, CsrfError, Duration, NextRequest, RateLimitError, SecureError, VERSION, ValidationError, anonymizeIp, formatDuration, getClientIp, getGeoInfo, isLocalhost, isPrivateIp, isSecureError, isValidIp, normalizeIp, nowInMs, nowInSeconds, parseDuration, sleep, toSecureError };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { ContentSecurityPolicy, PRESET_API, PRESET_RELAXED, PRESET_STRICT, Permi
5
5
  export { APIKeyConfig, AuthConfig, AuthError, AuthErrorCode, AuthUser, JWTConfig, JWTPayload, RBACConfig, SessionConfig, decodeJWT, extractBearerToken, verifyJWT, withAPIKey, withAuth, withJWT, withOptionalAuth, withRoles, withSession } from './auth.js';
6
6
  export { m as ContentTypeConfig, C as CustomSchema, a2 as DANGEROUS_EXTENSIONS, F as FieldRule, c as FieldType, p as FileInfo, n as FileValidationConfig, o as FileValidationError, V as InputValidationError, T as MIME_TYPES, P as PathValidationConfig, l as PathValidationResult, k as SQLDetection, j as SQLProtectionConfig, g as SanitizeConfig, f as SanitizeMode, e as ValidatedContext, d as ValidationConfig, a as ValidationResult, D as createValidator, Z as detectFileType, ac as detectSQLInjection, aa as detectXSS, a6 as escapeHtml, aj as hasPathTraversal, ae as hasSQLInjection, N as isFormRequest, L as isJsonRequest, a3 as sanitize, a5 as sanitizeFields, an as sanitizeFilename, a4 as sanitizeObject, ai as sanitizePath, af as sanitizeSQLInput, a8 as stripHtml, x as validate, y as validateBody, I as validateContentType, U as validateFile, W as validateFiles, ah as validatePath, z as validateQuery, B as validateRequest, t as withContentType, u as withFileValidation, s as withSQLProtection, q as withSanitization, v as withSecureValidation, w as withValidation, r as withXSSProtection } from './path-BVbunPfR.js';
7
7
  export { AuditConfig, AuditLogEntry, MemoryStore as AuditMemoryStore, MemoryStoreOptions as AuditMemoryStoreOptions, CLFFormatter, ConsoleStore, ConsoleStoreOptions, DEFAULT_PII_FIELDS, ExternalStore, ExternalStoreOptions, JSONFormatter, LogEntry, LogFormatter, LogLevel, LogQueryOptions, LogStore, MultiStore, PIIConfig, RequestLogEntry, SecurityEventConfig, SecurityEventEntry, SecurityEventTracker, SecurityEventType, StructuredFormatter, TextFormatter, createMemoryStore as createAuditMemoryStore, createAuditMiddleware, createCLFFormatter, createConsoleStore, createDatadogStore, createExternalStore, createJSONFormatter, createMultiStore, createRedactor, createSecurityTracker, createStructuredFormatter, createTextFormatter, mask, redactCreditCard, redactEmail, redactHeaders, redactIP, redactObject, redactPhone, redactQuery, trackSecurityEvent, withAuditLog, withRequestId, withTiming } from './audit.js';
8
+ export { BOT_PROTECTION_PRESETS, BehaviorAnalysisResult, BehaviorOptions, BehaviorStore, BotCategory, BotContext, BotDetectionResult, BotPattern, BotProtectionOptions, CaptchaOptions, CaptchaProvider, CaptchaResult, DEFAULT_ALLOWED_BOTS, DEFAULT_ALLOWED_CATEGORIES, DEFAULT_HONEYPOT_FIELDS, HoneypotOptions, KNOWN_BOT_PATTERNS, MemoryBehaviorStore, UserAgentOptions, analyzeBehavior, analyzeUserAgent, checkBehavior, checkCaptcha, checkHoneypot, createBotPattern, detectBot, generateHCaptcha, generateHoneypotCSS, generateHoneypotHTML, generateRecaptchaV2, generateRecaptchaV3, generateTurnstile, getBotsByCategory, getGlobalBehaviorStore, isBotAllowed, isSuspiciousUA, verifyCaptcha, withBehaviorAnalysis, withBehaviorProtection, withBotProtection, withBotProtectionPreset, withCaptcha, withCaptchaProtection, withHoneypot, withHoneypotProtection, withUserAgentProtection } from './bot.js';
8
9
  import 'next/server';
9
10
 
10
11
  /**
@@ -306,6 +307,6 @@ declare function getGeoInfo(request: NextRequest): {
306
307
  /**
307
308
  * Package version
308
309
  */
309
- declare const VERSION = "0.6.0";
310
+ declare const VERSION = "0.7.0";
310
311
 
311
312
  export { AuthenticationError, AuthorizationError, ConfigurationError, CsrfError, Duration, NextRequest, RateLimitError, SecureError, VERSION, ValidationError, anonymizeIp, formatDuration, getClientIp, getGeoInfo, isLocalhost, isPrivateIp, isSecureError, isValidIp, normalizeIp, nowInMs, nowInSeconds, parseDuration, sleep, toSecureError };