@knowcode/doc-builder 1.0.7 → 1.0.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/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.8] - 2025-01-19
9
+
10
+ ### Added
11
+ - Extremely prominent Root Directory warnings throughout setup
12
+ - Red background critical warnings before setup begins
13
+ - Clear post-setup instructions with visual formatting
14
+ - Step-by-step Root Directory fix instructions after linking
15
+ - Warning in help text about Root Directory configuration
16
+
17
+ ### Improved
18
+ - Made Root Directory warnings impossible to miss
19
+ - Added visual boxes and colors to critical warnings
20
+ - Enhanced setup flow with pre-deployment warnings
21
+ - Better formatting of post-setup instructions
22
+
23
+ ### Changed
24
+ - All setup flows now show Root Directory warning first
25
+ - Both deploy command and default flow show warnings
26
+
8
27
  ## [1.0.7] - 2025-01-19
9
28
 
10
29
  ### Added
package/cli.js CHANGED
@@ -149,6 +149,12 @@ ${chalk.yellow('First-time Vercel Setup:')}
149
149
  ${chalk.green('Q: What is your project name?')}
150
150
  → Answer: ${chalk.yellow('Your project name')} (e.g., "my-docs" or "gasworld")
151
151
 
152
+ ${chalk.bgRed.white.bold(' ⚠️ CRITICAL: ABOUT ROOT DIRECTORY ')}
153
+ ${chalk.red('If asked about Root Directory at ANY point:')}
154
+ ${chalk.red('• LEAVE IT EMPTY (blank)')}
155
+ ${chalk.red('• DO NOT enter "html"')}
156
+ ${chalk.red('• We deploy FROM html folder already!')}
157
+
152
158
  ${chalk.green('Q: Which framework preset?')}
153
159
  → Answer: ${chalk.yellow('Other (Static HTML)')} (always choose this)
154
160
 
@@ -243,6 +249,19 @@ ${chalk.yellow('Troubleshooting:')}
243
249
  spinner.stop();
244
250
  console.log(chalk.yellow('\n🚀 First time deploying to Vercel!\n'));
245
251
 
252
+ // Show critical warning about Root Directory
253
+ console.log(chalk.bgRed.white.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
254
+ console.log(chalk.bgRed.white.bold(' ⚠️ CRITICAL WARNING - READ BEFORE CONTINUING! '));
255
+ console.log(chalk.bgRed.white.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
256
+
257
+ console.log(chalk.yellow.bold('During setup, if Vercel asks about Root Directory:'));
258
+ console.log(chalk.red.bold('• LEAVE IT EMPTY (blank)'));
259
+ console.log(chalk.red.bold('• DO NOT ENTER "html"'));
260
+ console.log(chalk.red.bold('• We are ALREADY deploying from the html folder!\n'));
261
+
262
+ console.log(chalk.white('Setting Root Directory to "html" will cause errors.'));
263
+ console.log(chalk.white('You\'ll need to fix it in project settings later.\n'));
264
+
246
265
  const setupConfirm = await prompts({
247
266
  type: 'confirm',
248
267
  name: 'value',
@@ -419,6 +438,16 @@ program
419
438
  deploySpinner.stop();
420
439
  console.log(chalk.yellow('\n🚀 First time deploying to Vercel!\n'));
421
440
 
441
+ // Show critical warning about Root Directory
442
+ console.log(chalk.bgRed.white.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
443
+ console.log(chalk.bgRed.white.bold(' ⚠️ CRITICAL WARNING - READ BEFORE CONTINUING! '));
444
+ console.log(chalk.bgRed.white.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
445
+
446
+ console.log(chalk.yellow.bold('During setup, if Vercel asks about Root Directory:'));
447
+ console.log(chalk.red.bold('• LEAVE IT EMPTY (blank)'));
448
+ console.log(chalk.red.bold('• DO NOT ENTER "html"'));
449
+ console.log(chalk.red.bold('• We are ALREADY deploying from the html folder!\n'));
450
+
422
451
  const setupConfirm = await prompts({
423
452
  type: 'confirm',
424
453
  name: 'value',
package/lib/deploy.js CHANGED
@@ -93,6 +93,12 @@ async function setupVercelProject(config) {
93
93
  console.log(chalk.white('5️⃣ ') + chalk.green('What\'s the name of your existing project?'));
94
94
  console.log(chalk.white(' 👉 Answer: ') + chalk.yellow.bold(answers.projectName) + ' (your actual project name)\n');
95
95
 
96
+ console.log(chalk.red.bold('⚠️ CRITICAL WARNING ABOUT ROOT DIRECTORY:\n'));
97
+ console.log(chalk.bgRed.white.bold(' If Vercel asks about Root Directory or shows it in settings: '));
98
+ console.log(chalk.bgRed.white.bold(' LEAVE IT COMPLETELY EMPTY! DO NOT ENTER "html"! '));
99
+ console.log(chalk.white('\nWe are already in the html folder - setting Root Directory'));
100
+ console.log(chalk.white('to "html" will cause "html/html does not exist" errors!\n'));
101
+
96
102
  console.log(chalk.blue('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
97
103
 
98
104
  try {
@@ -107,14 +113,27 @@ async function setupVercelProject(config) {
107
113
  }
108
114
 
109
115
  // Important reminders for Vercel settings
110
- console.log(chalk.yellow('\n⚠️ IMPORTANT: Vercel Project Settings\n'));
111
- console.log(chalk.white('After deployment, go to your Vercel dashboard:'));
112
- console.log();
113
- console.log(chalk.red.bold('🔴 CRITICAL: Check Root Directory Setting'));
114
- console.log(chalk.white('1. Go to: ') + chalk.cyan(`https://vercel.com/${answers.projectName}/settings`));
115
- console.log(chalk.white('2. Under "Build & Development Settings"'));
116
- console.log(chalk.white('3. Make sure "Root Directory" is ') + chalk.yellow.bold('EMPTY or "./"'));
117
- console.log(chalk.white(' (NOT "html" or any other directory)'));
116
+ console.log(chalk.red('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
117
+ console.log(chalk.red.bold('🚨 CRITICAL POST-SETUP STEP - DO THIS NOW!'));
118
+ console.log(chalk.red('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
119
+
120
+ console.log(chalk.yellow.bold('Vercel may have set Root Directory incorrectly!\n'));
121
+
122
+ console.log(chalk.white.bold('1. GO TO YOUR PROJECT SETTINGS NOW:'));
123
+ console.log(chalk.cyan(` https://vercel.com/${answers.projectName}/settings\n`));
124
+
125
+ console.log(chalk.white.bold('2. Find "Root Directory" under "Build & Development Settings"\n'));
126
+
127
+ console.log(chalk.white.bold('3. CHECK THE VALUE:'));
128
+ console.log(chalk.green(' ✅ CORRECT: ') + chalk.green.bold('Empty (blank) or "./"'));
129
+ console.log(chalk.red(' ❌ WRONG: ') + chalk.red.bold('"html" or any other value\n'));
130
+
131
+ console.log(chalk.white.bold('4. IF IT SAYS "html":'));
132
+ console.log(chalk.yellow(' • DELETE the value completely'));
133
+ console.log(chalk.yellow(' • Leave it EMPTY'));
134
+ console.log(chalk.yellow(' • Click SAVE\n'));
135
+
136
+ console.log(chalk.bgRed.white.bold(' Failure to do this will cause deployment errors! '));
118
137
  console.log();
119
138
  console.log(chalk.yellow('🔐 For Public Access:'));
120
139
  console.log(chalk.white('1. Navigate to Project Settings > General'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {