@larkup/marketplace 0.1.8 → 0.1.9
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/tool-installer.ts +5 -25
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/tool-installer.ts
CHANGED
|
@@ -105,31 +105,11 @@ async function writeManifest(manifest: InstalledToolsManifest) {
|
|
|
105
105
|
|
|
106
106
|
export async function getInstalledTools(): Promise<InstalledTool[]> {
|
|
107
107
|
const manifest = await readManifest();
|
|
108
|
-
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
.split(',')
|
|
114
|
-
.map((id) => id.trim())
|
|
115
|
-
.filter(Boolean);
|
|
116
|
-
|
|
117
|
-
for (const toolId of bundledIds) {
|
|
118
|
-
if (tools.some((tool) => tool.id === toolId)) continue;
|
|
119
|
-
const descriptor = await getToolById(toolId);
|
|
120
|
-
if (!descriptor) continue;
|
|
121
|
-
tools.push({
|
|
122
|
-
id: toolId,
|
|
123
|
-
version: descriptor.version,
|
|
124
|
-
installedAt: 'bundled',
|
|
125
|
-
packageName: descriptor.packageName,
|
|
126
|
-
resolvedPath: descriptor.packageName,
|
|
127
|
-
source: 'local',
|
|
128
|
-
config: buildDefaultConfig(descriptor),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return tools;
|
|
108
|
+
// A package being bundled with the application only makes it *available* to
|
|
109
|
+
// install. It must not silently enable an optional capability or make the
|
|
110
|
+
// Marketplace claim it was installed. The manifest is the single source of
|
|
111
|
+
// truth, which also makes uninstall immediately reflect in the UI.
|
|
112
|
+
return [...manifest.tools];
|
|
133
113
|
}
|
|
134
114
|
|
|
135
115
|
export async function isToolInstalled(toolId: string): Promise<boolean> {
|