@zeyue0329/xiaoma-cli 1.0.36 → 1.0.38
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/.idea/workspace.xml +27 -26
- package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
- package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
- package/README.md +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +35 -5
- package/dist/agents/architect.txt +217 -31
- package/dist/agents/automation-orchestrator.txt +4 -4
- package/dist/agents/dev.txt +3 -3
- package/dist/agents/full-requirement-orchestrator.txt +11 -11
- package/dist/agents/qa.txt +102 -102
- package/dist/agents/sm.txt +6 -6
- package/dist/agents/ux-expert.txt +6 -1
- package/dist/agents/workflow-executor.txt +879 -0
- package/dist/agents/xiaoma-master.txt +258 -37
- package/dist/teams/team-all.txt +1223 -445
- package/dist/teams/team-fullstack-with-database.txt +384 -446
- package/dist/teams/team-fullstack.txt +258 -37
- package/dist/teams/team-ide-minimal.txt +111 -111
- package/dist/teams/team-no-ui.txt +252 -36
- package/docs/architecture-sharding-modification.md +623 -0
- package/docs/automated-requirements-analysis-outputs.md +896 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +292 -142
- package/tools/bump-all-versions.js +50 -32
- package/tools/cli.js +52 -47
- package/tools/flattener/aggregate.js +30 -12
- package/tools/flattener/binary.js +46 -43
- package/tools/flattener/discovery.js +23 -15
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +122 -121
- package/tools/flattener/main.js +249 -144
- package/tools/flattener/projectRoot.js +74 -69
- package/tools/flattener/prompts.js +12 -10
- package/tools/flattener/stats.helpers.js +90 -61
- package/tools/flattener/stats.js +1 -1
- package/tools/flattener/test-matrix.js +225 -170
- package/tools/flattener/xml.js +31 -23
- package/tools/installer/bin/xiaoma.js +199 -153
- package/tools/installer/lib/config-loader.js +76 -47
- package/tools/installer/lib/file-manager.js +101 -44
- package/tools/installer/lib/ide-base-setup.js +49 -39
- package/tools/installer/lib/ide-setup.js +694 -380
- package/tools/installer/lib/installer.js +802 -469
- package/tools/installer/lib/memory-profiler.js +22 -12
- package/tools/installer/lib/module-manager.js +16 -14
- package/tools/installer/lib/resource-locator.js +61 -35
- package/tools/lib/dependency-resolver.js +34 -23
- package/tools/lib/yaml-utils.js +7 -2
- package/tools/preview-release-notes.js +33 -25
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +16 -7
- package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
- package/tools/version-bump.js +24 -18
- package/tools/xiaoma-npx-wrapper.js +15 -10
- package/tools/yaml-format.js +60 -36
- package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
- package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
- package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
- package/xiaoma-core/agents/automation-orchestrator.md +4 -4
- package/xiaoma-core/agents/dev.md +4 -4
- package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
- package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
- package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
- package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
- package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
- package/xiaoma-core/agents/workflow-executor.md +126 -18
- package/xiaoma-core/agents/xiaoma-master.md +1 -1
- package/xiaoma-core/data/test-levels-framework.md +12 -12
- package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
- package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
- package/xiaoma-core/tasks/batch-story-generation.md +22 -22
- package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
- package/xiaoma-core/tasks/nfr-assess.md +6 -6
- package/xiaoma-core/tasks/project-integration-testing.md +42 -42
- package/xiaoma-core/tasks/qa-gate.md +23 -23
- package/xiaoma-core/tasks/review-story.md +18 -18
- package/xiaoma-core/tasks/risk-profile.md +25 -25
- package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
- package/xiaoma-core/tasks/test-design.md +9 -9
- package/xiaoma-core/tasks/trace-requirements.md +21 -21
- package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
- package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
- package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
- package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
- package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
- package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
- package/xiaoma-core/workflows/automated-requirements-analysis.yaml +4 -4
- package/dist/agents/database-architect.txt +0 -322
package/tools/flattener/xml.js
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
const fs = require(
|
|
1
|
+
const fs = require("fs-extra");
|
|
2
2
|
|
|
3
3
|
function escapeXml(string_) {
|
|
4
|
-
if (typeof string_ !==
|
|
4
|
+
if (typeof string_ !== "string") {
|
|
5
5
|
return String(string_);
|
|
6
6
|
}
|
|
7
|
-
return string_
|
|
7
|
+
return string_
|
|
8
|
+
.replaceAll("&", "&")
|
|
9
|
+
.replaceAll("<", "<")
|
|
10
|
+
.replaceAll("'", "'");
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
function indentFileContent(content) {
|
|
11
|
-
if (typeof content !==
|
|
14
|
+
if (typeof content !== "string") {
|
|
12
15
|
return String(content);
|
|
13
16
|
}
|
|
14
|
-
return content.split(
|
|
17
|
+
return content.split("\n").map((line) => ` ${line}`);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
function generateXMLOutput(aggregatedContent, outputPath) {
|
|
18
21
|
const { textFiles } = aggregatedContent;
|
|
19
|
-
const writeStream = fs.createWriteStream(outputPath, { encoding:
|
|
22
|
+
const writeStream = fs.createWriteStream(outputPath, { encoding: "utf8" });
|
|
20
23
|
|
|
21
24
|
return new Promise((resolve, reject) => {
|
|
22
|
-
writeStream.on(
|
|
23
|
-
writeStream.on(
|
|
25
|
+
writeStream.on("error", reject);
|
|
26
|
+
writeStream.on("finish", resolve);
|
|
24
27
|
|
|
25
28
|
writeStream.write('<?xml version="1.0" encoding="UTF-8"?>\n');
|
|
26
|
-
writeStream.write(
|
|
29
|
+
writeStream.write("<files>\n");
|
|
27
30
|
|
|
28
31
|
// Sort files by path for deterministic order
|
|
29
|
-
const filesSorted = [...textFiles].sort((a, b) =>
|
|
32
|
+
const filesSorted = [...textFiles].sort((a, b) =>
|
|
33
|
+
a.path.localeCompare(b.path),
|
|
34
|
+
);
|
|
30
35
|
let index = 0;
|
|
31
36
|
|
|
32
37
|
const writeNext = () => {
|
|
33
38
|
if (index >= filesSorted.length) {
|
|
34
|
-
writeStream.write(
|
|
39
|
+
writeStream.write("</files>\n");
|
|
35
40
|
writeStream.end();
|
|
36
41
|
return;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
const file = filesSorted[index++];
|
|
40
45
|
const p = escapeXml(file.path);
|
|
41
|
-
const content = typeof file.content ===
|
|
46
|
+
const content = typeof file.content === "string" ? file.content : "";
|
|
42
47
|
|
|
43
48
|
if (content.length === 0) {
|
|
44
49
|
writeStream.write(`\t<file path='${p}'/>\n`);
|
|
@@ -46,34 +51,37 @@ function generateXMLOutput(aggregatedContent, outputPath) {
|
|
|
46
51
|
return;
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
const needsCdata =
|
|
54
|
+
const needsCdata =
|
|
55
|
+
content.includes("<") ||
|
|
56
|
+
content.includes("&") ||
|
|
57
|
+
content.includes("]]>");
|
|
50
58
|
if (needsCdata) {
|
|
51
59
|
// Open tag and CDATA on their own line with tab indent; content lines indented with two tabs
|
|
52
60
|
writeStream.write(`\t<file path='${p}'><![CDATA[\n`);
|
|
53
61
|
// Safely split any occurrences of "]]>" inside content, trim trailing newlines, indent each line with two tabs
|
|
54
|
-
const safe = content.replaceAll(
|
|
55
|
-
const trimmed = safe.replace(/[\r\n]+$/,
|
|
62
|
+
const safe = content.replaceAll("]]>", "]]]]><![CDATA[>");
|
|
63
|
+
const trimmed = safe.replace(/[\r\n]+$/, "");
|
|
56
64
|
const indented =
|
|
57
65
|
trimmed.length > 0
|
|
58
66
|
? trimmed
|
|
59
|
-
.split(
|
|
67
|
+
.split("\n")
|
|
60
68
|
.map((line) => `\t\t${line}`)
|
|
61
|
-
.join(
|
|
62
|
-
:
|
|
69
|
+
.join("\n")
|
|
70
|
+
: "";
|
|
63
71
|
writeStream.write(indented);
|
|
64
72
|
// Close CDATA and attach closing tag directly after the last content line
|
|
65
|
-
writeStream.write(
|
|
73
|
+
writeStream.write("]]></file>\n");
|
|
66
74
|
} else {
|
|
67
75
|
// Write opening tag then newline; indent content with two tabs; attach closing tag directly after last content char
|
|
68
76
|
writeStream.write(`\t<file path='${p}'>\n`);
|
|
69
|
-
const trimmed = content.replace(/[\r\n]+$/,
|
|
77
|
+
const trimmed = content.replace(/[\r\n]+$/, "");
|
|
70
78
|
const indented =
|
|
71
79
|
trimmed.length > 0
|
|
72
80
|
? trimmed
|
|
73
|
-
.split(
|
|
81
|
+
.split("\n")
|
|
74
82
|
.map((line) => `\t\t${line}`)
|
|
75
|
-
.join(
|
|
76
|
-
:
|
|
83
|
+
.join("\n")
|
|
84
|
+
: "";
|
|
77
85
|
writeStream.write(indented);
|
|
78
86
|
writeStream.write(`</file>\n`);
|
|
79
87
|
}
|