webmcp-nexus-core 0.1.10 → 0.1.11
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.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -319,13 +319,22 @@ function resolveObjectLiteralArg(arg, sourceFile, project, projectRoot) {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
const metadata = extractFunctionMetadata(funcNode, sourceFile);
|
|
322
|
+
let injectionTarget = toolName;
|
|
323
|
+
if (prop.getKind() === import_ts_morph.SyntaxKind.PropertyAssignment) {
|
|
324
|
+
const valueKind = valueNode.getKind();
|
|
325
|
+
if (valueKind === import_ts_morph.SyntaxKind.Identifier || valueKind === import_ts_morph.SyntaxKind.PropertyAccessExpression) {
|
|
326
|
+
injectionTarget = valueNode.getText();
|
|
327
|
+
} else {
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
322
331
|
tools.push({
|
|
323
332
|
name: toolName,
|
|
324
333
|
description: metadata.description,
|
|
325
334
|
properties: metadata.properties,
|
|
326
335
|
readOnly: metadata.readOnly,
|
|
327
336
|
sourceFile: relPath,
|
|
328
|
-
injectionTarget
|
|
337
|
+
injectionTarget
|
|
329
338
|
});
|
|
330
339
|
}
|
|
331
340
|
return tools;
|
package/dist/index.js
CHANGED
|
@@ -279,13 +279,22 @@ function resolveObjectLiteralArg(arg, sourceFile, project, projectRoot) {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
const metadata = extractFunctionMetadata(funcNode, sourceFile);
|
|
282
|
+
let injectionTarget = toolName;
|
|
283
|
+
if (prop.getKind() === SyntaxKind.PropertyAssignment) {
|
|
284
|
+
const valueKind = valueNode.getKind();
|
|
285
|
+
if (valueKind === SyntaxKind.Identifier || valueKind === SyntaxKind.PropertyAccessExpression) {
|
|
286
|
+
injectionTarget = valueNode.getText();
|
|
287
|
+
} else {
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
282
291
|
tools.push({
|
|
283
292
|
name: toolName,
|
|
284
293
|
description: metadata.description,
|
|
285
294
|
properties: metadata.properties,
|
|
286
295
|
readOnly: metadata.readOnly,
|
|
287
296
|
sourceFile: relPath,
|
|
288
|
-
injectionTarget
|
|
297
|
+
injectionTarget
|
|
289
298
|
});
|
|
290
299
|
}
|
|
291
300
|
return tools;
|