@knowcode/doc-builder 1.2.7 → 1.2.9

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,36 @@ 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.2.9] - 2025-07-19
9
+
10
+ ### Added
11
+ - Comprehensive console logging for debugging index.html creation
12
+ - Detailed file existence checks with paths and sizes
13
+ - File copy verification with size comparison
14
+ - List of HTML files found during build and deployment
15
+ - Error handling with detailed error messages
16
+ - Final verification step to confirm index.html exists
17
+
18
+ ### Improved
19
+ - Much more verbose output to help diagnose deployment issues
20
+ - Clear indication of what files are being processed
21
+ - Better error reporting when file operations fail
22
+
23
+ ## [1.2.8] - 2025-07-19
24
+
25
+ ### Changed
26
+ - Removed all JUNO references from documentation and code
27
+ - Renamed `cybersolstice` preset to `notion-inspired`
28
+ - Updated folder descriptions to be more generic
29
+ - Changed default username from 'juno' to 'admin' in preset
30
+ - Removed `juno-docs` binary alias from package.json
31
+ - Updated keywords to remove 'juno' and add 'notion-style'
32
+ - Cleaned up all internal references to use @knowcode/doc-builder
33
+
34
+ ### Fixed
35
+ - Documentation now correctly references @knowcode/doc-builder instead of @juno/doc-builder
36
+ - Updated GitHub URLs to use knowcode organization
37
+
8
38
  ## [1.2.7] - 2025-07-19
9
39
 
10
40
  ### Added
package/README.md CHANGED
@@ -32,12 +32,12 @@ No installation needed! Just run:
32
32
 
33
33
  ```bash
34
34
  # Build and deploy to Vercel (default action)
35
- npx @juno/doc-builder
35
+ npx @knowcode/doc-builder
36
36
 
37
37
  # Or use specific commands:
38
- npx @juno/doc-builder build # Build HTML files only
39
- npx @juno/doc-builder dev # Start development server
40
- npx @juno/doc-builder deploy # Deploy to Vercel
38
+ npx @knowcode/doc-builder build # Build HTML files only
39
+ npx @knowcode/doc-builder dev # Start development server
40
+ npx @knowcode/doc-builder deploy # Deploy to Vercel
41
41
  ```
42
42
 
43
43
  The default action (no command specified) will build your documentation and deploy it to Vercel.
@@ -47,7 +47,7 @@ The default action (no command specified) will build your documentation and depl
47
47
  For faster execution and offline use:
48
48
 
49
49
  ```bash
50
- npm install --save-dev @juno/doc-builder
50
+ npm install --save-dev @knowcode/doc-builder
51
51
  ```
52
52
 
53
53
  Then use shorter commands:
