@angular-helpers/security 22.2.0 → 22.4.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.
@@ -231,7 +231,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
231
231
  type: Injectable
232
232
  }] });
233
233
 
234
- const REGEX_WORKER_INLINE = '"use strict";\n(() => {\n // packages/security/src/workers/regex.worker.ts\n self.addEventListener("message", function(event) {\n const task = event.data;\n if (task.type === "regex-test") {\n const { pattern, text } = task.data;\n const startTime = performance.now();\n try {\n const regex = new RegExp(pattern, "g");\n const matches = [];\n let match;\n while ((match = regex.exec(text)) !== null) {\n matches.push([...match]);\n if (matches.length > 1e3) {\n throw new Error("Too many matches - possible infinite loop");\n }\n }\n const groups = {};\n if (matches.length > 0) {\n const firstMatch = matches[0];\n for (let i = 1; i < firstMatch.length; i++) {\n groups[`group${i}`] = firstMatch[i];\n }\n }\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: matches.length > 0,\n matches,\n groups,\n executionTime: performance.now() - startTime,\n timeout: false\n }\n });\n } catch (error) {\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: false,\n executionTime: performance.now() - startTime,\n timeout: false,\n error: error instanceof Error ? error.message : "Execution error"\n }\n });\n }\n }\n });\n})();\n';
234
+ const REGEX_WORKER_INLINE = '"use strict";\n(() => {\n // src/workers/regex.worker.ts\n self.addEventListener("message", function(event) {\n const task = event.data;\n if (task.type === "regex-test") {\n const { pattern, text } = task.data;\n const startTime = performance.now();\n try {\n const regex = new RegExp(pattern, "g");\n const matches = [];\n let match;\n while ((match = regex.exec(text)) !== null) {\n matches.push([...match]);\n if (matches.length > 1e3) {\n throw new Error("Too many matches - possible infinite loop");\n }\n }\n const groups = {};\n if (matches.length > 0) {\n const firstMatch = matches[0];\n for (let i = 1; i < firstMatch.length; i++) {\n groups[`group${i}`] = firstMatch[i];\n }\n }\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: matches.length > 0,\n matches,\n groups,\n executionTime: performance.now() - startTime,\n timeout: false\n }\n });\n } catch (error) {\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: false,\n executionTime: performance.now() - startTime,\n timeout: false,\n error: error instanceof Error ? error.message : "Execution error"\n }\n });\n }\n }\n });\n})();\n';
235
235
 
236
236
  const REGEX_WORKER_CONFIG = new InjectionToken('REGEX_WORKER_CONFIG');
237
237
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-helpers/security",
3
- "version": "22.2.0",
3
+ "version": "22.4.0",
4
4
  "description": "Angular security helpers for preventing ReDoS and other security vulnerabilities",
5
5
  "keywords": [
6
6
  "angular",