agileflow 2.69.0 → 2.70.0
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/package.json
CHANGED
|
@@ -34,7 +34,39 @@ const { execSync } = require('child_process');
|
|
|
34
34
|
// CONFIGURATION
|
|
35
35
|
// ============================================================================
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// Get version dynamically from metadata or package.json
|
|
38
|
+
function getVersion() {
|
|
39
|
+
// Try agileflow-metadata.json first (user's installed version)
|
|
40
|
+
try {
|
|
41
|
+
const metaPath = path.join(process.cwd(), 'docs/00-meta/agileflow-metadata.json');
|
|
42
|
+
if (fs.existsSync(metaPath)) {
|
|
43
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
44
|
+
if (meta.version) return meta.version;
|
|
45
|
+
}
|
|
46
|
+
} catch {}
|
|
47
|
+
|
|
48
|
+
// Try .agileflow/package.json
|
|
49
|
+
try {
|
|
50
|
+
const pkgPath = path.join(process.cwd(), '.agileflow/package.json');
|
|
51
|
+
if (fs.existsSync(pkgPath)) {
|
|
52
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
53
|
+
if (pkg.version) return pkg.version;
|
|
54
|
+
}
|
|
55
|
+
} catch {}
|
|
56
|
+
|
|
57
|
+
// Fallback to script's own package.json (when running from npm package)
|
|
58
|
+
try {
|
|
59
|
+
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
60
|
+
if (fs.existsSync(pkgPath)) {
|
|
61
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
62
|
+
if (pkg.version) return pkg.version;
|
|
63
|
+
}
|
|
64
|
+
} catch {}
|
|
65
|
+
|
|
66
|
+
return 'unknown';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const VERSION = getVersion();
|
|
38
70
|
|
|
39
71
|
const FEATURES = {
|
|
40
72
|
sessionstart: { hook: 'SessionStart', script: 'agileflow-welcome.js', type: 'node' },
|
|
@@ -34,7 +34,39 @@ const { execSync } = require('child_process');
|
|
|
34
34
|
// CONFIGURATION
|
|
35
35
|
// ============================================================================
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// Get version dynamically from metadata or package.json
|
|
38
|
+
function getVersion() {
|
|
39
|
+
// Try agileflow-metadata.json first (user's installed version)
|
|
40
|
+
try {
|
|
41
|
+
const metaPath = path.join(process.cwd(), 'docs/00-meta/agileflow-metadata.json');
|
|
42
|
+
if (fs.existsSync(metaPath)) {
|
|
43
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
44
|
+
if (meta.version) return meta.version;
|
|
45
|
+
}
|
|
46
|
+
} catch {}
|
|
47
|
+
|
|
48
|
+
// Try .agileflow/package.json
|
|
49
|
+
try {
|
|
50
|
+
const pkgPath = path.join(process.cwd(), '.agileflow/package.json');
|
|
51
|
+
if (fs.existsSync(pkgPath)) {
|
|
52
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
53
|
+
if (pkg.version) return pkg.version;
|
|
54
|
+
}
|
|
55
|
+
} catch {}
|
|
56
|
+
|
|
57
|
+
// Fallback to script's own package.json (when running from npm package)
|
|
58
|
+
try {
|
|
59
|
+
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
60
|
+
if (fs.existsSync(pkgPath)) {
|
|
61
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
62
|
+
if (pkg.version) return pkg.version;
|
|
63
|
+
}
|
|
64
|
+
} catch {}
|
|
65
|
+
|
|
66
|
+
return 'unknown';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const VERSION = getVersion();
|
|
38
70
|
|
|
39
71
|
const FEATURES = {
|
|
40
72
|
sessionstart: { hook: 'SessionStart', script: 'agileflow-welcome.js', type: 'node' },
|