@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
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.
|
|
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
|
|
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
|
|
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