MCPcopy Create free account
hub / github.com/cursor/community-plugins / fetchUserPlugins

Function fetchUserPlugins

apps/cursor/src/data/queries.ts:154–173  ·  view source on GitHub ↗
(
  userId: string,
  { includeInactive = false }: { includeInactive?: boolean } = {},
)

Source from the content-addressed store, hash-verified

152}
153
154async function fetchUserPlugins(
155 userId: string,
156 { includeInactive = false }: { includeInactive?: boolean } = {},
157) {
158 const supabase = await createClient();
159 let query = supabase
160 .from("plugins")
161 .select("*, plugin_components(*)")
162 .eq("owner_id", userId);
163
164 if (!includeInactive) {
165 query = query.eq("active", true);
166 }
167
168 const { data, error } = await query
169 .order("install_count", { ascending: false })
170 .order("created_at", { ascending: false });
171
172 return { data: data as PluginRow[] | null, error };
173}
174
175async function getPublicUserPlugins(userId: string) {
176 "use cache";

Callers 2

getPublicUserPluginsFunction · 0.85
getUserPluginsFunction · 0.85

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected