Przeglądaj źródła

HUE-8818 [assist] Initial Hive Language Manual for the right assist

Generate by running:

node tools/sql-docs/hiveExtractor.js --epub ~/Downloads/LanguageManual.epub
Johan Ahlen 6 lat temu
rodzic
commit
ad00e556b0
46 zmienionych plików z 909 dodań i 135 usunięć
  1. 1 0
      desktop/core/src/desktop/static/desktop/docs/hive/_103092177.json
  2. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362030.json
  3. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362032.json
  4. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362033.json
  5. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362034.json
  6. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362035.json
  7. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362036.json
  8. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362037.json
  9. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362039.json
  10. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362040.json
  11. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362042.json
  12. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362043.json
  13. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362044.json
  14. 1 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362048.json
  15. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27362049.json
  16. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27829682.json
  17. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27837968.json
  18. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27838462.json
  19. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_27842758.json
  20. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_30151323.json
  21. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_30754722.json
  22. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_30755801.json
  23. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_31818911.json
  24. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_31819589.json
  25. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_31822176.json
  26. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_33293167.json
  27. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_33298193.json
  28. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_34838882.json
  29. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_38570914.json
  30. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_38572242.json
  31. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_40509928.json
  32. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_45876173.json
  33. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_45876440.json
  34. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_47384180.json
  35. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_58851803.json
  36. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_59690156.json
  37. 0 0
      desktop/core/src/desktop/static/desktop/docs/hive/_95654003.json
  38. 30 9
      desktop/core/src/desktop/templates/assist.mako
  39. 2 2
      desktop/core/src/desktop/templates/global_js_constants.mako
  40. 1 1
      desktop/core/src/desktop/templates/sql_doc_index.mako
  41. 132 119
      package-lock.json
  42. 2 0
      package.json
  43. 136 0
      tools/sql-docs/hiveExtractor.js
  44. 25 4
      tools/sql-docs/jsonHandler.js
  45. 564 0
      tools/sql-docs/package-lock.json
  46. 15 0
      tools/sql-docs/package.json

+ 1 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_103092177.json

@@ -0,0 +1 @@
+{"body":"<div><div>\n        <div id=\"title\">\n                        <h1>Partition Filter Syntax</h1>\n        </div>\n\n        <!--<div id=\"toc\" class=\"content prepend-top\">\n            <h1>Table of Contents</h1>\n            $replacement.render(\"toc\")\n        </div>-->\n\n        <div id=\"src-103092177\">\n            <p>\n    Example: for a table having partition keys <tt>country</tt> and <tt>state</tt>, one could construct the following filter:            </p>\n                <p style=\"margin-left:30px;\">\n    <tt>country = \"USA\" AND (state = \"CA\" OR state = \"AZ\")</tt>            </p>\n                <p>\n    In particular notice that it is possible to nest sub-expressions within parentheses.            </p>\n                <p>\n    The following operators are supported when constructing filters for partition columns (derived from <a href=\"https://jira.apache.org/jira/browse/HIVE-1862\">HIVE-1862</a>):            </p>\n    <ul><li>            <p>\n    <tt>=</tt>            </p>\n    </li><li>            <p>\n    <tt>&lt;</tt>            </p>\n    </li><li>            <p>\n    <tt>&lt;=</tt>            </p>\n    </li><li>            <p>\n    <tt>&gt;</tt>            </p>\n    </li><li>            <p>\n    <tt>&gt;=</tt>            </p>\n    </li><li>            <p>\n    <tt>&lt;&gt;</tt>            </p>\n    </li><li>            <p>\n    <tt>AND</tt>            </p>\n    </li><li>            <p>\n    <tt>OR</tt>            </p>\n    </li><li>            <p>\n    <tt>LIKE</tt> (on keys of type <tt>string</tt> only, supports literal string template with '.<tt>*'</tt> wildcard)<tt></tt>            </p>\n    </li></ul>        </div>\n    </div></div>","title":"Partition Filter Syntax"}

Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362030.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362032.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362033.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362034.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362035.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362036.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362037.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362039.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362040.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362042.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362043.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362044.json


