plugins 1.2.10-canary.2 → 1.2.10-canary.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 +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -802,6 +802,22 @@ async function installToPluginCache(plugins, scope, repoPath, source) {
|
|
|
802
802
|
}
|
|
803
803
|
await writeFile(installedPath, JSON.stringify(installedData, null, 2));
|
|
804
804
|
barDebug(c.dim("Updated installed_plugins.json"));
|
|
805
|
+
const settingsPath = join3(home, ".claude", "settings.json");
|
|
806
|
+
let settings = {};
|
|
807
|
+
if (existsSync2(settingsPath)) {
|
|
808
|
+
try {
|
|
809
|
+
settings = JSON.parse(await readFile2(settingsPath, "utf-8"));
|
|
810
|
+
} catch {
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
const enabled = settings.enabledPlugins ?? {};
|
|
814
|
+
for (const plugin of plugins) {
|
|
815
|
+
const pluginKey = `${plugin.name}@${marketplaceName}`;
|
|
816
|
+
enabled[pluginKey] = true;
|
|
817
|
+
}
|
|
818
|
+
settings.enabledPlugins = enabled;
|
|
819
|
+
await writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
820
|
+
barDebug(c.dim("Updated settings.json enabledPlugins"));
|
|
805
821
|
cachePopulated = true;
|
|
806
822
|
}
|
|
807
823
|
async function installToCursorExtensions(plugins, scope, repoPath, source) {
|