uiplug-mcp 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28,12 +28,8 @@ async function validateApiKey(apiKey) {
28
28
  if (error || !data) {
29
29
  return { userId: null, error: "Invalid or revoked API key." };
30
30
  }
31
- // Fire-and-forget: update usage stats
32
- supabase
33
- .from("api_keys")
34
- .update({ last_used_at: new Date().toISOString(), usage_total: data.usage_total + 1 })
35
- .eq("id", data.id)
36
- .then(() => { });
31
+ // Fire-and-forget: update usage stats via SECURITY DEFINER RPC (bypasses RLS)
32
+ supabase.rpc("increment_api_key_usage", { p_key_id: data.id }).then(() => { });
37
33
  return { userId: data.user_id, error: null };
38
34
  }
39
35
  // ── MCP Server ────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uiplug-mcp",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for UIPlug — gives AI agents access to the UIPlug UI component marketplace",
5
5
  "type": "module",
6
6
  "bin": {