bmad-method 6.5.1-next.5 → 6.5.1-next.6

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method",
4
- "version": "6.5.1-next.5",
4
+ "version": "6.5.1-next.6",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -24,8 +24,9 @@ class CustomModuleManager {
24
24
 
25
25
  /**
26
26
  * Parse a user-provided source input into a structured descriptor.
27
- * Accepts local file paths, HTTPS Git URLs, and SSH Git URLs.
28
- * For HTTPS URLs with deep paths (e.g., /tree/main/subdir), extracts the subdir.
27
+ * Accepts local file paths, HTTPS Git URLs, HTTP Git URLs, and SSH Git URLs.
28
+ * For HTTPS/HTTP URLs with deep paths (e.g., /tree/main/subdir), extracts the subdir.
29
+ * The original protocol (http or https) is preserved in the returned cloneUrl.
29
30
  *
30
31
  * @param {string} input - URL or local file path
31
32
  * @returns {Object} Parsed source descriptor:
@@ -127,11 +128,11 @@ class CustomModuleManager {
127
128
  };
128
129
  }
129
130
 
130
- // HTTPS URL: https://host/owner/repo[/tree/branch/subdir][.git]
131
- const httpsMatch = trimmed.match(/^https?:\/\/([^/]+)\/([^/]+)\/([^/.]+?)(?:\.git)?(\/.*)?$/);
131
+ // HTTPS/HTTP URL: https://host/owner/repo[/tree/branch/subdir][.git]
132
+ const httpsMatch = trimmed.match(/^(https?):\/\/([^/]+)\/([^/]+)\/([^/.]+?)(?:\.git)?(\/.*)?$/);
132
133
  if (httpsMatch) {
133
- const [, host, owner, repo, remainder] = httpsMatch;
134
- const cloneUrl = `https://${host}/${owner}/${repo}`;
134
+ const [, protocol, host, owner, repo, remainder] = httpsMatch;
135
+ const cloneUrl = `${protocol}://${host}/${owner}/${repo}`;
135
136
  let subdir = null;
136
137
  let urlRef = null; // branch/tag extracted from /tree/<ref>/subdir
137
138
 
@@ -311,7 +312,7 @@ class CustomModuleManager {
311
312
  /**
312
313
  * Clone a custom module repository to cache.
313
314
  * Supports any Git host (GitHub, GitLab, Bitbucket, self-hosted, etc.).
314
- * @param {string} sourceInput - Git URL (HTTPS or SSH)
315
+ * @param {string} sourceInput - Git URL (HTTPS, HTTP, or SSH)
315
316
  * @param {Object} [options] - Clone options
316
317
  * @param {boolean} [options.silent] - Suppress spinner output
317
318
  * @param {boolean} [options.skipInstall] - Skip npm install (for browsing before user confirms)
@@ -200,12 +200,15 @@ class UI {
200
200
  actionType = options.action;
201
201
  await prompts.log.info(`Using action from command-line: ${actionType}`);
202
202
  } else if (options.yes) {
203
- // Default to quick-update if available, otherwise first available choice
203
+ // Default to quick-update if available, unless flags that require the
204
+ // full update path are present (e.g. --custom-source which re-clones
205
+ // modules at a new version — quick-update skips that entirely).
204
206
  if (choices.length === 0) {
205
207
  throw new Error('No valid actions available for this installation');
206
208
  }
207
209
  const hasQuickUpdate = choices.some((c) => c.value === 'quick-update');
208
- actionType = hasQuickUpdate ? 'quick-update' : choices[0].value;
210
+ const needsFullUpdate = !!options.customSource;
211
+ actionType = hasQuickUpdate && !needsFullUpdate ? 'quick-update' : (choices.find((c) => c.value === 'update') || choices[0]).value;
209
212
  await prompts.log.info(`Non-interactive mode (--yes): defaulting to ${actionType}`);
210
213
  } else {
211
214
  actionType = await prompts.select({
@@ -241,8 +244,11 @@ class UI {
241
244
  .map((m) => m.trim())
242
245
  .filter(Boolean);
243
246
  await prompts.log.info(`Using modules from command-line: ${selectedModules.join(', ')}`);
244
- } else if (options.customSource) {
245
- // Custom source without --modules: start with empty list (core added below)
247
+ } else if (options.customSource && !options.yes) {
248
+ // Custom source without --modules or --yes: start with empty list
249
+ // (only custom source modules + core will be installed).
250
+ // When --yes is also set, fall through to the --yes branch so all
251
+ // installed modules are included alongside the custom source modules.
246
252
  selectedModules = [];
247
253
  } else if (options.yes) {
248
254
  selectedModules = await this.getDefaultModules(installedModuleIds);