@knowcode/doc-builder 1.5.6 → 1.5.7

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cli.js +9 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ 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.5.7] - 2025-07-22
9
+
10
+ ### Fixed
11
+ - Fixed "path argument must be string" error when running seo-check via npx
12
+ - Properly pass options to loadConfig in seo-check command
13
+ - Added validation to check if docs directory exists before running SEO analysis
14
+ - Improved error messages when docs directory is missing
15
+
8
16
  ## [1.5.6] - 2025-07-22
9
17
 
10
18
  ### Fixed
package/cli.js CHANGED
@@ -214,9 +214,17 @@ ${chalk.yellow('This command analyzes:')}
214
214
  `)
215
215
  .action(async (filePath, options) => {
216
216
  try {
217
- const config = await loadConfig(options.config);
217
+ const config = await loadConfig(options.config || 'doc-builder.config.js', options);
218
218
  const docsDir = path.resolve(config.docsDir || 'docs');
219
219
 
220
+ // Check if docsDir exists
221
+ if (!await fs.pathExists(docsDir)) {
222
+ console.error(chalk.red(`Documentation directory not found: ${docsDir}`));
223
+ console.log(chalk.yellow('\nPlease ensure you have a docs directory with markdown files.'));
224
+ console.log(chalk.gray(`Create it with: mkdir docs && echo "# Documentation" > docs/README.md`));
225
+ process.exit(1);
226
+ }
227
+
220
228
  console.log(chalk.cyan('🔍 Analyzing SEO...'));
221
229
 
222
230
  // Get files to check
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {