@frontmcp/utils 0.8.0 → 0.8.1
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/esm/index.mjs +1 -1
- package/esm/package.json +2 -2
- package/index.js +3 -3
- package/package.json +2 -2
- package/regex/safe-regex.d.ts +1 -1
package/esm/index.mjs
CHANGED
|
@@ -1435,7 +1435,7 @@ var init_upstash = __esm({
|
|
|
1435
1435
|
});
|
|
1436
1436
|
|
|
1437
1437
|
// libs/utils/src/regex/safe-regex.ts
|
|
1438
|
-
import { analyzeForReDoS, REDOS_THRESHOLDS } from "ast
|
|
1438
|
+
import { analyzeForReDoS, REDOS_THRESHOLDS } from "@enclave-vm/ast";
|
|
1439
1439
|
var DEFAULT_MAX_INPUT_LENGTH = 5e4;
|
|
1440
1440
|
function analyzePattern(pattern, level = "polynomial") {
|
|
1441
1441
|
const patternStr = typeof pattern === "string" ? pattern : pattern.source;
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/utils",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Shared utility functions for FrontMCP - string manipulation, URI handling, path utilities, and more",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@noble/hashes": "^2.0.1",
|
|
31
31
|
"@noble/ciphers": "^2.1.1",
|
|
32
|
-
"ast
|
|
32
|
+
"@enclave-vm/ast": "^2.10.1",
|
|
33
33
|
"zod": "^4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
package/index.js
CHANGED
|
@@ -1457,7 +1457,7 @@ __export(index_exports, {
|
|
|
1457
1457
|
NAMESPACE_SEPARATOR: () => NAMESPACE_SEPARATOR,
|
|
1458
1458
|
NamespacedStorageImpl: () => NamespacedStorageImpl,
|
|
1459
1459
|
PkceError: () => PkceError,
|
|
1460
|
-
REDOS_THRESHOLDS: () =>
|
|
1460
|
+
REDOS_THRESHOLDS: () => import_ast.REDOS_THRESHOLDS,
|
|
1461
1461
|
RedisStorageAdapter: () => RedisStorageAdapter,
|
|
1462
1462
|
StorageConfigError: () => StorageConfigError,
|
|
1463
1463
|
StorageConnectionError: () => StorageConnectionError,
|
|
@@ -1617,7 +1617,7 @@ __export(index_exports, {
|
|
|
1617
1617
|
module.exports = __toCommonJS(index_exports);
|
|
1618
1618
|
|
|
1619
1619
|
// libs/utils/src/regex/safe-regex.ts
|
|
1620
|
-
var
|
|
1620
|
+
var import_ast = require("@enclave-vm/ast");
|
|
1621
1621
|
var DEFAULT_MAX_INPUT_LENGTH = 5e4;
|
|
1622
1622
|
function analyzePattern(pattern, level = "polynomial") {
|
|
1623
1623
|
const patternStr = typeof pattern === "string" ? pattern : pattern.source;
|
|
@@ -1632,7 +1632,7 @@ function analyzePattern(pattern, level = "polynomial") {
|
|
|
1632
1632
|
};
|
|
1633
1633
|
}
|
|
1634
1634
|
try {
|
|
1635
|
-
const result = (0,
|
|
1635
|
+
const result = (0, import_ast.analyzeForReDoS)(patternStr, level);
|
|
1636
1636
|
return {
|
|
1637
1637
|
safe: !result.vulnerable,
|
|
1638
1638
|
score: result.score,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/utils",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Shared utility functions for FrontMCP - string manipulation, URI handling, path utilities, and more",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@noble/hashes": "^2.0.1",
|
|
31
31
|
"@noble/ciphers": "^2.1.1",
|
|
32
|
-
"ast
|
|
32
|
+
"@enclave-vm/ast": "^2.10.1",
|
|
33
33
|
"zod": "^4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
package/regex/safe-regex.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These utilities protect against ReDoS (Regular Expression Denial of Service)
|
|
5
5
|
* attacks by validating patterns and enforcing input length limits.
|
|
6
6
|
*/
|
|
7
|
-
import { REDOS_THRESHOLDS } from 'ast
|
|
7
|
+
import { REDOS_THRESHOLDS } from '@enclave-vm/ast';
|
|
8
8
|
/**
|
|
9
9
|
* Default maximum input length for safe regex operations.
|
|
10
10
|
* Inputs longer than this will be rejected to prevent ReDoS attacks.
|