@lovable.dev/mcp-js 0.29.0-rc.2 → 0.29.0-rc.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/README.internal.md +3 -3
- package/README.md +2 -25
- package/dist/{cors-DNzLB6qa.cjs → authorize-CKMlIxm9.cjs} +29 -78
- package/dist/{authorize-Bpz8oxjF.d.ts → authorize-CqYsQYfa.d.ts} +1 -1
- package/dist/{authorize-Cqr7Jps0.d.cts → authorize-DIYS7zBP.d.cts} +1 -1
- package/dist/{cors-C_VffY86.js → authorize-b3VqTC_7.js} +24 -73
- package/dist/cli/extract-manifest.cjs +12 -7
- package/dist/cli/extract-manifest.js +12 -7
- package/dist/{errors-Cr95rSkB.cjs → errors-CN6Da8iz.cjs} +8 -23
- package/dist/{errors-Bwd1L0Rf.js → errors-DSe96Ffd.js} +8 -23
- package/dist/{forwarded-BC_RHnn5.cjs → forwarded-Bhwcj22u.cjs} +3 -3
- package/dist/{forwarded-B3EBjHnA.js → forwarded-BlLF3dfc.js} +3 -3
- package/dist/index.cjs +1 -38
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -38
- package/dist/{io-DrHivYt0.d.ts → io-DP3icuxa.d.ts} +1 -1
- package/dist/{io-Bh_WpbxU.d.cts → io-Dx0nPc1-.d.cts} +1 -1
- package/dist/mcp-BLs6_g8i.js +174 -0
- package/dist/mcp-DtHM-41c.cjs +179 -0
- package/dist/{package-CYA-5C24.js → package-DMs4EVwG.js} +1 -1
- package/dist/{package-DNSwCau1.cjs → package-Xk8p8Q_E.cjs} +1 -1
- package/dist/protocols/mcp/index.cjs +1 -1
- package/dist/protocols/mcp/index.d.cts +3 -6
- package/dist/protocols/mcp/index.d.ts +3 -6
- package/dist/protocols/mcp/index.js +1 -1
- package/dist/protocols/oauth-metadata.cjs +9 -11
- package/dist/protocols/oauth-metadata.d.cts +2 -2
- package/dist/protocols/oauth-metadata.d.ts +2 -2
- package/dist/protocols/oauth-metadata.js +3 -5
- package/dist/stacks/supabase/index.cjs +5 -5
- package/dist/stacks/supabase/index.d.cts +1 -1
- package/dist/stacks/supabase/index.d.ts +1 -1
- package/dist/stacks/supabase/index.js +3 -3
- package/dist/stacks/supabase/vite.cjs +1 -1
- package/dist/stacks/supabase/vite.d.cts +1 -1
- package/dist/stacks/supabase/vite.d.ts +1 -1
- package/dist/stacks/supabase/vite.js +1 -1
- package/dist/stacks/tanstack/index.cjs +4 -4
- package/dist/stacks/tanstack/index.d.cts +2 -2
- package/dist/stacks/tanstack/index.d.ts +2 -2
- package/dist/stacks/tanstack/index.js +3 -3
- package/dist/stacks/tanstack/vite.cjs +4 -8
- package/dist/stacks/tanstack/vite.d.cts +1 -4
- package/dist/stacks/tanstack/vite.d.ts +1 -4
- package/dist/stacks/tanstack/vite.js +4 -8
- package/dist/{types-DnGEKnvI.d.cts → types-C0Wgm9zp.d.cts} +26 -57
- package/dist/{types-DnGEKnvI.d.ts → types-C0Wgm9zp.d.ts} +26 -57
- package/package.json +1 -5
- package/dist/mcp-Bl7pQYdv.js +0 -346
- package/dist/mcp-CRdT2Fai.cjs +0 -351
- package/dist/schema-CW1jKvio.js +0 -65
- package/dist/schema-D3vClxb7.cjs +0 -76
package/dist/schema-CW1jKvio.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { objectFromShape } from "@modelcontextprotocol/sdk/server/zod-compat.js";
|
|
2
|
-
import { toJsonSchemaCompat } from "@modelcontextprotocol/sdk/server/zod-json-schema-compat.js";
|
|
3
|
-
//#region src/core/schema.ts
|
|
4
|
-
function isZodSchema(definition) {
|
|
5
|
-
return (typeof definition === "object" || typeof definition === "function") && definition !== null && typeof definition.safeParse === "function";
|
|
6
|
-
}
|
|
7
|
-
function schemaFromDefinition(definition) {
|
|
8
|
-
return isZodSchema(definition) ? definition : objectFromShape(definition);
|
|
9
|
-
}
|
|
10
|
-
const NON_JSON_ZOD3_OUTPUTS = /* @__PURE__ */ new Set([
|
|
11
|
-
"ZodBigInt",
|
|
12
|
-
"ZodDate",
|
|
13
|
-
"ZodFunction",
|
|
14
|
-
"ZodMap",
|
|
15
|
-
"ZodNaN",
|
|
16
|
-
"ZodPromise",
|
|
17
|
-
"ZodSet",
|
|
18
|
-
"ZodSymbol",
|
|
19
|
-
"ZodUndefined",
|
|
20
|
-
"ZodVoid"
|
|
21
|
-
]);
|
|
22
|
-
function unsupportedZod3Output(schema, seen = /* @__PURE__ */ new Set()) {
|
|
23
|
-
if (seen.has(schema)) return void 0;
|
|
24
|
-
seen.add(schema);
|
|
25
|
-
const definition = schema._def;
|
|
26
|
-
if (!definition) return void 0;
|
|
27
|
-
if (definition.effect?.type === "transform") return "Transforms cannot be represented in JSON Schema";
|
|
28
|
-
const typeName = definition.typeName;
|
|
29
|
-
if (typeof typeName === "string" && NON_JSON_ZOD3_OUTPUTS.has(typeName)) return `${typeName} does not produce a JSON value`;
|
|
30
|
-
const shape = definition.shape;
|
|
31
|
-
if (typeof shape === "function") {
|
|
32
|
-
const fields = shape();
|
|
33
|
-
for (const field of Object.values(fields)) {
|
|
34
|
-
const issue = unsupportedZod3Output(field, seen);
|
|
35
|
-
if (issue) return issue;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const getter = definition.getter;
|
|
39
|
-
if (typeof getter === "function") {
|
|
40
|
-
const issue = unsupportedZod3Output(getter(), seen);
|
|
41
|
-
if (issue) return issue;
|
|
42
|
-
}
|
|
43
|
-
for (const value of Object.values(definition)) if (Array.isArray(value)) for (const entry of value) {
|
|
44
|
-
if (!isZodSchema(entry)) continue;
|
|
45
|
-
const issue = unsupportedZod3Output(entry, seen);
|
|
46
|
-
if (issue) return issue;
|
|
47
|
-
}
|
|
48
|
-
else if (value && typeof value === "object" && isZodSchema(value)) {
|
|
49
|
-
const issue = unsupportedZod3Output(value, seen);
|
|
50
|
-
if (issue) return issue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function jsonSchemaFromDefinition(definition, pipeStrategy) {
|
|
54
|
-
const schema = schemaFromDefinition(definition);
|
|
55
|
-
if (pipeStrategy === "output") {
|
|
56
|
-
const issue = unsupportedZod3Output(schema);
|
|
57
|
-
if (issue) throw new Error(issue);
|
|
58
|
-
}
|
|
59
|
-
return toJsonSchemaCompat(schema, {
|
|
60
|
-
target: "draft-2020-12",
|
|
61
|
-
pipeStrategy
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { schemaFromDefinition as n, jsonSchemaFromDefinition as t };
|
package/dist/schema-D3vClxb7.cjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
let _modelcontextprotocol_sdk_server_zod_compat_js = require("@modelcontextprotocol/sdk/server/zod-compat.js");
|
|
2
|
-
let _modelcontextprotocol_sdk_server_zod_json_schema_compat_js = require("@modelcontextprotocol/sdk/server/zod-json-schema-compat.js");
|
|
3
|
-
//#region src/core/schema.ts
|
|
4
|
-
function isZodSchema(definition) {
|
|
5
|
-
return (typeof definition === "object" || typeof definition === "function") && definition !== null && typeof definition.safeParse === "function";
|
|
6
|
-
}
|
|
7
|
-
function schemaFromDefinition(definition) {
|
|
8
|
-
return isZodSchema(definition) ? definition : (0, _modelcontextprotocol_sdk_server_zod_compat_js.objectFromShape)(definition);
|
|
9
|
-
}
|
|
10
|
-
const NON_JSON_ZOD3_OUTPUTS = /* @__PURE__ */ new Set([
|
|
11
|
-
"ZodBigInt",
|
|
12
|
-
"ZodDate",
|
|
13
|
-
"ZodFunction",
|
|
14
|
-
"ZodMap",
|
|
15
|
-
"ZodNaN",
|
|
16
|
-
"ZodPromise",
|
|
17
|
-
"ZodSet",
|
|
18
|
-
"ZodSymbol",
|
|
19
|
-
"ZodUndefined",
|
|
20
|
-
"ZodVoid"
|
|
21
|
-
]);
|
|
22
|
-
function unsupportedZod3Output(schema, seen = /* @__PURE__ */ new Set()) {
|
|
23
|
-
if (seen.has(schema)) return void 0;
|
|
24
|
-
seen.add(schema);
|
|
25
|
-
const definition = schema._def;
|
|
26
|
-
if (!definition) return void 0;
|
|
27
|
-
if (definition.effect?.type === "transform") return "Transforms cannot be represented in JSON Schema";
|
|
28
|
-
const typeName = definition.typeName;
|
|
29
|
-
if (typeof typeName === "string" && NON_JSON_ZOD3_OUTPUTS.has(typeName)) return `${typeName} does not produce a JSON value`;
|
|
30
|
-
const shape = definition.shape;
|
|
31
|
-
if (typeof shape === "function") {
|
|
32
|
-
const fields = shape();
|
|
33
|
-
for (const field of Object.values(fields)) {
|
|
34
|
-
const issue = unsupportedZod3Output(field, seen);
|
|
35
|
-
if (issue) return issue;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const getter = definition.getter;
|
|
39
|
-
if (typeof getter === "function") {
|
|
40
|
-
const issue = unsupportedZod3Output(getter(), seen);
|
|
41
|
-
if (issue) return issue;
|
|
42
|
-
}
|
|
43
|
-
for (const value of Object.values(definition)) if (Array.isArray(value)) for (const entry of value) {
|
|
44
|
-
if (!isZodSchema(entry)) continue;
|
|
45
|
-
const issue = unsupportedZod3Output(entry, seen);
|
|
46
|
-
if (issue) return issue;
|
|
47
|
-
}
|
|
48
|
-
else if (value && typeof value === "object" && isZodSchema(value)) {
|
|
49
|
-
const issue = unsupportedZod3Output(value, seen);
|
|
50
|
-
if (issue) return issue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function jsonSchemaFromDefinition(definition, pipeStrategy) {
|
|
54
|
-
const schema = schemaFromDefinition(definition);
|
|
55
|
-
if (pipeStrategy === "output") {
|
|
56
|
-
const issue = unsupportedZod3Output(schema);
|
|
57
|
-
if (issue) throw new Error(issue);
|
|
58
|
-
}
|
|
59
|
-
return (0, _modelcontextprotocol_sdk_server_zod_json_schema_compat_js.toJsonSchemaCompat)(schema, {
|
|
60
|
-
target: "draft-2020-12",
|
|
61
|
-
pipeStrategy
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
Object.defineProperty(exports, "jsonSchemaFromDefinition", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function() {
|
|
68
|
-
return jsonSchemaFromDefinition;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
Object.defineProperty(exports, "schemaFromDefinition", {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
get: function() {
|
|
74
|
-
return schemaFromDefinition;
|
|
75
|
-
}
|
|
76
|
-
});
|