@tsrx/mcp 0.0.7 → 0.0.9
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/package.json +3 -3
- package/src/compile.js +4 -21
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "MCP server for TSRX documentation and project context",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.9",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
38
38
|
"prettier": "^3.8.3",
|
|
39
39
|
"zod": "^4.3.6",
|
|
40
|
-
"@tsrx/core": "0.0.
|
|
41
|
-
"@tsrx/prettier-plugin": "0.3.
|
|
40
|
+
"@tsrx/core": "0.0.27",
|
|
41
|
+
"@tsrx/prettier-plugin": "0.3.48"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^24.3.0",
|
package/src/compile.js
CHANGED
|
@@ -85,36 +85,19 @@ async function import_compiler(compiler_package, cwd, package_json_path) {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* @param {
|
|
88
|
+
* @param {{ code: string }} result
|
|
89
89
|
*/
|
|
90
90
|
function get_generated_code(result) {
|
|
91
91
|
if (!result || typeof result !== 'object') return null;
|
|
92
|
-
|
|
93
|
-
if (typeof output.code === 'string') return output.code;
|
|
94
|
-
if (
|
|
95
|
-
output.js &&
|
|
96
|
-
typeof output.js === 'object' &&
|
|
97
|
-
typeof (/** @type {Record<string, unknown>} */ (output.js).code) === 'string'
|
|
98
|
-
) {
|
|
99
|
-
return /** @type {string} */ (/** @type {Record<string, unknown>} */ (output.js).code);
|
|
100
|
-
}
|
|
101
|
-
return null;
|
|
92
|
+
return result.code || null;
|
|
102
93
|
}
|
|
103
94
|
|
|
104
95
|
/**
|
|
105
|
-
* @param {
|
|
96
|
+
* @param {{ css: string }} result
|
|
106
97
|
*/
|
|
107
98
|
function get_generated_css(result) {
|
|
108
99
|
if (!result || typeof result !== 'object') return null;
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
output.css &&
|
|
112
|
-
typeof output.css === 'object' &&
|
|
113
|
-
typeof (/** @type {Record<string, unknown>} */ (output.css).code) === 'string'
|
|
114
|
-
) {
|
|
115
|
-
return /** @type {string} */ (/** @type {Record<string, unknown>} */ (output.css).code);
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
100
|
+
return result.css || null;
|
|
118
101
|
}
|
|
119
102
|
|
|
120
103
|
/**
|