+ 1 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362048.json

@@ -0,0 +1 @@
+{"body":"<div><div>\n        <div id=\"title\">\n                        <h1>LanguageManual VirtualColumns</h1>\n        </div>\n\n        <!--<div id=\"toc\" class=\"content prepend-top\">\n            <h1>Table of Contents</h1>\n            $replacement.render(\"toc\")\n        </div>-->\n\n        <div id=\"src-27362048\">\n<ul><li>            <p>\n    <a href=\"/links/_27362048/27362048.html#src-27362048_LanguageManualVirtualColumns-VirtualColumns\">Virtual Columns</a>            </p>\n    <ul><li>            <p>\n    <a href=\"/links/_27362048/27362048.html#src-27362048_LanguageManualVirtualColumns-SimpleExamples\">Simple Examples</a>            </p>\n    </li></ul></li></ul>    <div id=\"src-27362048_LanguageManualVirtualColumns-VirtualColumns\">\n        <h2><span>Virtual Columns</span></h2>\n            <p>\n    Hive 0.8.0 provides support for two virtual columns:            </p>\n                <p>\n    One is <tt>INPUT__FILE__NAME</tt>, which is the input file's name for a mapper task.            </p>\n                <p>\n    the other is <tt>BLOCK__OFFSET__INSIDE__FILE</tt>, which is the current global file position.            </p>\n                <p>\n    For block compressed file, it is the current block's file offset, which is the current block's first byte's file offset.            </p>\n        <div id=\"src-27362048_LanguageManualVirtualColumns-SimpleExamples\">\n        <h3><span>Simple Examples</span></h3>\n            <p>\n    select <tt>INPUT__FILE__NAME</tt>, key, <tt>BLOCK__OFFSET__INSIDE__FILE</tt> from src;            </p>\n                <p>\n    select key, count(<tt>INPUT__FILE__NAME</tt>) from src group by key order by key;            </p>\n                <p>\n    select * from src where <tt>BLOCK__OFFSET__INSIDE__FILE</tt> &gt; 12000 order by key;            </p>\n        </div>\n    </div>\n        </div>\n    </div></div>","title":"VirtualColumns"}

Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27362049.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27829682.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27837968.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27838462.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_27842758.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_30151323.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_30754722.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_30755801.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_31818911.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_31819589.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_31822176.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_33293167.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_33298193.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_34838882.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_38570914.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_38572242.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_40509928.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_45876173.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_45876440.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_47384180.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_58851803.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_59690156.json


Plik diff jest za duży
+ 0 - 0
desktop/core/src/desktop/static/desktop/docs/hive/_95654003.json


+ 30 - 9
desktop/core/src/desktop/templates/assist.mako

@@ -30,7 +30,7 @@ from desktop.lib.i18n import smart_unicode
 from desktop.views import _ko
 %>
 
-<%namespace name="impalaDocIndex" file="/impala_doc_index.mako" />
+<%namespace name="sqlDocIndex" file="/sql_doc_index.mako" />
 
 <%def name="assistJSModels()">
 <script src="${ static('desktop/js/document/hueDocument.js') }"></script>
@@ -2263,6 +2263,11 @@ from desktop.views import _ko
   <script type="text/html" id="language-reference-panel-template">
     <div class="assist-inner-panel">
       <div class="assist-flex-panel">
+        <div class="assist-flex-header">
+          <div class="assist-inner-header">
+            <div class="function-dialect-dropdown" data-bind="component: { name: 'hue-drop-down', params: { fixedPosition: true, value: sourceType, entries: availableTypes, linkTitle: '${ _ko('Selected dialect') }' } }" style="display: inline-block"></div>
+          </div>
+        </div>
         <div class="assist-flex-search">
           <div class="assist-filter">
             <input class="clearable" type="text" placeholder="Filter..." data-bind="clearable: query, value: query, valueUpdate: 'afterkeydown'">
