@lovable.dev/mcp-js 2.0.3 → 2.0.4
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/cli/extract-manifest.cjs +1 -1
- package/dist/cli/extract-manifest.js +1 -1
- package/dist/{cors-struSqwR.js → cors-C0JXMCfE.js} +1 -1
- package/dist/{cors-D7UGErr1.cjs → cors-DKVbSs1E.cjs} +1 -1
- package/dist/{io-XzL-H5AK.cjs → io-qjQFeOKp.cjs} +9 -4
- package/dist/{io-C3ADoUpo.js → io-v7czkKcI.js} +9 -4
- package/dist/{mcp-BcqkkVKv.js → mcp-Bs-rssdi.js} +1 -1
- package/dist/{mcp-DS_Z5uVd.cjs → mcp-CoxglQb6.cjs} +1 -1
- package/dist/{package-JU_QJfZ9.cjs → package-D1rphzeM.cjs} +1 -1
- package/dist/{package-BEdPHDOg.js → package-RbfLOg54.js} +1 -1
- package/dist/protocols/mcp/index.cjs +1 -1
- package/dist/protocols/mcp/index.js +1 -1
- package/dist/protocols/oauth-metadata.cjs +1 -1
- package/dist/protocols/oauth-metadata.js +1 -1
- package/dist/stacks/supabase/index.cjs +2 -2
- package/dist/stacks/supabase/index.js +2 -2
- package/dist/stacks/supabase/vite.cjs +1 -1
- package/dist/stacks/supabase/vite.js +1 -1
- package/dist/stacks/tanstack/index.cjs +2 -2
- package/dist/stacks/tanstack/index.js +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ const projectRoot = process.argv[2] ?? process.cwd();
|
|
|
4
4
|
import("zod/v3").catch((err) => {
|
|
5
5
|
const message = err instanceof Error ? err.message : String(err);
|
|
6
6
|
throw new Error(`@lovable.dev/mcp-js requires zod ^3.25 or ^4.0 to extract MCP schemas. Verify the project's zod dependency and package resolution, then try again. Underlying error: ${message}`);
|
|
7
|
-
}).then(() => Promise.resolve().then(() => require("../io-
|
|
7
|
+
}).then(() => Promise.resolve().then(() => require("../io-qjQFeOKp.cjs"))).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
|
|
8
8
|
console.error(err instanceof Error ? err.message : String(err));
|
|
9
9
|
process.exit(1);
|
|
10
10
|
});
|
|
@@ -4,7 +4,7 @@ const projectRoot = process.argv[2] ?? process.cwd();
|
|
|
4
4
|
import("zod/v3").catch((err) => {
|
|
5
5
|
const message = err instanceof Error ? err.message : String(err);
|
|
6
6
|
throw new Error(`@lovable.dev/mcp-js requires zod ^3.25 or ^4.0 to extract MCP schemas. Verify the project's zod dependency and package resolution, then try again. Underlying error: ${message}`);
|
|
7
|
-
}).then(() => import("../io-
|
|
7
|
+
}).then(() => import("../io-v7czkKcI.js")).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
|
|
8
8
|
console.error(err instanceof Error ? err.message : String(err));
|
|
9
9
|
process.exit(1);
|
|
10
10
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as log, n as applyLogLevelFromEnv, o as parseSafeUrl, r as describeError, s as trimTrailingSlash, t as LOG_LEVEL_ENV_VAR, u as resolveMetricsConfig } from "./logger-Ctv5xUSD.js";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-RbfLOg54.js";
|
|
3
3
|
import "./metadata-path-CAkNcfyY.js";
|
|
4
4
|
import { createLocalJWKSet, decodeProtectedHeader, errors, jwtVerify } from "jose";
|
|
5
5
|
//#region src/core/http.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_logger = require("./logger-CN1q-KNn.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-D1rphzeM.cjs");
|
|
3
3
|
require("./metadata-path-zd7NSNoa.cjs");
|
|
4
4
|
let jose = require("jose");
|
|
5
5
|
//#region src/core/http.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_schema = require("./schema-D3vClxb7.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-D1rphzeM.cjs");
|
|
3
3
|
const require_fs_errors = require("./fs-errors-CWNzOV75.cjs");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
|
@@ -71,7 +71,7 @@ function manifestFromDefinition(definition, urlPath, source = "the MCP entry") {
|
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/manifest/ssr-loader.ts
|
|
74
|
-
async function produceViaSsr(projectRoot, alias, entryAbs, urlPath) {
|
|
74
|
+
async function produceViaSsr(projectRoot, alias, ssr, entryAbs, urlPath) {
|
|
75
75
|
const server = await (0, vite.createServer)({
|
|
76
76
|
configFile: false,
|
|
77
77
|
root: projectRoot,
|
|
@@ -82,7 +82,8 @@ async function produceViaSsr(projectRoot, alias, entryAbs, urlPath) {
|
|
|
82
82
|
watch: null
|
|
83
83
|
},
|
|
84
84
|
optimizeDeps: { noDiscovery: true },
|
|
85
|
-
resolve: { alias }
|
|
85
|
+
resolve: { alias },
|
|
86
|
+
ssr
|
|
86
87
|
});
|
|
87
88
|
try {
|
|
88
89
|
return manifestFromDefinition((await server.ssrLoadModule(entryAbs)).default, urlPath, entryAbs);
|
|
@@ -143,10 +144,14 @@ async function runExtract(projectRoot) {
|
|
|
143
144
|
logLevel: "silent"
|
|
144
145
|
}, "serve");
|
|
145
146
|
const alias = resolved.resolve?.alias ?? [];
|
|
147
|
+
const ssr = {
|
|
148
|
+
external: resolved.ssr.external,
|
|
149
|
+
noExternal: resolved.ssr.noExternal
|
|
150
|
+
};
|
|
146
151
|
const pluginApi = resolved.plugins.find((p) => typeof p.name === "string" && p.name.startsWith(MCP_PLUGIN_NAME_PREFIX))?.api;
|
|
147
152
|
const entryAbs = pluginApi?.mcpEntry ?? (0, node_path.resolve)(projectRoot, "src/lib/mcp/index.ts");
|
|
148
153
|
const urlPath = pluginApi?.urlPath ?? "/mcp";
|
|
149
|
-
await syncManifest((0, node_path.resolve)(projectRoot, MANIFEST_RELATIVE_PATH), entryAbs, urlPath, (entry, path) => produceViaSsr(projectRoot, alias, entry, path));
|
|
154
|
+
await syncManifest((0, node_path.resolve)(projectRoot, MANIFEST_RELATIVE_PATH), entryAbs, urlPath, (entry, path) => produceViaSsr(projectRoot, alias, ssr, entry, path));
|
|
150
155
|
}
|
|
151
156
|
//#endregion
|
|
152
157
|
exports.DEFAULT_MCP_ENTRY = DEFAULT_MCP_ENTRY;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as jsonSchemaFromDefinition } from "./schema-CW1jKvio.js";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-RbfLOg54.js";
|
|
3
3
|
import { t as isFileMissing } from "./fs-errors-PA2t1TIp.js";
|
|
4
4
|
import { lstatSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
|
@@ -71,7 +71,7 @@ function manifestFromDefinition(definition, urlPath, source = "the MCP entry") {
|
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/manifest/ssr-loader.ts
|
|
74
|
-
async function produceViaSsr(projectRoot, alias, entryAbs, urlPath) {
|
|
74
|
+
async function produceViaSsr(projectRoot, alias, ssr, entryAbs, urlPath) {
|
|
75
75
|
const server = await createServer({
|
|
76
76
|
configFile: false,
|
|
77
77
|
root: projectRoot,
|
|
@@ -82,7 +82,8 @@ async function produceViaSsr(projectRoot, alias, entryAbs, urlPath) {
|
|
|
82
82
|
watch: null
|
|
83
83
|
},
|
|
84
84
|
optimizeDeps: { noDiscovery: true },
|
|
85
|
-
resolve: { alias }
|
|
85
|
+
resolve: { alias },
|
|
86
|
+
ssr
|
|
86
87
|
});
|
|
87
88
|
try {
|
|
88
89
|
return manifestFromDefinition((await server.ssrLoadModule(entryAbs)).default, urlPath, entryAbs);
|
|
@@ -143,10 +144,14 @@ async function runExtract(projectRoot) {
|
|
|
143
144
|
logLevel: "silent"
|
|
144
145
|
}, "serve");
|
|
145
146
|
const alias = resolved.resolve?.alias ?? [];
|
|
147
|
+
const ssr = {
|
|
148
|
+
external: resolved.ssr.external,
|
|
149
|
+
noExternal: resolved.ssr.noExternal
|
|
150
|
+
};
|
|
146
151
|
const pluginApi = resolved.plugins.find((p) => typeof p.name === "string" && p.name.startsWith(MCP_PLUGIN_NAME_PREFIX))?.api;
|
|
147
152
|
const entryAbs = pluginApi?.mcpEntry ?? resolve(projectRoot, "src/lib/mcp/index.ts");
|
|
148
153
|
const urlPath = pluginApi?.urlPath ?? "/mcp";
|
|
149
|
-
await syncManifest(resolve(projectRoot, MANIFEST_RELATIVE_PATH), entryAbs, urlPath, (entry, path) => produceViaSsr(projectRoot, alias, entry, path));
|
|
154
|
+
await syncManifest(resolve(projectRoot, MANIFEST_RELATIVE_PATH), entryAbs, urlPath, (entry, path) => produceViaSsr(projectRoot, alias, ssr, entry, path));
|
|
150
155
|
}
|
|
151
156
|
//#endregion
|
|
152
157
|
export { DEFAULT_MCP_ENTRY, DEFAULT_MCP_PATH, runExtract, syncManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as log, r as describeError } from "./logger-Ctv5xUSD.js";
|
|
2
2
|
import { n as schemaFromDefinition, t as jsonSchemaFromDefinition } from "./schema-CW1jKvio.js";
|
|
3
3
|
import { i as ToolContext, n as errorSummary, r as resolveToolErrorMessage } from "./errors-Bwd1L0Rf.js";
|
|
4
|
-
import { d as nowMs, i as normalizeHttpMethod, l as emitBeforeResponse, n as createRequestAuthorizer, p as finalizeWireResponse, t as evaluateCors, u as createNoopRecorder } from "./cors-
|
|
4
|
+
import { d as nowMs, i as normalizeHttpMethod, l as emitBeforeResponse, n as createRequestAuthorizer, p as finalizeWireResponse, t as evaluateCors, u as createNoopRecorder } from "./cors-C0JXMCfE.js";
|
|
5
5
|
import { getParseErrorMessage, safeParseAsync } from "@modelcontextprotocol/sdk/server/zod-compat.js";
|
|
6
6
|
import { CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, McpServer, createMcpHandler } from "@modelcontextprotocol/server";
|
|
7
7
|
//#region src/core/content.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_logger = require("./logger-CN1q-KNn.cjs");
|
|
2
2
|
const require_schema = require("./schema-D3vClxb7.cjs");
|
|
3
3
|
const require_errors = require("./errors-Cr95rSkB.cjs");
|
|
4
|
-
const require_cors = require("./cors-
|
|
4
|
+
const require_cors = require("./cors-DKVbSs1E.cjs");
|
|
5
5
|
let _modelcontextprotocol_sdk_server_zod_compat_js = require("@modelcontextprotocol/sdk/server/zod-compat.js");
|
|
6
6
|
let _modelcontextprotocol_server = require("@modelcontextprotocol/server");
|
|
7
7
|
//#region src/core/content.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createMcpProtocolHandler } from "../../mcp-
|
|
1
|
+
import { t as createMcpProtocolHandler } from "../../mcp-Bs-rssdi.js";
|
|
2
2
|
export { createMcpProtocolHandler };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_logger = require("../logger-CN1q-KNn.cjs");
|
|
3
|
-
const require_cors = require("../cors-
|
|
3
|
+
const require_cors = require("../cors-DKVbSs1E.cjs");
|
|
4
4
|
//#region src/protocols/oauth-metadata.ts
|
|
5
5
|
function notFound() {
|
|
6
6
|
return new Response(JSON.stringify({ error: "not found" }), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as log, r as describeError } from "../logger-Ctv5xUSD.js";
|
|
2
|
-
import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-
|
|
2
|
+
import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-C0JXMCfE.js";
|
|
3
3
|
//#region src/protocols/oauth-metadata.ts
|
|
4
4
|
function notFound() {
|
|
5
5
|
return new Response(JSON.stringify({ error: "not found" }), {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_logger = require("../../logger-CN1q-KNn.cjs");
|
|
3
|
-
const require_cors = require("../../cors-
|
|
3
|
+
const require_cors = require("../../cors-DKVbSs1E.cjs");
|
|
4
4
|
const require_metadata_path = require("../../metadata-path-zd7NSNoa.cjs");
|
|
5
|
-
const require_mcp = require("../../mcp-
|
|
5
|
+
const require_mcp = require("../../mcp-CoxglQb6.cjs");
|
|
6
6
|
const require_protocols_oauth_metadata = require("../../protocols/oauth-metadata.cjs");
|
|
7
7
|
const require_forwarded = require("../../forwarded-B37IdmMX.cjs");
|
|
8
8
|
const require_paths = require("../../paths-OP318a6c.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as trimTrailingSlash } from "../../logger-Ctv5xUSD.js";
|
|
2
|
-
import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-
|
|
2
|
+
import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-C0JXMCfE.js";
|
|
3
3
|
import { t as OAUTH_PROTECTED_RESOURCE_METADATA_PATH } from "../../metadata-path-CAkNcfyY.js";
|
|
4
|
-
import { t as createMcpProtocolHandler } from "../../mcp-
|
|
4
|
+
import { t as createMcpProtocolHandler } from "../../mcp-Bs-rssdi.js";
|
|
5
5
|
import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
|
|
6
6
|
import { t as applyForwardedOrigin } from "../../forwarded-BBXvFeh6.js";
|
|
7
7
|
import { n as assertFunctionName, t as FUNCTIONS_MOUNT_PREFIX } from "../../paths-IS65L6TA.js";
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_package = require("../../package-
|
|
5
|
+
const require_package = require("../../package-D1rphzeM.cjs");
|
|
6
6
|
const require_fs_errors = require("../../fs-errors-CWNzOV75.cjs");
|
|
7
7
|
const require_supabase_config = require("../../supabase-config-Dz7dnUv0.cjs");
|
|
8
8
|
const require_paths = require("../../paths-OP318a6c.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "../../package-
|
|
1
|
+
import { t as version } from "../../package-RbfLOg54.js";
|
|
2
2
|
import { t as isFileMissing } from "../../fs-errors-PA2t1TIp.js";
|
|
3
3
|
import { t as readSupabaseProjectRef } from "../../supabase-config-CakTU8YF.js";
|
|
4
4
|
import { n as assertFunctionName, t as FUNCTIONS_MOUNT_PREFIX } from "../../paths-IS65L6TA.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cors = require("../../cors-
|
|
3
|
-
const require_mcp = require("../../mcp-
|
|
2
|
+
const require_cors = require("../../cors-DKVbSs1E.cjs");
|
|
3
|
+
const require_mcp = require("../../mcp-CoxglQb6.cjs");
|
|
4
4
|
const require_protocols_oauth_metadata = require("../../protocols/oauth-metadata.cjs");
|
|
5
5
|
const require_forwarded = require("../../forwarded-B37IdmMX.cjs");
|
|
6
6
|
//#region src/stacks/tanstack/handlers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createRecorderForRuntime } from "../../cors-
|
|
2
|
-
import { t as createMcpProtocolHandler } from "../../mcp-
|
|
1
|
+
import { c as createRecorderForRuntime } from "../../cors-C0JXMCfE.js";
|
|
2
|
+
import { t as createMcpProtocolHandler } from "../../mcp-Bs-rssdi.js";
|
|
3
3
|
import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
|
|
4
4
|
import { t as applyForwardedOrigin } from "../../forwarded-BBXvFeh6.js";
|
|
5
5
|
//#region src/stacks/tanstack/handlers.ts
|