claude-autopm 3.25.2 → 3.25.4
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/lib/plugins/PluginManager.js +21 -7
- package/package.json +1 -1
|
@@ -695,7 +695,7 @@ class PluginManager extends EventEmitter {
|
|
|
695
695
|
*/
|
|
696
696
|
async installScripts(plugin, pluginPath) {
|
|
697
697
|
const { metadata } = plugin;
|
|
698
|
-
const targetBaseDir = path.join(this.options.projectRoot, 'scripts');
|
|
698
|
+
const targetBaseDir = path.join(this.options.projectRoot, '.claude', 'scripts');
|
|
699
699
|
|
|
700
700
|
// Create scripts directory if it doesn't exist
|
|
701
701
|
if (!fs.existsSync(targetBaseDir)) {
|
|
@@ -1381,13 +1381,27 @@ class PluginManager extends EventEmitter {
|
|
|
1381
1381
|
* Get core version from package.json
|
|
1382
1382
|
*/
|
|
1383
1383
|
getCoreVersion() {
|
|
1384
|
+
// Read autopm framework version, not the user's project version
|
|
1384
1385
|
try {
|
|
1385
|
-
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1386
|
+
// First try: autopm's own package.json (two levels up from lib/plugins/)
|
|
1387
|
+
const autopmPkgPath = path.join(__dirname, '..', '..', 'package.json');
|
|
1388
|
+
if (fs.existsSync(autopmPkgPath)) {
|
|
1389
|
+
const pkg = JSON.parse(fs.readFileSync(autopmPkgPath, 'utf-8'));
|
|
1390
|
+
if (pkg.name === 'claude-autopm') {
|
|
1391
|
+
return pkg.version;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
} catch { /* fall through */ }
|
|
1395
|
+
|
|
1396
|
+
try {
|
|
1397
|
+
// Fallback: check global npm install
|
|
1398
|
+
const { execSync } = require('child_process');
|
|
1399
|
+
const version = execSync('npm list -g claude-autopm --depth=0 2>/dev/null | grep claude-autopm', { encoding: 'utf8' });
|
|
1400
|
+
const match = version.match(/@(\d+\.\d+\.\d+)/);
|
|
1401
|
+
if (match) return match[1];
|
|
1402
|
+
} catch { /* fall through */ }
|
|
1403
|
+
|
|
1404
|
+
return this.options.minCoreVersion;
|
|
1391
1405
|
}
|
|
1392
1406
|
|
|
1393
1407
|
/**
|
package/package.json
CHANGED