@@ -2354,17 +2359,18 @@ from desktop.views import _ko
   <script type="text/javascript">
     (function () {
 
-      ${ impalaDocIndex.impalaDocIndex() }
-      ${ impalaDocIndex.impalaDocTopLevel() }
+      ${ sqlDocIndex.sqlDocIndex() }
+      ${ sqlDocIndex.sqlDocTopLevel() }
 
-      var LanguageReferenceTopic = function (entry) {
+      var LanguageReferenceTopic = function (entry, index) {
         var self = this;
         self.ref = entry.ref;
         self.title = entry.title;
+        self.index = index;
         self.weight = 1;
         self.children = [];
         entry.children.forEach(function (child) {
-          self.children.push(new LanguageReferenceTopic(child));
+          self.children.push(new LanguageReferenceTopic(child, self.index));
         });
         self.loadDeferred = $.Deferred();
         self.loading = ko.observable(false);
@@ -2380,7 +2386,7 @@ from desktop.views import _ko
           return self.loadDeferred.promise();
         }
         self.loading(true);
-        window.apiHelper.simpleGet(window.IMPALA_DOC_INDEX[self.ref]).done(function (doc) {
+        window.apiHelper.simpleGet(self.index[self.ref]).done(function (doc) {
           self.body(doc.body);
         }).always(function () {
           self.loading(false);
@@ -2392,9 +2398,24 @@ from desktop.views import _ko
       function LanguageReferencePanel (params, element) {
         var self = this;
         self.disposals = [];
-        self.topics = [];
+
+        self.availableTypes = ['impala', 'hive'];
+
+        self.sourceType = ko.observable('hive');
+
+        self.allTopics = {
+          impala: [],
+          hive: []
+        };
         window.IMPALA_DOC_TOP_LEVEL.forEach(function (topLevelItem) {
-          self.topics.push(new LanguageReferenceTopic(topLevelItem));
+          self.allTopics.impala.push(new LanguageReferenceTopic(topLevelItem, window.IMPALA_DOC_INDEX));
+        });
+        window.HIVE_DOC_TOP_LEVEL.forEach(function (topLevelItem) {
+          self.allTopics.hive.push(new LanguageReferenceTopic(topLevelItem, window.HIVE_DOC_INDEX));
+        });
+
+        self.topics = ko.pureComputed(function () {
+          return self.allTopics[self.sourceType()];
         });
 
         self.selectedTopic = ko.observable();
@@ -3659,7 +3680,7 @@ from desktop.views import _ko
         var updateContentsForType = function (type, isSqlDialect) {
           self.sourceType(type);
           self.functionsTabAvailable(type === 'hive' || type === 'impala' || type === 'pig');
-          self.langRefTabAvailable(type === 'impala');
+          self.langRefTabAvailable(type === 'hive' || type === 'impala');
           self.editorAssistantTabAvailable((!window.IS_EMBEDDED || window.EMBEDDED_ASSISTANT_ENABLED) && isSqlDialect);
           self.dashboardAssistantTabAvailable(type === 'dashboard');
           self.schedulesTabAvailable(false);

+ 2 - 2
desktop/core/src/desktop/templates/global_js_constants.mako

@@ -30,7 +30,7 @@
   from metastore.views import has_write_access
 %>
 
-<%namespace name="impalaDocIndex" file="/impala_doc_index.mako" />
+<%namespace name="sqlDocIndex" file="/sql_doc_index.mako" />
 
 (function () {
   window.AUTOCOMPLETE_TIMEOUT = ${ conf.EDITOR_AUTOCOMPLETE_TIMEOUT.get() };
@@ -393,5 +393,5 @@
       'timestamp': -1, 'tinyint': -1, 'varchar': -1 }
   };
 
-  ${ impalaDocIndex.impalaDocIndex() }
+  ${ sqlDocIndex.sqlDocIndex() }
 })();

Plik diff jest za duży
+ 1 - 1
desktop/core/src/desktop/templates/sql_doc_index.mako


Plik diff jest za duży
+ 132 - 119
package-lock.json


+ 2 - 0
package.json

@@ -29,6 +29,7 @@
     "d3": "5.7.0",
     "d3v3": "1.0.3",
     "dropzone": "5.5.1",
+    "epub": "^1.1.0",
     "filesize": "4.0.0",
     "jquery": "3.3.1",
     "jquery-form": "4.2.2",
@@ -45,6 +46,7 @@
     "leaflet.heat": "0.2.0",
     "leaflet.markercluster": "0.5.0",
     "less": "3.9.0",
+    "libxmljs": "^0.19.5",
     "localforage": "1.7.3",
     "lodash": "4.17.11",
     "medium-editor": "5.23.3",

+ 136 - 0
tools/sql-docs/hiveExtractor.js

@@ -0,0 +1,136 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+const fs = require('fs');
+const mkdirp = require('mkdirp');
+const path = require('path');
+const program = require('commander');
+
+const EPub = require('epub');
+
+const Topic = require('./Topic');
+const libxml = require('libxmljs');
+
+const outputPath = './desktop/core/src/desktop/static/desktop/docs/hive/';
+const mako = './desktop/core/src/desktop/templates/sql_doc_index.mako';
+
+const jsonHandler = require('./jsonHandler');
+
+// Handle command line arguments
+program
+  .version('1.0')
+  .option('-e, --epub [path]', 'the path to the Hive epub file')
+  .parse(process.argv);
+
+const epub = new EPub(program.epub);
+
+const convertToPre = (element, fragments) => {
+  switch (element.name()) {
+    case 'div':
+      element.childNodes().forEach(node => {
+        convertToPre(node, fragments);
+      });
+      break;
+    case 'text':
+      if (fragments.length === 1) {
+        fragments.push(element.text().replace(/^\n/, ''));
+      } else {
+        fragments.push(element.text());
+      }
+      break;
+    case 'code':
+      if (element.attr('class') && element.attr('class').value().indexOf('value') !== -1) {
+        fragments.push('<span class="hue-doc-varname">');
+        element.childNodes().forEach(node => {
+          convertToPre(node, fragments);
+        });
+        fragments.push('</span>');
+        break;
+      }
+    default:
+      element.childNodes().forEach(node => {
+        convertToPre(node, fragments);
+      });
+  }
+};
+
+const adaptElement = (element) => {
+  if (element.attr('class') && element.attr('class').value().indexOf('syntaxhighlighter') !== -1) {
+    let fragments = ['<div class="hue-doc-codeblock">'];
+    element.childNodes().forEach(childNode => {
+      convertToPre(childNode, fragments);
+    });
+    fragments.push('</div>');
+    let replacement = fragments.join('');
+    element.replace(libxml.parseHtmlFragment(replacement).root());
+  } else if (element.attr('class')) {
+    element.attr('class').remove();
+  }
+  element.childNodes().forEach(adaptElement);
+};
+
+epub.on("end", function(){
+  let savePromises = [];
+
+  let rootTopics = [];
+  let topicStack = [];
+
+  let lastTopicPerLevel = {};
+
+  let promises = [];
+
+  epub.flow.forEach(chapter => {
+    promises.push(new Promise((resolve, reject) => {
+      let topic = new Topic('/', chapter.id);
+      topic.fragment = {
+        title : {
+          text: () => chapter.title.replace(/LanguageManual\s(.+)/, '$1')
+        }
+      };
+
+      epub.getChapter(chapter.id, (error, text) => {
+        try {
+          let contents = libxml.parseHtmlFragment('<div>' + text + '</div>');
+          topic.domXml = contents.root();
+          adaptElement(topic.domXml);
+          resolve();
+        } catch (error) {
+          reject();
+        }
+      });
+
+      if (lastTopicPerLevel[chapter.level - 1]) {
+        lastTopicPerLevel[chapter.level - 1].children.push(topic);
+      }
+
+      if (chapter.level === 0) {
+        rootTopics.push(topic);
+      }
+
+      lastTopicPerLevel[chapter.level] = topic;
+    }));
+  });
+
+  Promise.all(promises).then(() => {
+    jsonHandler.saveTopics(rootTopics, outputPath, mako, false).then(() => {
+      console.log('Done.');
+    }).catch(() => {
+      console.log('Fail.');
+    });
+  });
+});
+
+epub.parse();

+ 25 - 4
tools/sql-docs/jsonHandler.js

@@ -28,7 +28,7 @@ const LOG_NAME = 'jsonHandler.js';
  * @param {string} [makoPath] - If set it will add the index and topic tree to this file
  * @return {Promise}
  */
-const saveTopics = (topics, outputPath, makoPath) => {
+const saveTopics = (topics, outputPath, makoPath, isImpala) => {
   let index = {};
   let topLevel = [];
   let savePromises = [];
@@ -47,6 +47,9 @@ const saveTopics = (topics, outputPath, makoPath) => {
       }
 
       let fileName = topic.ref.replace('.xml', '.json');
+      if (fileName.indexOf('.json') === -1) {
+        fileName += '.json';
+      }
       index[topic.ref] = fileName;
 
       let filePath = outputPath + fileName;
@@ -71,7 +74,25 @@ const saveTopics = (topics, outputPath, makoPath) => {
 
   saveTopicsInternal(topics);
 
+  const indexTypes = {
+    impala: {
+      staticPrefix: '\':\'${ static(\'desktop/docs/impala/',
+      docIndexRegex: /window\.IMPALA_DOC_INDEX.*\n/,
+      docIndexPrefix: 'window.IMPALA_DOC_INDEX = {',
+      topLevelRegex: /window\.IMPALA_DOC_TOP_LEVEL.*\n/,
+      topLevelPrefix: 'window.IMPALA_DOC_TOP_LEVEL = ['
+    },
+    hive: {
+      staticPrefix: '\':\'${ static(\'desktop/docs/hive/',
+      docIndexRegex: /window\.HIVE_DOC_INDEX.*\n/,
+      docIndexPrefix: 'window.HIVE_DOC_INDEX = {',
+      topLevelRegex: /window\.HIVE_DOC_TOP_LEVEL.*\n/,
+      topLevelPrefix: 'window.HIVE_DOC_TOP_LEVEL = ['
+    }
+  };
+
   if (makoPath) {
+    let indexType = isImpala ? indexTypes.impala : indexTypes.hive;
     savePromises.push(new Promise((resolve, reject) => {
       fs.readFile(makoPath, 'utf-8', (err, contents) => {
         if (err) {
@@ -80,15 +101,15 @@ const saveTopics = (topics, outputPath, makoPath) => {
         }
         let indexStrings = [];
         Object.keys(index).forEach(key => {
-          indexStrings.push('\'' + key + '\':\'${ static(\'desktop/docs/impala/' + index[key] + '\') }\'')
+          indexStrings.push('\'' + key + indexType.staticPrefix + index[key] + '\') }\'')
         });
-        contents = contents.replace(/window\.IMPALA_DOC_INDEX.*\n/, 'window.IMPALA_DOC_INDEX = {' + indexStrings.join(',') + '};\n');
+        contents = contents.replace(indexType.docIndexRegex, indexType.docIndexPrefix + indexStrings.join(',') + '};\n');
 
         let createTopicJs = (entry) => {
           return '{title:\'' + entry.title +'\',ref:\'' + entry.ref + '\',children:[' + entry.children.map(createTopicJs).join(',') + ']}';
         };
 
-        contents = contents.replace(/window\.IMPALA_DOC_TOP_LEVEL.*\n/, 'window.IMPALA_DOC_TOP_LEVEL = [' + topLevel.map(createTopicJs).join(',') + '];\n');
+        contents = contents.replace(indexType.topLevelRegex, indexType.topLevelPrefix + topLevel.map(createTopicJs).join(',') + '];\n');
         fs.writeFile(makoPath.replace('.template', ''), contents, (err) => {
           if (err) {
             reject(err);

+ 564 - 0
tools/sql-docs/package-lock.json

@@ -0,0 +1,564 @@
+{
+  "name": "sql-docs",
+  "version": "1.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "abbrev": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
+    },
+    "adm-zip": {
+      "version": "0.4.13",
+      "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz",
+      "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw=="
+    },
+    "ansi-regex": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+    },
+    "aproba": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+      "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
+    },
+    "are-we-there-yet": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
+      "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+      "requires": {
+        "delegates": "^1.0.0",
+        "readable-stream": "^2.0.6"
+      }
+    },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+    },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "chownr": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
+      "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g=="
+    },
+    "code-point-at": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+    },
+    "console-control-strings": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+      "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+    },
+    "debug": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+      "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+      "requires": {
+        "ms": "^2.1.1"
+      }
+    },
+    "deep-extend": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
+    },
+    "delegates": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+    },
+    "detect-libc": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+      "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
+    },
+    "epub": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/epub/-/epub-1.1.0.tgz",
+      "integrity": "sha512-eekqyzaOs7vlWkY5MDyIX8e4pHExLJqxoULFbfTInji+3QJ+10P5IYJSqdaPGvA6MlwCigVY8IaLkaqGVmKcbQ==",
+      "requires": {
+        "adm-zip": "^0.4.11",
+        "xml2js": "^0.4.19",
+        "zipfile": "^0.5.11"
+      }
+    },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+    },
+    "fs-minipass": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
+      "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
+      "requires": {
+        "minipass": "^2.2.1"
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+    },
+    "gauge": {
+      "version": "2.7.4",
+      "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+      "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+      "requires": {
+        "aproba": "^1.0.3",
+        "console-control-strings": "^1.0.0",
+        "has-unicode": "^2.0.0",
+        "object-assign": "^4.1.0",
+        "signal-exit": "^3.0.0",
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1",
+        "wide-align": "^1.1.0"
+      }
+    },
+    "glob": {
+      "version": "7.1.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+      "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "has-unicode": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+      "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "ignore-walk": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
+      "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
+      "requires": {
+        "minimatch": "^3.0.4"
+      }
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+    },
+    "ini": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+      "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
+    },
+    "is-fullwidth-code-point": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+      "requires": {
+        "number-is-nan": "^1.0.0"
+      }
+    },
+    "isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+    },
+    "libxmljs": {
+      "version": "0.18.8",
+      "resolved": "https://registry.npmjs.org/libxmljs/-/libxmljs-0.18.8.tgz",
+      "integrity": "sha1-sKB1EqASkLYkBgDWwrwzo8cJdtY=",
+      "requires": {
+        "bindings": "^1.3.0",
+        "nan": "~2.10.0",
+        "node-pre-gyp": "^0.9.1"
+      }
+    },
+    "minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "minimist": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+    },
+    "minipass": {
+      "version": "2.3.5",
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
+      "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
+      "requires": {
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.0"
+      }
+    },
+    "minizlib": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
+      "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
+      "requires": {
+        "minipass": "^2.2.1"
+      }
+    },
+    "mkdirp": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+      "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+      "requires": {
+        "minimist": "0.0.8"
+      }
+    },
+    "ms": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+      "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+    },
+    "nan": {
+      "version": "2.10.0",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
+      "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA=="
+    },
+    "needle": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
+      "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
+      "requires": {
+        "debug": "^4.1.0",
+        "iconv-lite": "^0.4.4",
+        "sax": "^1.2.4"
+      }
+    },
+    "node-pre-gyp": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz",
+      "integrity": "sha1-8RwHUW3ZL4cZnbx+GDjqt81WyeA=",
+      "requires": {
+        "detect-libc": "^1.0.2",
+        "mkdirp": "^0.5.1",
+        "needle": "^2.2.0",
+        "nopt": "^4.0.1",
+        "npm-packlist": "^1.1.6",
+        "npmlog": "^4.0.2",
+        "rc": "^1.1.7",
+        "rimraf": "^2.6.1",
+        "semver": "^5.3.0",
+        "tar": "^4"
+      }
+    },
+    "nopt": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+      "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+      "requires": {
+        "abbrev": "1",
+        "osenv": "^0.1.4"
+      }
+    },
+    "npm-bundled": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
+      "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g=="
+    },
+    "npm-packlist": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
+      "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
+      "requires": {
+        "ignore-walk": "^3.0.1",
+        "npm-bundled": "^1.0.1"
+      }
+    },
+    "npmlog": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+      "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+      "requires": {
+        "are-we-there-yet": "~1.1.2",
+        "console-control-strings": "~1.1.0",
+        "gauge": "~2.7.3",
+        "set-blocking": "~2.0.0"
+      }
+    },
+    "number-is-nan": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "os-homedir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
+    },
+    "os-tmpdir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+    },
+    "osenv": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+      "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+      "requires": {
+        "os-homedir": "^1.0.0",
+        "os-tmpdir": "^1.0.0"
+      }
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+    },
+    "process-nextick-args": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+      "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
+    },
+    "rc": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+      "requires": {
+        "deep-extend": "^0.6.0",
+        "ini": "~1.3.0",
+        "minimist": "^1.2.0",
+        "strip-json-comments": "~2.0.1"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+          "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
+        }
+      }
+    },
+    "readable-stream": {
+      "version": "2.3.6",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+      "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+      "requires": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "rimraf": {
+      "version": "2.6.3",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+      "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
+    "safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+    },
+    "safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+    },
+    "sax": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
+      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
+    },
+    "semver": {
+      "version": "5.7.0",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+      "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
+    },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+    },
+    "signal-exit": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+      "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
+    },
+    "string-width": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+      "requires": {
+        "code-point-at": "^1.0.0",
+        "is-fullwidth-code-point": "^1.0.0",
+        "strip-ansi": "^3.0.0"
+      }
+    },
+    "string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "requires": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
+    "strip-ansi": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      }
+    },
+    "strip-json-comments": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+      "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
+    },
+    "tar": {
+      "version": "4.4.8",
+      "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
+      "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
+      "requires": {
+        "chownr": "^1.1.1",
+        "fs-minipass": "^1.2.5",
+        "minipass": "^2.3.4",
+        "minizlib": "^1.1.1",
+        "mkdirp": "^0.5.0",
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.2"
+      }
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+    },
+    "wide-align": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+      "requires": {
+        "string-width": "^1.0.2 || 2"
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+    },
+    "xml2js": {
+      "version": "0.4.19",
+      "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
+      "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
+      "requires": {
+        "sax": ">=0.6.0",
+        "xmlbuilder": "~9.0.1"
+      }
+    },
+    "xmlbuilder": {
+      "version": "9.0.7",
+      "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+      "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
+    },
+    "yallist": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+      "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
+    },
+    "zipfile": {
+      "version": "0.5.12",
+      "resolved": "https://registry.npmjs.org/zipfile/-/zipfile-0.5.12.tgz",
+      "integrity": "sha512-zA60gW+XgQBu/Q4qV3BCXNIDRald6Xi5UOPj3jWGlnkjmBHaKDwIz7kyXWV3kq7VEsQN/2t/IWjdXdKeVNm6Eg==",
+      "optional": true,
+      "requires": {
+        "nan": "~2.10.0",
+        "node-pre-gyp": "~0.10.2"
+      },
+      "dependencies": {
+        "node-pre-gyp": {
+          "version": "0.10.3",
+          "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz",
+          "integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==",
+          "optional": true,
+          "requires": {
+            "detect-libc": "^1.0.2",
+            "mkdirp": "^0.5.1",
+            "needle": "^2.2.1",
+            "nopt": "^4.0.1",
+            "npm-packlist": "^1.1.6",
+            "npmlog": "^4.0.2",
+            "rc": "^1.2.7",
+            "rimraf": "^2.6.1",
+            "semver": "^5.3.0",
+            "tar": "^4"
+          }
+        }
+      }
+    }
+  }
+}

+ 15 - 0
tools/sql-docs/package.json

@@ -0,0 +1,15 @@
+{
+  "name": "sql-docs",
+  "version": "1.0.0",
+  "description": "",
+  "main": "DocFragment.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "libxmljs": "0.18.8",
+    "epub": "^1.1.0"
+  }
+}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików