hdoc-tools 0.9.13 → 0.9.15

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Hornbill Docs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/hdoc-validate.js CHANGED
@@ -19,7 +19,8 @@
19
19
  },
20
20
  regex_nav_paths = /[a-z0-9-\/]+/g;
21
21
 
22
- let prod_families = {};
22
+ let prod_families = {},
23
+ prods_supported = [];
23
24
 
24
25
  let errors = {},
25
26
  messages = {},
@@ -35,6 +36,9 @@
35
36
  const prods = await axios.get('https://docs.hornbill.com/_books/products.json', { httpsAgent: agent });
36
37
  if (prods.status === 200) {
37
38
  prod_families = prods.data;
39
+ for (let i = 0; i < prod_families.products.length; i++) {
40
+ prods_supported.push(prod_families.products[i].id);
41
+ }
38
42
  } else {
39
43
  throw `Unexpected Status ${prods.status}`;
40
44
  }
@@ -323,7 +327,12 @@
323
327
  }
324
328
  }
325
329
  if (!valid_product) {
326
- meta_errors.push(`Incorrect productFamily: ${hdocbook_config.productFamily}`)
330
+ let val_prod_error = `Incorrect productFamily: ${hdocbook_config.productFamily}. Supported values:`;
331
+ for (let i = 0; i < prods_supported.length; i++) {
332
+ val_prod_error += `\n - ${prods_supported[i]}`
333
+ }
334
+ meta_errors.push(val_prod_error)
335
+
327
336
  }
328
337
 
329
338
  // Check navigation spellings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.9.13",
3
+ "version": "0.9.15",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
@@ -558,6 +558,8 @@ async function fetchJsonFile(strFilePath)
558
558
 
559
559
 
560
560
  //-- THE INIT APP CALLED FROM index.html
561
+ $(".document-body").attr("v-pre","");
562
+
561
563
  var view = new Vue({
562
564
  el: '#vDocDevApp',
563
565
  data: {updateCounter:0,bookId:"", docApp:{keepTocLayout:false,book:{},navSections:[],tableOfContents:[],bookBreadCrumb:[]}},