hdoc-tools 0.20.0 → 0.22.0

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/hdoc-validate.js CHANGED
@@ -183,7 +183,7 @@
183
183
  return inline_errors;
184
184
  };
185
185
 
186
- const checkNavigation = async (source_path, flat_nav, excludes) => {
186
+ const checkNavigation = async (source_path, flat_nav, excludes, draft_links) => {
187
187
  const nav_errors = [];
188
188
  for (const key in flat_nav) {
189
189
  if (Object.hasOwn(flat_nav, key)) {
@@ -220,7 +220,7 @@
220
220
  file_name = path.join(source_path, key_no_hash, "index.htm");
221
221
  if (!fs.existsSync(file_name)) {
222
222
  file_exists = false;
223
- if (!redirected && !redirect_errored)
223
+ if (!redirected && !redirect_errored && draft_links.indexOf(key_no_hash) === -1)
224
224
  nav_errors.push(
225
225
  `Navigation path [${key_no_hash}] file does not exist.`,
226
226
  );
@@ -715,6 +715,7 @@
715
715
  prods_supported,
716
716
  gen_exclude,
717
717
  gen_redirects,
718
+ draft_links,
718
719
  ) => {
719
720
  console.log("Performing Validation and Building SEO Link List...");
720
721
  redirects = gen_redirects;
@@ -798,6 +799,7 @@
798
799
  source_path,
799
800
  nav_items,
800
801
  exclude_spellcheck,
802
+ draft_links,
801
803
  );
802
804
  if (nav_errors.length > 0) meta_errors.push(...nav_errors);
803
805
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {