skiller 0.10.0 → 0.10.1
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.
|
@@ -38,24 +38,6 @@ const fs = __importStar(require("fs/promises"));
|
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const project_paths_1 = require("./project-paths");
|
|
40
40
|
const SkillsManifest_1 = require("./SkillsManifest");
|
|
41
|
-
async function readEnabledPluginIds(projectRoot) {
|
|
42
|
-
const settingsPath = path.join(projectRoot, project_paths_1.LEGACY_SKILLER_DIR, 'settings.json');
|
|
43
|
-
try {
|
|
44
|
-
const raw = JSON.parse(await fs.readFile(settingsPath, 'utf8'));
|
|
45
|
-
if (!raw || typeof raw !== 'object')
|
|
46
|
-
return [];
|
|
47
|
-
const enabledPlugins = raw.enabledPlugins;
|
|
48
|
-
if (!enabledPlugins || typeof enabledPlugins !== 'object')
|
|
49
|
-
return [];
|
|
50
|
-
return Object.entries(enabledPlugins)
|
|
51
|
-
.filter(([, enabled]) => enabled === true)
|
|
52
|
-
.map(([pluginId]) => pluginId)
|
|
53
|
-
.sort((a, b) => a.localeCompare(b));
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
return [];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
41
|
function readPluginIdsFromManifestRaw(raw) {
|
|
60
42
|
if (!raw || typeof raw !== 'object')
|
|
61
43
|
return [];
|
|
@@ -101,10 +83,12 @@ async function readPluginManifestLocations(projectRoot) {
|
|
|
101
83
|
}
|
|
102
84
|
return locations;
|
|
103
85
|
}
|
|
86
|
+
// Only plugin entries in skiller's own manifest are legacy sync state.
|
|
87
|
+
// `enabledPlugins` in .claude/settings.json is native Claude Code config that a
|
|
88
|
+
// project may declare itself (with extraKnownMarketplaces), so apply keeps it.
|
|
104
89
|
async function assertNoLegacyClaudePluginState(projectRoot) {
|
|
105
|
-
const enabledPluginIds = await readEnabledPluginIds(projectRoot);
|
|
106
90
|
const manifestLocations = await readPluginManifestLocations(projectRoot);
|
|
107
|
-
if (
|
|
91
|
+
if (manifestLocations.length === 0) {
|
|
108
92
|
return;
|
|
109
93
|
}
|
|
110
94
|
const lines = [
|
|
@@ -112,9 +96,6 @@ async function assertNoLegacyClaudePluginState(projectRoot) {
|
|
|
112
96
|
'',
|
|
113
97
|
'Found legacy Claude plugin state:',
|
|
114
98
|
];
|
|
115
|
-
if (enabledPluginIds.length > 0) {
|
|
116
|
-
lines.push(`- enabled plugins in .claude/settings.json: ${enabledPluginIds.join(', ')}`);
|
|
117
|
-
}
|
|
118
99
|
for (const location of manifestLocations) {
|
|
119
100
|
lines.push(`- plugin manifest entries in ${path.relative(projectRoot, location.manifestPath)}: ${location.pluginIds.join(', ')}`);
|
|
120
101
|
}
|