opencode-swarm 6.74.0 → 6.74.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/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64045,7 +64045,8 @@ function validateGraphNode(node) {
|
|
|
64045
64045
|
throw new Error("Invalid node: exports must be an array of strings");
|
|
64046
64046
|
}
|
|
64047
64047
|
if (containsControlChars(exp)) {
|
|
64048
|
-
|
|
64048
|
+
const preview = exp.slice(0, 120);
|
|
64049
|
+
throw new Error(`Invalid node: exports contains control characters (file=${node.filePath}, value="${preview}")`);
|
|
64049
64050
|
}
|
|
64050
64051
|
}
|
|
64051
64052
|
if (!Array.isArray(node.imports)) {
|
|
@@ -64056,7 +64057,8 @@ function validateGraphNode(node) {
|
|
|
64056
64057
|
throw new Error("Invalid node: imports must be an array of strings");
|
|
64057
64058
|
}
|
|
64058
64059
|
if (containsControlChars(imp)) {
|
|
64059
|
-
|
|
64060
|
+
const preview = imp.slice(0, 120);
|
|
64061
|
+
throw new Error(`Invalid node: imports contains control characters (file=${node.filePath}, value="${preview}")`);
|
|
64060
64062
|
}
|
|
64061
64063
|
}
|
|
64062
64064
|
}
|
|
@@ -64413,11 +64415,13 @@ var EXTENSION_TO_LANGUAGE = {
|
|
|
64413
64415
|
};
|
|
64414
64416
|
function parseFileImports(content) {
|
|
64415
64417
|
const imports = [];
|
|
64416
|
-
const importRegex = /import\s+(?:\{[\s\S]*?\}|(?:\*\s+as\s+\w+)|\w+)\s+from\s+['"`]([^'"
|
|
64418
|
+
const importRegex = /import\s+(?:\{[\s\S]*?\}|(?:\*\s+as\s+\w+)|\w+)\s+from\s+['"`]([^'"`\0\t\r\n]+)['"`]|import\s+['"`]([^'"`\0\t\r\n]+)['"`]|require\s*\(\s*['"`]([^'"`\0\t\r\n]+)['"`]\s*\)|export\s*\{[^}]*\}\s*from\s+['"`]([^'"`\0\t\r\n]+)['"`]|export\s+\*(?:\s+as\s+\w+)?\s+from\s+['"`]([^'"`\0\t\r\n]+)['"`]|import\s*\(\s*['"`]([^'"`\0\t\r\n]+)['"`]\s*\)/g;
|
|
64417
64419
|
for (const match of content.matchAll(importRegex)) {
|
|
64418
64420
|
const modulePath = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
|
64419
64421
|
if (!modulePath)
|
|
64420
64422
|
continue;
|
|
64423
|
+
if (containsControlChars(modulePath))
|
|
64424
|
+
continue;
|
|
64421
64425
|
const matchedString = match[0];
|
|
64422
64426
|
let importType = "named";
|
|
64423
64427
|
if (matchedString.includes("* as")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.74.
|
|
3
|
+
"version": "6.74.1",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|