@boolesai/tspec-cli 0.0.5 → 1.0.0
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 +12 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -140,17 +140,17 @@ function setLoggerOptions(options) {
|
|
|
140
140
|
}
|
|
141
141
|
function debug(message, ...args) {
|
|
142
142
|
if (globalOptions.verbose && !globalOptions.quiet) {
|
|
143
|
-
console.
|
|
143
|
+
console.error(chalk.gray(`[debug] ${message}`), ...args);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
function info(message, ...args) {
|
|
147
147
|
if (!globalOptions.quiet) {
|
|
148
|
-
console.
|
|
148
|
+
console.error(chalk.blue(message), ...args);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
function success(message, ...args) {
|
|
152
152
|
if (!globalOptions.quiet) {
|
|
153
|
-
console.
|
|
153
|
+
console.error(chalk.green(message), ...args);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function warn(message, ...args) {
|
|
@@ -160,11 +160,11 @@ function error(message, ...args) {
|
|
|
160
160
|
console.error(chalk.red(`[error] ${message}`), ...args);
|
|
161
161
|
}
|
|
162
162
|
function log(message, ...args) {
|
|
163
|
-
console.
|
|
163
|
+
console.error(message, ...args);
|
|
164
164
|
}
|
|
165
165
|
function newline() {
|
|
166
166
|
if (!globalOptions.quiet) {
|
|
167
|
-
console.
|
|
167
|
+
console.error();
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
const logger = {
|
|
@@ -14920,10 +14920,16 @@ async function startMcpServer() {
|
|
|
14920
14920
|
};
|
|
14921
14921
|
}
|
|
14922
14922
|
});
|
|
14923
|
+
server.onerror = (error2) => {
|
|
14924
|
+
console.error("[MCP Error]", error2);
|
|
14925
|
+
};
|
|
14923
14926
|
const transport = new StdioServerTransport();
|
|
14924
14927
|
await server.connect(transport);
|
|
14928
|
+
await new Promise(() => {
|
|
14929
|
+
});
|
|
14925
14930
|
}
|
|
14926
14931
|
const mcpCommand = new Command("mcp").description("Start MCP server for tool integration").action(async () => {
|
|
14932
|
+
setLoggerOptions({ quiet: true });
|
|
14927
14933
|
await startMcpServer();
|
|
14928
14934
|
});
|
|
14929
14935
|
const program = new Command();
|
|
@@ -14933,5 +14939,5 @@ program.addCommand(runCommand);
|
|
|
14933
14939
|
program.addCommand(parseCommand);
|
|
14934
14940
|
program.addCommand(listCommand);
|
|
14935
14941
|
program.addCommand(mcpCommand);
|
|
14936
|
-
program.
|
|
14942
|
+
await program.parseAsync();
|
|
14937
14943
|
//# sourceMappingURL=index.js.map
|