mcp-searxng 1.2.0 → 1.2.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.d.ts +1 -1
- package/dist/index.js +12 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
declare const packageVersion = "1.2.
|
|
3
|
+
declare const packageVersion = "1.2.1";
|
|
4
4
|
export { packageVersion };
|
|
5
5
|
export declare function isWebUrlReadArgs(args: unknown): args is {
|
|
6
6
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
3
4
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
6
|
import { CallToolRequestSchema, ListToolsRequestSchema, SetLevelRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -11,8 +12,17 @@ import { fetchAndConvertToMarkdown } from "./url-reader.js";
|
|
|
11
12
|
import { createConfigResource, createHelpResource } from "./resources.js";
|
|
12
13
|
import { createHttpServer, resolveBindHost } from "./http-server.js";
|
|
13
14
|
// Use a static version string that will be updated by the version script
|
|
14
|
-
const packageVersion = "1.2.
|
|
15
|
-
const isMainModule =
|
|
15
|
+
const packageVersion = "1.2.1";
|
|
16
|
+
const isMainModule = (() => {
|
|
17
|
+
if (process.argv[1] === undefined)
|
|
18
|
+
return false;
|
|
19
|
+
try {
|
|
20
|
+
return fileURLToPath(import.meta.url) === realpathSync(process.argv[1]);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
16
26
|
// Export the version for use in other modules
|
|
17
27
|
export { packageVersion };
|
|
18
28
|
// Type guard for URL reading args
|