wizz-method 1.0.1 → 1.0.2

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.
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "permissions": {
3
3
  "allow": [
4
- "Bash(node -e \"try{const f=require\\('figlet'\\);f.text\\('WIZZ METHOD',{font:'ANSI Shadow'},\\(e,d\\)=>{if\\(e\\){console.log\\('ERR',e.message\\)}else{console.log\\(d\\)}}\\);}catch\\(e\\){console.log\\('NO_MODULE'\\)}\")"
4
+ "Bash(node -e \"try{const f=require\\('figlet'\\);f.text\\('WIZZ METHOD',{font:'ANSI Shadow'},\\(e,d\\)=>{if\\(e\\){console.log\\('ERR',e.message\\)}else{console.log\\(d\\)}}\\);}catch\\(e\\){console.log\\('NO_MODULE'\\)}\")",
5
+ "Bash(rtk --version)"
5
6
  ]
6
7
  }
7
8
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wizz-method",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "description": "Wizz Method — método de agência orientado por IA em PT-BR (fork independente do BMad Method)",
6
6
  "keywords": [
7
7
  "agile",
@@ -7,6 +7,18 @@ const { CLIUtils } = require('../cli-utils');
7
7
  const { ExternalModuleManager } = require('./external-manager');
8
8
 
9
9
  class OfficialModules {
10
+ /**
11
+ * A config field is "missing a default" only when it has no default value at
12
+ * all (undefined/null). An explicit empty string (`default: ""`) is a real
13
+ * default meaning "defaults to blank" — it must NOT force a required prompt.
14
+ * Centralized so the express/customize/skip-prompts paths stay consistent.
15
+ * @param {*} defaultValue - The field's `default` value from module.yaml.
16
+ * @returns {boolean} True when the field has no usable default.
17
+ */
18
+ static isMissingDefault(defaultValue) {
19
+ return defaultValue === undefined || defaultValue === null;
20
+ }
21
+
10
22
  constructor(options = {}) {
11
23
  this.externalModuleManager = new ExternalModuleManager();
12
24
  // Config collection state (merged from ConfigCollector)
@@ -1003,7 +1015,7 @@ class OfficialModules {
1003
1015
 
1004
1016
  const hasFieldsWithoutDefaults = questionKeys.some((key) => {
1005
1017
  const item = moduleConfig[key];
1006
- return item.default === undefined || item.default === null || item.default === '';
1018
+ return OfficialModules.isMissingDefault(item.default);
1007
1019
  });
1008
1020
 
1009
1021
  results.push({
@@ -1526,7 +1538,7 @@ class OfficialModules {
1526
1538
  await prompts.log.info(`Using default configuration for ${moduleDisplayName}`);
1527
1539
  // Use defaults for all questions
1528
1540
  for (const question of questions) {
1529
- const hasDefault = question.default !== undefined && question.default !== null && question.default !== '';
1541
+ const hasDefault = !OfficialModules.isMissingDefault(question.default);
1530
1542
  if (hasDefault && typeof question.default !== 'function') {
1531
1543
  allAnswers[question.name] = question.default;
1532
1544
  }
@@ -1554,7 +1566,7 @@ class OfficialModules {
1554
1566
 
1555
1567
  if (useDefaults && moduleName !== 'core') {
1556
1568
  // Accept defaults - only ask questions that have NO default value
1557
- const questionsWithoutDefaults = questions.filter((q) => q.default === undefined || q.default === null || q.default === '');
1569
+ const questionsWithoutDefaults = questions.filter((q) => OfficialModules.isMissingDefault(q.default));
1558
1570
 
1559
1571
  if (questionsWithoutDefaults.length > 0) {
1560
1572
  await prompts.log.message(` Asking required questions for ${moduleName.toUpperCase()}...`);
@@ -1563,7 +1575,7 @@ class OfficialModules {
1563
1575
  }
1564
1576
 
1565
1577
  // For questions with defaults that weren't asked, we need to process them with their default values
1566
- const questionsWithDefaults = questions.filter((q) => q.default !== undefined && q.default !== null && q.default !== '');
1578
+ const questionsWithDefaults = questions.filter((q) => !OfficialModules.isMissingDefault(q.default));
1567
1579
  for (const question of questionsWithDefaults) {
1568
1580
  // Skip function defaults - these are dynamic and will be evaluated later
1569
1581
  if (typeof question.default === 'function') {