@@ -108,10 +108,10 @@ module.exports = {
108
108
 
109
109
  ## Presets
110
110
 
111
- Use the `cybersolstice` preset for compatibility with existing JUNO projects:
111
+ Use the `notion-inspired` preset for a clean, modern documentation style:
112
112
 
113
113
  ```bash
114
- npx @juno/doc-builder build --preset cybersolstice
114
+ npx @knowcode/doc-builder build --preset notion-inspired
115
115
  ```
116
116
 
117
117
  ## Commands
@@ -133,7 +133,7 @@ Options:
133
133
  Examples:
134
134
  doc-builder build # Build with defaults
135
135
  doc-builder build --input docs --output dist
136
- doc-builder build --preset cybersolstice # Use JUNO platform preset
136
+ doc-builder build --preset notion-inspired # Use Notion-inspired preset
137
137
  doc-builder build --config my-config.js # Use custom config
138
138
  ```
139
139
 
@@ -218,7 +218,7 @@ While developing the doc-builder:
218
218
  npm link
219
219
 
220
220
  # In your other project
221
- npm link @juno/doc-builder
221
+ npm link @knowcode/doc-builder
222
222
  ```
223
223
 
224
224
  ### Option 2: File Reference
@@ -228,7 +228,7 @@ In your project's `package.json`:
228
228
  ```json
229
229
  {
230
230
  "devDependencies": {
231
- "@juno/doc-builder": "file:../path/to/doc-builder"
231
+ "@knowcode/doc-builder": "file:../path/to/doc-builder"
232
232
  }
233
233
  }
234
234
  ```
@@ -240,7 +240,7 @@ Once published:
240
240
  ```json
241
241
  {
242
242
  "devDependencies": {
243
- "@juno/doc-builder": "git+https://github.com/juno/doc-builder.git"
243
+ "@knowcode/doc-builder": "git+https://github.com/knowcode/doc-builder.git"
244
244
  }
245
245
  }
246
246
  ```
@@ -1,4 +1,4 @@
1
- /* JUNO Documentation - Modern CSS Design System */
1
+ /* Documentation Builder - Modern CSS Design System */
2
2
 
3
3
  :root {
4
4
  /* Color Palette */
package/assets/js/main.js CHANGED
@@ -1,4 +1,4 @@
1
- // JUNO Documentation - Main JavaScript
1
+ // Documentation Builder - Main JavaScript
2
2
 
3
3
  // Preview Banner Management
4
4
  // Set up banner state immediately to prevent flash
@@ -1261,7 +1261,6 @@ function generateBreadcrumbs() {
1261
1261
  .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
1262
1262
  .join(' ')
1263
1263
  .replace(/\b(Api|Html|Css|Js|Pdf|Qa|Ai)\b/g, (match) => match.toUpperCase())
1264
- .replace(/\bJuno\b/g, 'JUNO')
1265
1264
  .replace(/\bReadme\b/g, 'Overview');
1266
1265
 
1267
1266
  // Get appropriate icon based on segment
package/cli.js CHANGED
@@ -66,7 +66,7 @@ program
66
66
  .option('-c, --config <path>', 'path to config file (default: doc-builder.config.js)')
67
67
  .option('-i, --input <dir>', 'input directory containing markdown files (default: docs)')
68
68
  .option('-o, --output <dir>', 'output directory for HTML files (default: html)')
69
- .option('--preset <preset>', 'use a preset configuration (available: cybersolstice)')
69
+ .option('--preset <preset>', 'use a preset configuration (available: notion-inspired)')
70
70
  .option('--legacy', 'use legacy mode for backward compatibility')
71
71
  .option('--no-auth', 'disable authentication even if configured')
72
72
  .option('--no-changelog', 'disable automatic changelog generation')
@@ -74,7 +74,7 @@ program
74
74
  ${chalk.yellow('Examples:')}
75
75
  ${chalk.gray('$')} doc-builder build ${chalk.gray('# Build with defaults')}
76
76
  ${chalk.gray('$')} doc-builder build --input docs --output dist
77
- ${chalk.gray('$')} doc-builder build --preset cybersolstice ${chalk.gray('# Use JUNO platform preset')}
77
+ ${chalk.gray('$')} doc-builder build --preset notion-inspired ${chalk.gray('# Use Notion-inspired preset')}
78
78
  ${chalk.gray('$')} doc-builder build --config my-config.js ${chalk.gray('# Use custom config')}
79
79
  `)
80
80
  .action(async (options) => {
package/lib/config.js CHANGED
@@ -49,12 +49,12 @@ const defaultConfig = {
49
49
  };
50
50
 
51
51
  /**
52
- * Cybersolstice preset - maintains compatibility with existing project
52
+ * Notion-inspired preset - clean, modern documentation style
53
53
  */
54
- const cybersolsticePreset = {
54
+ const notionInspiredPreset = {
55
55
  docsDir: 'docs',
56
56
  outputDir: 'html',
57
- siteName: 'JUNO Platform', // Keep original for cybersolstice project
57
+ siteName: 'Documentation', // Clean default name
58
58
  siteDescription: 'Transforming complex sales through intelligent automation',
59
59
 
60
60
  features: {
@@ -67,7 +67,7 @@ const cybersolsticePreset = {
67
67
  },
68
68
 
69
69
  auth: {
70
- username: 'juno',
70
+ username: 'admin',
71
71
  password: 'docs2025'
72
72
  },
73
73
 
@@ -78,7 +78,7 @@ const cybersolsticePreset = {
78
78
 
79
79
  // Folder descriptions from existing code
80
80
  folderDescriptions: {
81
- 'product-roadmap': 'Strategic vision, timeline, and feature planning for the JUNO platform',
81
+ 'product-roadmap': 'Strategic vision, timeline, and feature planning',
82
82
  'product-requirements': 'Detailed product specifications, requirements documents, and feature definitions',
83
83
  'architecture': 'System design, data flows, and technical infrastructure documentation',
84
84
  'system-analysis': 'Comprehensive system analysis, functional requirements, and cross-component documentation',
@@ -143,8 +143,8 @@ async function loadConfig(configPath, options = {}) {
143
143
  let config = { ...defaultConfig };
144
144
 
145
145
  // Apply preset if specified
146
- if (options.preset === 'cybersolstice') {
147
- config = { ...config, ...cybersolsticePreset };
146
+ if (options.preset === 'notion-inspired') {
147
+ config = { ...config, ...notionInspiredPreset };
148
148
  }
149
149
 
150
150
  // Load custom config file if it exists
@@ -251,7 +251,7 @@ async function createDefaultConfig() {
251
251
 
252
252
  module.exports = {
253
253
  defaultConfig,
254
- cybersolsticePreset,
254
+ notionInspiredPreset,
255
255
  loadConfig,
256
256
  createDefaultConfig
257
257
  };
@@ -179,8 +179,8 @@ const folderDescriptions = {
179
179
  'bubble': 'Core application platform - business logic, UI/UX, and user workflows',
180
180
  'quickbase': 'Database schema, data management, and backend operations',
181
181
  'activecampaign': 'Marketing automation integration and lead management system',
182
- 'juno-signer': 'Document signing service for digital signatures and PDF generation',
183
- 'juno-api-deprecated': 'Legacy API documentation (deprecated, for reference only)',
182
+ 'doc-signer': 'Document signing service for digital signatures and PDF generation',
183
+ 'api-deprecated': 'Legacy API documentation (deprecated, for reference only)',
184
184
  'postman': 'API testing tools, collections, and test automation',
185
185
  'mcp': 'Model Context Protocol integration and configuration',
186
186
  'team': 'Team structure, roles, and responsibilities',
@@ -188,7 +188,7 @@ const folderDescriptions = {
188
188
  'middleware': 'Integration layers and data transformation services',
189
189
  'paths': 'User journey flows and process workflows',
190
190
  'testing': 'Test strategies, scenarios, and quality assurance processes',
191
- 'juno-api': 'API documentation and integration guides'
191
+ 'api': 'API documentation and integration guides'
192
192
  };
193
193
 
194
194
  // Build navigation structure with rich functionality
@@ -250,8 +250,8 @@ function buildNavigationStructure(files, currentFile) {
250
250
  'bubble': 'fas fa-circle',
251
251
  'quickbase': 'fas fa-database',
252
252
  'activecampaign': 'fas fa-envelope',
253
- 'juno-signer': 'fas fa-signature',
254
- 'juno-api-deprecated': 'fas fa-archive',
253
+ 'doc-signer': 'fas fa-signature',
254
+ 'api-deprecated': 'fas fa-archive',
255
255
  'postman': 'fas fa-flask',
256
256
  'mcp': 'fas fa-puzzle-piece',
257
257
  'team': 'fas fa-users',
@@ -259,7 +259,7 @@ function buildNavigationStructure(files, currentFile) {
259
259
  'middleware': 'fas fa-layer-group',
260
260
  'paths': 'fas fa-route',
261
261
  'testing': 'fas fa-vial',
262
- 'juno-api': 'fas fa-plug',
262
+ 'api': 'fas fa-plug',
263
263
  'documentation-tool': 'fas fa-tools'
264
264
  };
265
265
 
@@ -358,8 +358,8 @@ function buildNavigationStructure(files, currentFile) {
358
358
  'bubble',
359
359
  'quickbase',
360
360
  'activecampaign',
361
- 'juno-signer',
362
- 'juno-api-deprecated',
361
+ 'doc-signer',
362
+ 'api-deprecated',
363
363
  'postman',
364
364
  'mcp',
365
365
  'team',
@@ -460,6 +460,14 @@ async function buildDocumentation(config) {
460
460
  const files = await getAllMarkdownFiles(docsDir);
461
461
  console.log(chalk.green(`✅ Found ${files.length} markdown files${readmeGenerated ? ' (including auto-generated README)' : ''}`));
462
462
 
463
+ // Log the files found
464
+ if (files.length > 0) {
465
+ console.log(chalk.gray(' Found files:'));
466
+ files.forEach(file => {
467
+ console.log(chalk.gray(` - ${file.relativePath} → ${file.urlPath}`));
468
+ });
469
+ }
470
+
463
471
  console.log(chalk.blue('📝 Processing files...'));
464
472
  for (const file of files) {
465
473
  const outputPath = path.join(outputDir, file.urlPath);
@@ -499,23 +507,71 @@ async function buildDocumentation(config) {
499
507
  const indexSourcePath = path.join(outputDir, 'index.html'); // from index.md
500
508
  const readmePath = path.join(outputDir, 'README.html');
501
509
 
502
- console.log(chalk.blue('📄 Checking for index.html creation...'));
503
- console.log(chalk.gray(` - index.html exists: ${fs.existsSync(indexPath)})`));
504
- console.log(chalk.gray(` - README.html exists: ${fs.existsSync(readmePath)})`));
510
+ console.log(chalk.blue('\n📄 Checking for index.html creation...'));
511
+ console.log(chalk.gray(` - Output directory: ${outputDir}`));
512
+ console.log(chalk.gray(` - Index path: ${indexPath}`));
513
+ console.log(chalk.gray(` - README path: ${readmePath}`));
514
+ console.log(chalk.gray(` - index.html exists: ${fs.existsSync(indexPath)}`));
515
+ console.log(chalk.gray(` - README.html exists: ${fs.existsSync(readmePath)}`));
516
+
517
+ // List all HTML files in output directory
518
+ if (fs.existsSync(outputDir)) {
519
+ const htmlFiles = fs.readdirSync(outputDir).filter(f => f.endsWith('.html'));
520
+ console.log(chalk.gray(` - HTML files in output: [${htmlFiles.join(', ')}]`));
521
+ } else {
522
+ console.log(chalk.red(` - ERROR: Output directory does not exist!`));
523
+ }
505
524
 
506
525
  if (!fs.existsSync(indexPath)) {
526
+ console.log(chalk.yellow('⚠️ index.html does not exist, need to create it'));
527
+
507
528
  if (fs.existsSync(readmePath)) {
508
- await fs.copy(readmePath, indexPath);
509
- console.log(chalk.green('✅ Created index.html from README.html'));
529
+ console.log(chalk.blue(' → Found README.html, copying to index.html'));
530
+ try {
531
+ await fs.copy(readmePath, indexPath);
532
+ console.log(chalk.green('✅ Successfully created index.html from README.html'));
533
+
534
+ // Verify the copy worked
535
+ if (fs.existsSync(indexPath)) {
536
+ const stats = fs.statSync(indexPath);
537
+ console.log(chalk.gray(` - index.html size: ${stats.size} bytes`));
538
+ } else {
539
+ console.log(chalk.red(' - ERROR: index.html was not created!'));
540
+ }
541
+ } catch (error) {
542
+ console.log(chalk.red(` - ERROR copying README.html: ${error.message}`));
543
+ }
510
544
  } else {
511
545
  // No README.html, create informative default page
512
546
  console.log(chalk.yellow('⚠️ No README.html found, creating default index.html'));
513
- const defaultIndex = await createDefaultIndexPage(outputDir, config, packageJson.version);
514
- await fs.writeFile(indexPath, defaultIndex);
515
- console.log(chalk.green('✅ Created default index.html with instructions'));
547
+ try {
548
+ const defaultIndex = await createDefaultIndexPage(outputDir, config, packageJson.version);
549
+ await fs.writeFile(indexPath, defaultIndex);
550
+ console.log(chalk.green('✅ Created default index.html with instructions'));
551
+
552
+ // Verify the write worked
553
+ if (fs.existsSync(indexPath)) {
554
+ const stats = fs.statSync(indexPath);
555
+ console.log(chalk.gray(` - index.html size: ${stats.size} bytes`));
556
+ } else {
557
+ console.log(chalk.red(' - ERROR: default index.html was not created!'));
558
+ }
559
+ } catch (error) {
560
+ console.log(chalk.red(` - ERROR creating default index.html: ${error.message}`));
561
+ }
516
562
  }
517
563
  } else {
518
564
  console.log(chalk.gray('ℹ️ index.html already exists (likely from index.md)'));
565
+ const stats = fs.statSync(indexPath);
566
+ console.log(chalk.gray(` - Existing index.html size: ${stats.size} bytes`));
567
+ }
568
+
569
+ // Final verification
570
+ console.log(chalk.blue('\n📋 Final index.html check:'));
571
+ if (fs.existsSync(indexPath)) {
572
+ console.log(chalk.green(` ✅ index.html exists at: ${indexPath}`));
573
+ } else {
574
+ console.log(chalk.red(` ❌ index.html is MISSING at: ${indexPath}`));
519
575
  }
520
576
 
521
577
  console.log(chalk.green('✅ Documentation build complete!'));
package/lib/deploy.js CHANGED
@@ -346,17 +346,54 @@ async function prepareDeployment(config) {
346
346
  console.log(chalk.blue(`\n📦 Preparing deployment with @knowcode/doc-builder v${packageJson.version}`));
347
347
 
348
348
  // Create index.html from README.html if needed
349
+ console.log(chalk.blue('\n📁 Deployment preparation - index.html check:'));
349
350
  const indexPath = path.join(outputDir, 'index.html');
350
- console.log(chalk.gray(` - Checking index.html: ${fs.existsSync(indexPath) ? 'exists' : 'missing'}}`));
351
+ const readmePath = path.join(outputDir, 'README.html');
352
+
353
+ console.log(chalk.gray(` - Output directory: ${outputDir}`));
354
+ console.log(chalk.gray(` - Output dir exists: ${fs.existsSync(outputDir)}`));
355
+
356
+ if (fs.existsSync(outputDir)) {
357
+ const files = fs.readdirSync(outputDir);
358
+ const htmlFiles = files.filter(f => f.endsWith('.html'));
359
+ console.log(chalk.gray(` - Total files: ${files.length}`));
360
+ console.log(chalk.gray(` - HTML files: [${htmlFiles.slice(0, 5).join(', ')}${htmlFiles.length > 5 ? '...' : ''}]`));
361
+ }
362
+
363
+ console.log(chalk.gray(` - Checking index.html: ${fs.existsSync(indexPath) ? 'exists' : 'missing'}`));
364
+ console.log(chalk.gray(` - Index path: ${indexPath}`));
351
365
 
352
366
  if (!fs.existsSync(indexPath)) {
353
- const readmePath = path.join(outputDir, 'README.html');
354
- console.log(chalk.gray(` - Checking README.html: ${fs.existsSync(readmePath) ? 'exists' : 'missing'}}`));
367
+ console.log(chalk.yellow(' ⚠️ index.html is missing, attempting to create...'));
368
+ console.log(chalk.gray(` - Checking README.html: ${fs.existsSync(readmePath) ? 'exists' : 'missing'}`));
369
+ console.log(chalk.gray(` - README path: ${readmePath}`));
355
370
 
356
371
  if (fs.existsSync(readmePath)) {
357
372
  // Copy README.html to index.html for proper root page
358
- fs.copyFileSync(readmePath, indexPath);
359
- console.log(chalk.green('✅ Created index.html from README.html'));
373
+ console.log(chalk.blue(' → Copying README.html to index.html...'));
374
+ try {
375
+ fs.copyFileSync(readmePath, indexPath);
376
+ console.log(chalk.green(' ✅ Successfully copied README.html to index.html'));
377
+
378
+ // Verify the copy
379
+ if (fs.existsSync(indexPath)) {
380
+ const readmeStats = fs.statSync(readmePath);
381
+ const indexStats = fs.statSync(indexPath);
382
+ console.log(chalk.gray(` - README.html size: ${readmeStats.size} bytes`));
383
+ console.log(chalk.gray(` - index.html size: ${indexStats.size} bytes`));
384
+
385
+ if (readmeStats.size === indexStats.size) {
386
+ console.log(chalk.green(' ✅ File sizes match - copy successful'));
387
+ } else {
388
+ console.log(chalk.yellow(' ⚠️ File sizes do not match!'));
389
+ }
390
+ } else {
391
+ console.log(chalk.red(' ❌ ERROR: index.html was not created after copy!'));
392
+ }
393
+ } catch (error) {
394
+ console.log(chalk.red(` ❌ ERROR copying file: ${error.message}`));
395
+ console.log(chalk.red(` - Error stack: ${error.stack}`));
396
+ }
360
397
  } else {
361
398
  // If no README.html, find first available HTML file or create informative page
362
399
  console.log(chalk.yellow('⚠️ No README.html found, looking for other HTML files...'));
@@ -408,11 +445,24 @@ async function prepareDeployment(config) {
408
445
 
409
446
  // Final check - log what files exist
410
447
  console.log(chalk.blue('\n📁 Final deployment state:'));
448
+
449
+ // Double-check index.html one more time
450
+ const finalIndexExists = fs.existsSync(indexPath);
451
+ console.log(chalk[finalIndexExists ? 'green' : 'red'](` - index.html: ${finalIndexExists ? 'EXISTS' : 'MISSING'}`));
452
+
453
+ if (finalIndexExists) {
454
+ const stats = fs.statSync(indexPath);
455
+ console.log(chalk.gray(` - index.html size: ${stats.size} bytes`));
456
+ console.log(chalk.gray(` - index.html modified: ${stats.mtime.toISOString()}`));
457
+ }
458
+
411
459
  const finalFiles = fs.readdirSync(outputDir)
412
460
  .filter(file => file.endsWith('.html'))
413
461
  .slice(0, 5); // Show first 5 HTML files
462
+ console.log(chalk.gray(`\n HTML files in ${outputDir}:`));
414
463
  finalFiles.forEach(file => {
415
- console.log(chalk.gray(` - ${file}`));
464
+ const size = fs.statSync(path.join(outputDir, file)).size;
465
+ console.log(chalk.gray(` - ${file} (${size} bytes)`));
416
466
  });
417
467
  if (fs.readdirSync(outputDir).filter(f => f.endsWith('.html')).length > 5) {
418
468
  console.log(chalk.gray(` - ... and ${fs.readdirSync(outputDir).filter(f => f.endsWith('.html')).length - 5} more HTML files`));
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "doc-builder": "./cli.js",
8
- "juno-docs": "./cli.js",
9
8
  "@knowcode/doc-builder": "./scripts/npx-runner.js"
10
9
  },
11
10
  "scripts": {
@@ -17,7 +16,8 @@
17
16
  "markdown",
18
17
  "static-site-generator",
19
18
  "vercel",
20
- "juno"
19
+ "notion-style",
20
+ "doc-builder"
21
21
  ],
22
22
  "author": "KnowCode",
23
23
  "license": "MIT",
package/scripts/setup.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Post-install setup script for @juno/doc-builder
2
+ * Post-install setup script for @knowcode/doc-builder
3
3
  * This script runs after npm install to help users get started
4
4
  */
5
5
 
@@ -52,5 +52,5 @@ if (foundDir) {
52
52
  console.log(chalk.yellow(`ℹ️ No docs directory found. Create a 'docs' folder with markdown files to get started.\n`));
53
53
  }
54
54
 
55
- console.log(chalk.gray('For more information, visit: https://github.com/juno-platform/doc-builder'));
55
+ console.log(chalk.gray('For more information, visit: https://github.com/knowcode/doc-builder'));
56
56
  console.log(chalk.gray('To create a config file, run: doc-builder init --config\n'));