uiplug-mcp 1.3.2 → 1.3.3
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.js +1 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -469,16 +469,6 @@ ${c.code_component}
|
|
|
469
469
|
const { name: compName, description, framework, category, code, installation, tags, model, group_slug, visibility = "public", } = (args ?? {});
|
|
470
470
|
const { createHash: createHash2 } = await import("crypto");
|
|
471
471
|
const keyHashForCreate = createHash2("sha256").update(process.env.UIPLUG_API_KEY ?? "").digest("hex");
|
|
472
|
-
// Resolve tag names → UUIDs via SECURITY DEFINER RPC (auto-creates missing tags)
|
|
473
|
-
let tagIds = [];
|
|
474
|
-
if (tags && tags.length > 0) {
|
|
475
|
-
const { data: resolvedIds, error: tagError } = await supabase
|
|
476
|
-
.rpc("upsert_tags", { p_names: tags });
|
|
477
|
-
if (tagError) {
|
|
478
|
-
return { content: [{ type: "text", text: `Error resolving tags: ${tagError.message}` }], isError: true };
|
|
479
|
-
}
|
|
480
|
-
tagIds = resolvedIds ?? [];
|
|
481
|
-
}
|
|
482
472
|
const { data: componentId, error } = await supabase.rpc("create_component", {
|
|
483
473
|
p_key_hash: keyHashForCreate,
|
|
484
474
|
p_name: compName,
|
|
@@ -487,7 +477,7 @@ ${c.code_component}
|
|
|
487
477
|
p_category: category,
|
|
488
478
|
p_code: code,
|
|
489
479
|
p_installation: installation ?? null,
|
|
490
|
-
p_tags:
|
|
480
|
+
p_tags: tags ?? [],
|
|
491
481
|
p_model: model ?? null,
|
|
492
482
|
p_group_slug: group_slug ?? null,
|
|
493
483
|
p_visibility: group_slug ? (visibility ?? "public") : "public",
|