Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ export function createPluginCatalogService(deps: {
// Bundled plugins are BB's own; attribute them like the seed entries.
author: { name: "BB Team", url: "https://getbb.app" },
installed: getInstalledPlugin(deps.db, entry.pluginId) !== undefined,
// Bundled plugins are counted under their own entry id: telemetry sends
// a plugin_id for them too, so the curated sidecar names them alongside
// the entries it lists.
// Bundled plugins are counted under their canonical plugin id: telemetry
// sends that id too, so the curated sidecar names them alongside the
// entries it lists.
installs,
compatible: problem === null,
incompatibleReason: problem,
Expand Down Expand Up @@ -1180,7 +1180,7 @@ export function createPluginCatalogService(deps: {
entry,
manifest,
icon?.hash ?? null,
curatedInstalls.get(entry.name) ?? null,
curatedInstalls.get(entry.pluginId) ?? null,
),
};
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,15 @@ describe("plugin catalog service", () => {
}

it("reports counts for curated entries and bundled plugins", async () => {
const bundled = listBundledPluginRegistrations()[0];
if (bundled === undefined) throw new Error("no bundled plugin");
const bundled = listBundledPluginRegistrations().find(
(plugin) => plugin.name === "docs" && plugin.pluginId === "simple-notes",
);
if (bundled === undefined) throw new Error("docs registration missing");
const catalog = service({
fetch: fetchWith(() =>
statsResponse({
widgets: { installs: 4_210 },
[bundled.name]: { installs: 12 },
[bundled.pluginId]: { installs: 12 },
}),
),
});
Expand Down
Loading