bmad-plus 0.24.0 → 0.25.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.
- package/CHANGELOG.md +18 -0
- package/README.md +27 -16
- package/SECURITY.md +3 -3
- package/package.json +90 -2
- package/readme-international/README.de.md +27 -16
- package/readme-international/README.es.md +27 -16
- package/readme-international/README.fr.md +27 -16
- package/src/bmad-plus/data/role-triggers.yaml +26 -0
- package/src/bmad-plus/module.yaml +34 -0
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +7 -0
- package/src/bmad-plus/packs/pack-ghostwriter/SKILL.md +23 -0
- package/src/bmad-plus/packs/pack-ghostwriter/bmad-skill-manifest.yaml +13 -0
- package/src/bmad-plus/packs/pack-ghostwriter/ghostwriter.md +28 -0
- package/src/bmad-plus/packs/pack-ghostwriter/intake.yaml +73 -0
- package/src/bmad-plus/packs/pack-ghostwriter/languages/en.md +11 -0
- package/src/bmad-plus/packs/pack-ghostwriter/languages/fr-FR.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/languages/glossary.md +14 -0
- package/src/bmad-plus/packs/pack-ghostwriter/languages/pt-BR.md +11 -0
- package/src/bmad-plus/packs/pack-ghostwriter/profiles/README.md +22 -0
- package/src/bmad-plus/packs/pack-ghostwriter/profiles/author-note-fr.yaml +20 -0
- package/src/bmad-plus/packs/pack-ghostwriter/profiles/character-dialogue-fr.yaml +20 -0
- package/src/bmad-plus/packs/pack-ghostwriter/profiles/customer-reply-pt-br.yaml +20 -0
- package/src/bmad-plus/packs/pack-ghostwriter/profiles/service-report-en.yaml +20 -0
- package/src/bmad-plus/packs/pack-ghostwriter/references/evaluation.md +5 -0
- package/src/bmad-plus/packs/pack-ghostwriter/references/provenance.md +32 -0
- package/src/bmad-plus/packs/pack-ghostwriter/schemas/config.schema.json +82 -0
- package/src/bmad-plus/packs/pack-ghostwriter/schemas/review-result.schema.json +212 -0
- package/src/bmad-plus/packs/pack-ghostwriter/schemas/run-manifest.schema.json +197 -0
- package/src/bmad-plus/packs/pack-ghostwriter/schemas/voice-profile.schema.json +55 -0
- package/src/bmad-plus/packs/pack-ghostwriter/shared/catalog.json +14 -0
- package/src/bmad-plus/packs/pack-ghostwriter/shared/editorial-contract.md +38 -0
- package/src/bmad-plus/packs/pack-ghostwriter/shared/execution.md +44 -0
- package/src/bmad-plus/packs/pack-ghostwriter/tools/inspect-typography.cjs +273 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/agent-output-review.md +25 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/draft.md +26 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/humanize.md +52 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/improve.md +26 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/localize.md +24 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workflows/voice-profile.md +24 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/README.md +57 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/brief.md +23 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/check.cjs +128 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/jury.json +129 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/opening.md +1 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/select.cjs +54 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/freytag-pyramid/README.md +32 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/freytag-pyramid/specialist.md +12 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/hero-journey/README.md +44 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/hero-journey/specialist.md +17 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/in-medias-res/README.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/in-medias-res/specialist.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/kishotenketsu/README.md +26 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/kishotenketsu/specialist.md +10 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/narrative-arc/README.md +24 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/narrative-arc/specialist.md +9 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/snowflake-method/README.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/snowflake-method/specialist.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-circle/README.md +28 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-circle/specialist.md +10 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-spine/README.md +28 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-spine/specialist.md +9 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/README.md +39 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/briefs/objection.md +27 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/briefs/proposal.md +15 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/example.md +11 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/objections.json +103 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/proposals.json +79 -0
- package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/specialist.md +9 -0
- package/src/bmad-plus/skills/ghostwriter-edit/SKILL.md +16 -0
- package/src/bmad-plus/skills/ghostwriter-humanize/SKILL.md +16 -0
- package/src/bmad-plus/skills/ghostwriter-localize/SKILL.md +16 -0
- package/src/bmad-plus/skills/ghostwriter-verify/SKILL.md +16 -0
- package/src/bmad-plus/skills/ghostwriter-voice/SKILL.md +16 -0
- package/src/bmad-plus/skills/ghostwriter-write/SKILL.md +16 -0
- package/tools/build/adapters.config.js +1 -0
- package/tools/cli/bmad-plus-cli.js +1 -0
- package/tools/cli/commands/ghostwriter.js +76 -0
- package/tools/cli/commands/install.js +4 -0
- package/tools/cli/commands/update-check.js +24 -0
- package/tools/cli/lib/ghostwriter-fidelity.js +352 -0
- package/tools/cli/lib/ghostwriter-manifest.js +238 -0
- package/tools/cli/lib/ghostwriter-nexus.js +542 -0
- package/tools/cli/lib/ghostwriter-project.js +304 -0
- package/tools/cli/lib/ghostwriter-quantities.js +239 -0
- package/tools/cli/lib/ghostwriter-structured.js +154 -0
- package/tools/cli/lib/ghostwriter.js +263 -0
- package/tools/cli/lib/nexus-process.js +44 -1
- package/tools/cli/lib/nexus.js +18 -0
- package/tools/cli/lib/packs.js +141 -6
- package/tools/cli/lib/update-check.js +93 -3
package/tools/cli/lib/packs.js
CHANGED
|
@@ -125,6 +125,39 @@ const PACKS = {
|
|
|
125
125
|
"packSrcDir": "packs",
|
|
126
126
|
"intake": "intake.yaml",
|
|
127
127
|
"desc": "Design engine: build, review and redesign interfaces"
|
|
128
|
+
},
|
|
129
|
+
"ghostwriter": {
|
|
130
|
+
"name": "Ghostwriter",
|
|
131
|
+
"icon": "w",
|
|
132
|
+
"agents": [],
|
|
133
|
+
"skills": [
|
|
134
|
+
"ghostwriter-voice",
|
|
135
|
+
"ghostwriter-write",
|
|
136
|
+
"ghostwriter-edit",
|
|
137
|
+
"ghostwriter-humanize",
|
|
138
|
+
"ghostwriter-localize",
|
|
139
|
+
"ghostwriter-verify"
|
|
140
|
+
],
|
|
141
|
+
"packDir": "pack-ghostwriter",
|
|
142
|
+
"packSrcDir": "packs",
|
|
143
|
+
"pipelines": [
|
|
144
|
+
{
|
|
145
|
+
"id": "ghostwriter-draft-and-review",
|
|
146
|
+
"title": "Draft and review a selected deliverable",
|
|
147
|
+
"steps": [
|
|
148
|
+
{
|
|
149
|
+
"workflow": "draft",
|
|
150
|
+
"gate": "auto"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"workflow": "agent-output-review",
|
|
154
|
+
"gate": "auto"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"intake": "intake.yaml",
|
|
160
|
+
"desc": "Writing, voice, localization and editorial review"
|
|
128
161
|
}
|
|
129
162
|
};
|
|
130
163
|
|
|
@@ -138,7 +171,8 @@ const PACK_ORDER = [
|
|
|
138
171
|
"dev-studio",
|
|
139
172
|
"backup",
|
|
140
173
|
"animated",
|
|
141
|
-
"design"
|
|
174
|
+
"design",
|
|
175
|
+
"ghostwriter"
|
|
142
176
|
];
|
|
143
177
|
|
|
144
178
|
const EXPECTED_AGENTS = {
|
|
@@ -214,6 +248,13 @@ const EXPECTED_AGENTS = {
|
|
|
214
248
|
"packAgents": [
|
|
215
249
|
"design-engine.md"
|
|
216
250
|
]
|
|
251
|
+
},
|
|
252
|
+
"ghostwriter": {
|
|
253
|
+
"agents": [],
|
|
254
|
+
"packDir": "pack-ghostwriter",
|
|
255
|
+
"packAgents": [
|
|
256
|
+
"ghostwriter.md"
|
|
257
|
+
]
|
|
217
258
|
}
|
|
218
259
|
};
|
|
219
260
|
|
|
@@ -221,7 +262,7 @@ const DERIVED = {
|
|
|
221
262
|
"product": {
|
|
222
263
|
"code": "bmad-plus",
|
|
223
264
|
"displayName": "BMAD+",
|
|
224
|
-
"version": "0.
|
|
265
|
+
"version": "0.25.1",
|
|
225
266
|
"derivedFrom": "BMAD-METHOD v6.6.0"
|
|
226
267
|
},
|
|
227
268
|
"packOrder": [
|
|
@@ -234,11 +275,12 @@ const DERIVED = {
|
|
|
234
275
|
"dev-studio",
|
|
235
276
|
"backup",
|
|
236
277
|
"animated",
|
|
237
|
-
"design"
|
|
278
|
+
"design",
|
|
279
|
+
"ghostwriter"
|
|
238
280
|
],
|
|
239
|
-
"packCount":
|
|
240
|
-
"installerAgents":
|
|
241
|
-
"totalAgents":
|
|
281
|
+
"packCount": 11,
|
|
282
|
+
"installerAgents": 16,
|
|
283
|
+
"totalAgents": 49,
|
|
242
284
|
"languages": [
|
|
243
285
|
"en",
|
|
244
286
|
"fr",
|
|
@@ -759,6 +801,99 @@ const DERIVED = {
|
|
|
759
801
|
"summary": "Atelier builds, audits and redesigns interfaces under checkable rules: intake first, semantic tokens, WCAG AA, every state covered, pre-flight before delivery.",
|
|
760
802
|
"desc": "Design engine: build, review and redesign interfaces",
|
|
761
803
|
"description": "Design engine: build, review and redesign interfaces"
|
|
804
|
+
},
|
|
805
|
+
"ghostwriter": {
|
|
806
|
+
"id": "ghostwriter",
|
|
807
|
+
"order": 10,
|
|
808
|
+
"name": "Ghostwriter",
|
|
809
|
+
"displayName": "Ghostwriter",
|
|
810
|
+
"iconEmoji": "✍️",
|
|
811
|
+
"required": false,
|
|
812
|
+
"installerAgentCount": 1,
|
|
813
|
+
"categoryAgentCount": 0,
|
|
814
|
+
"agentCount": 1,
|
|
815
|
+
"subAgentCount": 0,
|
|
816
|
+
"workflowCount": 6,
|
|
817
|
+
"frameworkCount": 0,
|
|
818
|
+
"categoryCount": 0,
|
|
819
|
+
"skillCount": 6,
|
|
820
|
+
"referenceFiles": 2,
|
|
821
|
+
"categoryAgentCounts": [],
|
|
822
|
+
"runtimes": [
|
|
823
|
+
"node"
|
|
824
|
+
],
|
|
825
|
+
"requiredResources": [
|
|
826
|
+
".agents/skills/pack-ghostwriter/ghostwriter.md",
|
|
827
|
+
".agents/skills/ghostwriter-voice/SKILL.md",
|
|
828
|
+
".agents/skills/ghostwriter-write/SKILL.md",
|
|
829
|
+
".agents/skills/ghostwriter-edit/SKILL.md",
|
|
830
|
+
".agents/skills/ghostwriter-humanize/SKILL.md",
|
|
831
|
+
".agents/skills/ghostwriter-localize/SKILL.md",
|
|
832
|
+
".agents/skills/ghostwriter-verify/SKILL.md",
|
|
833
|
+
".agents/skills/pack-ghostwriter/SKILL.md",
|
|
834
|
+
".agents/skills/pack-ghostwriter/bmad-skill-manifest.yaml",
|
|
835
|
+
".agents/skills/pack-ghostwriter/shared/catalog.json",
|
|
836
|
+
".agents/skills/pack-ghostwriter/shared/execution.md",
|
|
837
|
+
".agents/skills/pack-ghostwriter/shared/editorial-contract.md",
|
|
838
|
+
".agents/skills/pack-ghostwriter/schemas/config.schema.json",
|
|
839
|
+
".agents/skills/pack-ghostwriter/schemas/voice-profile.schema.json",
|
|
840
|
+
".agents/skills/pack-ghostwriter/schemas/run-manifest.schema.json",
|
|
841
|
+
".agents/skills/pack-ghostwriter/schemas/review-result.schema.json",
|
|
842
|
+
".agents/skills/pack-ghostwriter/languages/fr-FR.md",
|
|
843
|
+
".agents/skills/pack-ghostwriter/languages/en.md",
|
|
844
|
+
".agents/skills/pack-ghostwriter/languages/pt-BR.md",
|
|
845
|
+
".agents/skills/pack-ghostwriter/languages/glossary.md",
|
|
846
|
+
".agents/skills/pack-ghostwriter/references/provenance.md",
|
|
847
|
+
".agents/skills/pack-ghostwriter/profiles/author-note-fr.yaml",
|
|
848
|
+
".agents/skills/pack-ghostwriter/profiles/service-report-en.yaml",
|
|
849
|
+
".agents/skills/pack-ghostwriter/profiles/customer-reply-pt-br.yaml",
|
|
850
|
+
".agents/skills/pack-ghostwriter/profiles/character-dialogue-fr.yaml",
|
|
851
|
+
".agents/skills/pack-ghostwriter/workflows/voice-profile.md",
|
|
852
|
+
".agents/skills/pack-ghostwriter/workflows/draft.md",
|
|
853
|
+
".agents/skills/pack-ghostwriter/workflows/humanize.md",
|
|
854
|
+
".agents/skills/pack-ghostwriter/workflows/improve.md",
|
|
855
|
+
".agents/skills/pack-ghostwriter/workflows/localize.md",
|
|
856
|
+
".agents/skills/pack-ghostwriter/workflows/agent-output-review.md",
|
|
857
|
+
".agents/skills/pack-ghostwriter/workshops/council/README.md",
|
|
858
|
+
".agents/skills/pack-ghostwriter/intake.yaml"
|
|
859
|
+
],
|
|
860
|
+
"personas": [
|
|
861
|
+
{
|
|
862
|
+
"id": "ghostwriter",
|
|
863
|
+
"name": "Ghostwriter",
|
|
864
|
+
"role": "Editorial Writer and Reviewer",
|
|
865
|
+
"description": "Drafts, edits and localizes reader-facing text, with source fidelity and voice checks",
|
|
866
|
+
"usesSkills": [
|
|
867
|
+
"ghostwriter-voice",
|
|
868
|
+
"ghostwriter-write",
|
|
869
|
+
"ghostwriter-edit",
|
|
870
|
+
"ghostwriter-humanize",
|
|
871
|
+
"ghostwriter-localize",
|
|
872
|
+
"ghostwriter-verify"
|
|
873
|
+
]
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
"pipelines": [
|
|
877
|
+
{
|
|
878
|
+
"id": "ghostwriter-draft-and-review",
|
|
879
|
+
"title": "Draft and review a selected deliverable",
|
|
880
|
+
"steps": [
|
|
881
|
+
{
|
|
882
|
+
"workflow": "draft",
|
|
883
|
+
"gate": "auto"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"workflow": "agent-output-review",
|
|
887
|
+
"gate": "auto"
|
|
888
|
+
}
|
|
889
|
+
]
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"intake": "intake.yaml",
|
|
893
|
+
"cohabitationWarning": "When the project requests editorial review, route the selected draft through .agents/skills/pack-ghostwriter/SKILL.md with its brief and protected facts. Huldah and Forge verify technical claims. A host instruction alone cannot enforce review. An orchestrated delivery requires a Nexus execution and its evidence.",
|
|
894
|
+
"summary": "Writes and revises prose for a reader, preserves source details and checks the edited artifact before delivery.",
|
|
895
|
+
"desc": "Writing, voice, localization and editorial review",
|
|
896
|
+
"description": "Writing, voice, localization and editorial review"
|
|
762
897
|
}
|
|
763
898
|
},
|
|
764
899
|
"pythonPacks": {
|
|
@@ -14,6 +14,72 @@ const {
|
|
|
14
14
|
const CACHE_FILE = '.bmad/update-check.json';
|
|
15
15
|
const CACHE_TTL_MS = 24 * 60 * 60 * 1000;
|
|
16
16
|
const FAILURE_BACKOFF_MS = 60 * 60 * 1000;
|
|
17
|
+
const NOTE_LOCALES = ['en', 'fr', 'es', 'de'];
|
|
18
|
+
const NOTE_KINDS = ['added', 'changed', 'fixed', 'security'];
|
|
19
|
+
const MAX_NOTES = 12;
|
|
20
|
+
const SITE = 'https://bmad-plus.rochetta.fr';
|
|
21
|
+
const CHANGELOG_URL = `${SITE}/docs/#changelog`;
|
|
22
|
+
// Control and bidirectional-override characters: the text reaches a terminal and a prompt.
|
|
23
|
+
// eslint-disable-next-line no-control-regex
|
|
24
|
+
const UNSAFE_TEXT = /[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;
|
|
25
|
+
|
|
26
|
+
function plainText(value, max) {
|
|
27
|
+
return typeof value === 'string' &&
|
|
28
|
+
value.trim() &&
|
|
29
|
+
value.length <= max &&
|
|
30
|
+
!UNSAFE_TEXT.test(value)
|
|
31
|
+
? value
|
|
32
|
+
: null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function noteUrl(version, locale) {
|
|
36
|
+
const prefix = locale === 'en' ? '' : `${locale}/`;
|
|
37
|
+
return `${SITE}/${prefix}docs/#release-${version.replaceAll('.', '-')}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The release digest of the published package (package.json bmadPlus.releaseNotes).
|
|
41
|
+
* It is optional: a malformed entry is dropped, never trusted, and never fails the check. */
|
|
42
|
+
function validateNotes(value) {
|
|
43
|
+
const list = value?.releaseNotes;
|
|
44
|
+
if (!Array.isArray(list)) return [];
|
|
45
|
+
const notes = [];
|
|
46
|
+
for (const entry of list.slice(0, MAX_NOTES)) {
|
|
47
|
+
if (!entry || typeof entry !== 'object' || !isExactVersion(entry.version)) continue;
|
|
48
|
+
const title = {};
|
|
49
|
+
const summary = {};
|
|
50
|
+
const counts = {};
|
|
51
|
+
let complete = true;
|
|
52
|
+
for (const locale of NOTE_LOCALES) {
|
|
53
|
+
title[locale] = plainText(entry.title?.[locale], 200);
|
|
54
|
+
summary[locale] = plainText(entry.summary?.[locale], 1200);
|
|
55
|
+
if (!title[locale] || !summary[locale]) complete = false;
|
|
56
|
+
}
|
|
57
|
+
for (const kind of NOTE_KINDS) {
|
|
58
|
+
const count = entry.counts?.[kind];
|
|
59
|
+
if (!Number.isInteger(count) || count < 0 || count > 50) complete = false;
|
|
60
|
+
counts[kind] = count;
|
|
61
|
+
}
|
|
62
|
+
if (complete && !notes.some((note) => note.version === entry.version)) {
|
|
63
|
+
notes.push({ version: entry.version, title, summary, counts });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return notes;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Notes for every version after the installed one, up to the target, newest first. */
|
|
70
|
+
function skippedNotes(notes, installedVersion, targetVersion) {
|
|
71
|
+
return notes
|
|
72
|
+
.filter(
|
|
73
|
+
(note) => semver.gt(note.version, installedVersion) && semver.lte(note.version, targetVersion)
|
|
74
|
+
)
|
|
75
|
+
.sort((a, b) => semver.rcompare(a.version, b.version))
|
|
76
|
+
.map((note) => ({
|
|
77
|
+
...note,
|
|
78
|
+
url: Object.fromEntries(
|
|
79
|
+
NOTE_LOCALES.map((locale) => [locale, noteUrl(note.version, locale)])
|
|
80
|
+
),
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
17
83
|
|
|
18
84
|
function validateRelease(value) {
|
|
19
85
|
if (
|
|
@@ -36,7 +102,12 @@ function validateRelease(value) {
|
|
|
36
102
|
) {
|
|
37
103
|
throw new Error('Registry returned an invalid Node engine requirement.');
|
|
38
104
|
}
|
|
39
|
-
|
|
105
|
+
const notes = validateNotes(value.bmadPlus);
|
|
106
|
+
return {
|
|
107
|
+
version: value.version,
|
|
108
|
+
engines: engines.node ? { node: engines.node } : {},
|
|
109
|
+
...(notes.length ? { bmadPlus: { releaseNotes: notes } } : {}),
|
|
110
|
+
};
|
|
40
111
|
}
|
|
41
112
|
|
|
42
113
|
async function queryNpmRelease({ projectDir, channel, registry }) {
|
|
@@ -48,13 +119,14 @@ async function queryNpmRelease({ projectDir, channel, registry }) {
|
|
|
48
119
|
`bmad-plus@${channel}`,
|
|
49
120
|
'version',
|
|
50
121
|
'engines',
|
|
122
|
+
'bmadPlus',
|
|
51
123
|
'--json',
|
|
52
124
|
`--registry=${registry}`,
|
|
53
125
|
'--prefer-online',
|
|
54
126
|
'--fetch-timeout=4000',
|
|
55
127
|
'--fetch-retries=0',
|
|
56
128
|
],
|
|
57
|
-
{ cwd: projectDir, timeout: 6000, maxBuffer:
|
|
129
|
+
{ cwd: projectDir, timeout: 6000, maxBuffer: 512 * 1024 }
|
|
58
130
|
);
|
|
59
131
|
return validateRelease(JSON.parse(stdout));
|
|
60
132
|
}
|
|
@@ -123,6 +195,8 @@ async function checkForUpdate({
|
|
|
123
195
|
engineCompatible: null,
|
|
124
196
|
engines: {},
|
|
125
197
|
reason: null,
|
|
198
|
+
releaseNotes: null,
|
|
199
|
+
releaseNotesUrl: null,
|
|
126
200
|
};
|
|
127
201
|
if (
|
|
128
202
|
!isExactVersion(runningVersion) ||
|
|
@@ -213,6 +287,14 @@ async function checkForUpdate({
|
|
|
213
287
|
!release.engines.node || semver.satisfies(nodeVersion, release.engines.node);
|
|
214
288
|
const comparison = semver.compare(release.version, result.installedVersion);
|
|
215
289
|
result.updateAvailable = comparison > 0;
|
|
290
|
+
if (comparison > 0) {
|
|
291
|
+
result.releaseNotes = skippedNotes(
|
|
292
|
+
release.bmadPlus?.releaseNotes || [],
|
|
293
|
+
result.installedVersion,
|
|
294
|
+
release.version
|
|
295
|
+
);
|
|
296
|
+
result.releaseNotesUrl = CHANGELOG_URL;
|
|
297
|
+
}
|
|
216
298
|
result.status = comparison > 0 ? 'update-available' : comparison === 0 ? 'current' : 'ahead';
|
|
217
299
|
result.reason =
|
|
218
300
|
comparison > 0
|
|
@@ -248,4 +330,12 @@ async function checkForUpdate({
|
|
|
248
330
|
return result;
|
|
249
331
|
}
|
|
250
332
|
|
|
251
|
-
module.exports = {
|
|
333
|
+
module.exports = {
|
|
334
|
+
CACHE_FILE,
|
|
335
|
+
CACHE_TTL_MS,
|
|
336
|
+
CHANGELOG_URL,
|
|
337
|
+
FAILURE_BACKOFF_MS,
|
|
338
|
+
checkForUpdate,
|
|
339
|
+
queryNpmRelease,
|
|
340
|
+
validateNotes,
|
|
341
|
+
};
|