@nuxtjs/mcp-toolkit 0.4.0 → 0.4.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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtjs/mcp-toolkit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "configKey": "mcp",
5
5
  "docs": "https://mcp-toolkit.nuxt.dev/getting-started/installation",
6
6
  "mcp": "https://mcp-toolkit.nuxt.dev/mcp",
package/dist/module.mjs CHANGED
@@ -6,7 +6,7 @@ import { ROUTES } from '../dist/runtime/server/mcp/constants.js';
6
6
  import { addDevToolsCustomTabs } from '../dist/runtime/server/mcp/devtools/index.js';
7
7
 
8
8
  const name = "@nuxtjs/mcp-toolkit";
9
- const version = "0.4.0";
9
+ const version = "0.4.1";
10
10
 
11
11
  const log = logger.withTag("@nuxtjs/mcp-toolkit");
12
12
  const { resolve } = createResolver(import.meta.url);
@@ -7,7 +7,7 @@ export type MsCacheDuration = '1s' | '5s' | '10s' | '15s' | '30s' | '45s' | '1m'
7
7
  * @see https://nitro.build/guide/cache#options
8
8
  */
9
9
  export interface McpCacheOptions<Args = unknown> {
10
- /** Cache duration as string (e.g. '1h') or milliseconds (required) */
10
+ /** Cache duration as string (e.g. '1h') or seconds (required) */
11
11
  maxAge: MsCacheDuration | number;
12
12
  /** Duration for stale-while-revalidate */
13
13
  staleMaxAge?: number;
@@ -26,7 +26,7 @@ export interface McpCacheOptions<Args = unknown> {
26
26
  */
27
27
  export type McpCache<Args = unknown> = MsCacheDuration | number | McpCacheOptions<Args>;
28
28
  /**
29
- * Parse cache duration to milliseconds
29
+ * Parse cache duration to seconds
30
30
  */
31
31
  export declare function parseCacheDuration(duration: MsCacheDuration | number): number;
32
32
  /**
@@ -8,7 +8,7 @@ export function parseCacheDuration(duration) {
8
8
  if (parsed === void 0) {
9
9
  throw new Error(`Invalid cache duration: ${duration}`);
10
10
  }
11
- return parsed;
11
+ return Math.ceil(parsed / 1e3);
12
12
  }
13
13
  export function createCacheOptions(cache, name, defaultGetKey) {
14
14
  if (typeof cache === "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtjs/mcp-toolkit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Create MCP servers directly in your Nuxt application. Define tools, resources, and prompts with a simple and intuitive API.",
5
5
  "repository": {
6
6
  "type": "git",