bmad-method 6.3.1-next.6 → 6.3.1-next.8
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 +1 -2
- package/tools/installer/commands/status.js +1 -1
- package/tools/installer/commands/uninstall.js +1 -1
- package/tools/installer/core/existing-install.js +1 -1
- package/tools/installer/core/install-paths.js +1 -1
- package/tools/installer/core/installer.js +1 -1
- package/tools/installer/core/manifest-generator.js +8 -6
- package/tools/installer/core/manifest.js +1 -1
- package/tools/installer/file-ops.js +1 -1
- package/tools/installer/fs-native.js +111 -0
- package/tools/installer/ide/_config-driven.js +1 -1
- package/tools/installer/ide/platform-codes.js +1 -1
- package/tools/installer/ide/shared/skill-manifest.js +1 -1
- package/tools/installer/message-loader.js +1 -1
- package/tools/installer/modules/community-manager.js +1 -1
- package/tools/installer/modules/custom-module-manager.js +1 -1
- package/tools/installer/modules/external-manager.js +1 -1
- package/tools/installer/modules/official-modules.js +1 -1
- package/tools/installer/modules/plugin-resolver.js +1 -1
- package/tools/installer/project-root.js +1 -1
- package/tools/installer/ui.js +1 -1
- package/tools/migrate-custom-module-paths.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "bmad-method",
|
|
4
|
-
"version": "6.3.1-next.
|
|
4
|
+
"version": "6.3.1-next.8",
|
|
5
5
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agile",
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"chalk": "^4.1.2",
|
|
71
71
|
"commander": "^14.0.0",
|
|
72
72
|
"csv-parse": "^6.1.0",
|
|
73
|
-
"fs-extra": "^11.3.0",
|
|
74
73
|
"glob": "^11.0.3",
|
|
75
74
|
"ignore": "^7.0.5",
|
|
76
75
|
"js-yaml": "^4.1.0",
|
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
|
19
19
|
const { bmadDir } = await installer.findBmadDir(projectDir);
|
|
20
20
|
|
|
21
21
|
// Check if bmad directory exists
|
|
22
|
-
const fs = require('fs-
|
|
22
|
+
const fs = require('../fs-native');
|
|
23
23
|
if (!(await fs.pathExists(bmadDir))) {
|
|
24
24
|
await prompts.log.warn('No BMAD installation found in the current directory.');
|
|
25
25
|
await prompts.log.message(`Expected location: ${bmadDir}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const path = require('node:path');
|
|
2
|
-
const fs = require('fs-
|
|
2
|
+
const fs = require('../fs-native');
|
|
3
3
|
const { Manifest } = require('./manifest');
|
|
4
4
|
const { OfficialModules } = require('../modules/official-modules');
|
|
5
5
|
const { IdeManager } = require('../ide/manager');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const path = require('node:path');
|
|
2
|
-
const fs = require('fs-
|
|
2
|
+
const fs = require('../fs-native');
|
|
3
3
|
const yaml = require('yaml');
|
|
4
4
|
const crypto = require('node:crypto');
|
|
5
5
|
const csv = require('csv-parse/sync');
|
|
@@ -193,11 +193,13 @@ class ManifestGenerator {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
// Recurse into subdirectories
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
// Recurse into subdirectories — but not inside a discovered skill
|
|
197
|
+
if (!skillMeta) {
|
|
198
|
+
for (const entry of entries) {
|
|
199
|
+
if (!entry.isDirectory()) continue;
|
|
200
|
+
if (entry.name.startsWith('.') || entry.name.startsWith('_')) continue;
|
|
201
|
+
await walk(path.join(dir, entry.name));
|
|
202
|
+
}
|
|
201
203
|
}
|
|
202
204
|
};
|
|
203
205
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Drop-in replacement for fs-extra using native node:fs APIs.
|
|
2
|
+
// Eliminates graceful-fs monkey-patching that causes non-deterministic
|
|
3
|
+
// file loss during multi-module installs on macOS (issue #1779).
|
|
4
|
+
const fsp = require('node:fs/promises');
|
|
5
|
+
const fs = require('node:fs');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
async function pathExists(p) {
|
|
9
|
+
try {
|
|
10
|
+
await fsp.access(p);
|
|
11
|
+
return true;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function ensureDir(dir) {
|
|
18
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function remove(p) {
|
|
22
|
+
await fsp.rm(p, { recursive: true, force: true });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function copy(src, dest, options = {}) {
|
|
26
|
+
const filterFn = options.filter;
|
|
27
|
+
const overwrite = options.overwrite !== false;
|
|
28
|
+
const srcStat = await fsp.stat(src);
|
|
29
|
+
|
|
30
|
+
if (srcStat.isFile()) {
|
|
31
|
+
if (filterFn && !(await filterFn(src, dest))) return;
|
|
32
|
+
await fsp.mkdir(path.dirname(dest), { recursive: true });
|
|
33
|
+
if (!overwrite) {
|
|
34
|
+
try {
|
|
35
|
+
await fsp.access(dest);
|
|
36
|
+
if (options.errorOnExist) throw new Error(`${dest} already exists`);
|
|
37
|
+
return;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
if (error.message.includes('already exists')) throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
await fsp.copyFile(src, dest);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (srcStat.isDirectory()) {
|
|
47
|
+
if (filterFn && !(await filterFn(src, dest))) return;
|
|
48
|
+
await fsp.mkdir(dest, { recursive: true });
|
|
49
|
+
const entries = await fsp.readdir(src, { withFileTypes: true });
|
|
50
|
+
for (const entry of entries) {
|
|
51
|
+
await copy(path.join(src, entry.name), path.join(dest, entry.name), options);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function move(src, dest) {
|
|
57
|
+
try {
|
|
58
|
+
await fsp.rename(src, dest);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (error.code === 'EXDEV') {
|
|
61
|
+
await copy(src, dest);
|
|
62
|
+
await fsp.rm(src, { recursive: true, force: true });
|
|
63
|
+
} else {
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function readJsonSync(p) {
|
|
70
|
+
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function writeJson(p, data, options = {}) {
|
|
74
|
+
const spaces = options.spaces ?? 2;
|
|
75
|
+
await fsp.writeFile(p, JSON.stringify(data, null, spaces) + '\n', 'utf8');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
module.exports = {
|
|
79
|
+
// Native async (node:fs/promises)
|
|
80
|
+
readFile: fsp.readFile,
|
|
81
|
+
writeFile: fsp.writeFile,
|
|
82
|
+
stat: fsp.stat,
|
|
83
|
+
readdir: fsp.readdir,
|
|
84
|
+
access: fsp.access,
|
|
85
|
+
rename: fsp.rename,
|
|
86
|
+
unlink: fsp.unlink,
|
|
87
|
+
chmod: fsp.chmod,
|
|
88
|
+
mkdir: fsp.mkdir,
|
|
89
|
+
mkdtemp: fsp.mkdtemp,
|
|
90
|
+
copyFile: fsp.copyFile,
|
|
91
|
+
rm: fsp.rm,
|
|
92
|
+
|
|
93
|
+
// fs-extra compatible helpers (native implementations)
|
|
94
|
+
pathExists,
|
|
95
|
+
ensureDir,
|
|
96
|
+
remove,
|
|
97
|
+
copy,
|
|
98
|
+
move,
|
|
99
|
+
readJsonSync,
|
|
100
|
+
writeJson,
|
|
101
|
+
|
|
102
|
+
// Sync methods from core node:fs
|
|
103
|
+
existsSync: fs.existsSync.bind(fs),
|
|
104
|
+
readFileSync: fs.readFileSync.bind(fs),
|
|
105
|
+
writeFileSync: fs.writeFileSync.bind(fs),
|
|
106
|
+
createReadStream: fs.createReadStream.bind(fs),
|
|
107
|
+
pathExistsSync: fs.existsSync.bind(fs),
|
|
108
|
+
|
|
109
|
+
// Constants
|
|
110
|
+
constants: fs.constants,
|
|
111
|
+
};
|
package/tools/installer/ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('node:path');
|
|
2
2
|
const os = require('node:os');
|
|
3
|
-
const fs = require('fs-
|
|
3
|
+
const fs = require('./fs-native');
|
|
4
4
|
const { CLIUtils } = require('./cli-utils');
|
|
5
5
|
const { ExternalModuleManager } = require('./modules/external-manager');
|
|
6
6
|
const { getProjectRoot } = require('./project-root');
|