@runsec/mcp 1.0.2 → 1.0.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/dist/index.js +6 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40,17 +40,14 @@ var import_js_yaml = __toESM(require("js-yaml"));
|
|
|
40
40
|
var cachedDataDirectory = null;
|
|
41
41
|
function getDataDirectory() {
|
|
42
42
|
if (cachedDataDirectory) return cachedDataDirectory;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
cachedDataDirectory = import_node_path.default.resolve(prodPath);
|
|
43
|
+
const dataPath = import_node_path.default.join(__dirname, "data");
|
|
44
|
+
if (import_node_fs.default.existsSync(dataPath) && import_node_fs.default.statSync(dataPath).isDirectory()) {
|
|
45
|
+
cachedDataDirectory = import_node_path.default.resolve(dataPath);
|
|
47
46
|
return cachedDataDirectory;
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
throw new Error(`Cannot find rules data directory. Looked in: ${prodPath}, ${fallbackPath}`);
|
|
48
|
+
const errorMsg = `Data directory not found. Checked: ${dataPath} (__dirname=${__dirname})`;
|
|
49
|
+
console.error(errorMsg);
|
|
50
|
+
throw new Error(errorMsg);
|
|
54
51
|
}
|
|
55
52
|
var PCI_CWE = /* @__PURE__ */ new Set(["CWE-798", "CWE-327", "CWE-256", "CWE-89", "CWE-79", "CWE-22", "CWE-287", "CWE-285", "CWE-522"]);
|
|
56
53
|
var SOC2_CWE = /* @__PURE__ */ new Set(["CWE-285", "CWE-306", "CWE-287", "CWE-863", "CWE-16", "CWE-200", "CWE-862"]);
|