node-sword-interface 1.0.14 → 1.0.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/API.md CHANGED
@@ -635,9 +635,11 @@ An object representation of a SWORD module.
635
635
  | shortCopyright | <code>String</code> | The short copyright information of the SWORD module |
636
636
  | version | <code>String</code> | The version of the SWORD module |
637
637
  | lastUpdate | <code>String</code> | The date of the last version update of the SWORD module |
638
+ | category | <code>String</code> | The category of the SWORD module |
638
639
  | repository | <code>String</code> | The repository of the SWORD module (only returned by methods interacting with module repositories) |
639
640
  | about | <code>String</code> | Extended description of the SWORD module |
640
641
  | abbreviation | <code>String</code> | The abbreviation of the SWORD module |
642
+ | sourceRepo | <code>String</code> | The repository from which this SWORD modules has been installed |
641
643
  | size | <code>Number</code> | The file size of the SWORD module (in KB) |
642
644
  | location | <code>String</code> | The filesystem location where the module is stored |
643
645
  | unlockInfo | <code>String</code> | Information about how to retrieve an unlock key (in case the module is locked) |
package/index.js CHANGED
@@ -43,9 +43,11 @@ const nodeSwordInterfaceModule = require('./build/Release/node_sword_interface.n
43
43
  * @property {String} shortCopyright - The short copyright information of the SWORD module
44
44
  * @property {String} version - The version of the SWORD module
45
45
  * @property {String} lastUpdate - The date of the last version update of the SWORD module
46
+ * @property {String} category - The category of the SWORD module
46
47
  * @property {String} repository - The repository of the SWORD module (only returned by methods interacting with module repositories)
47
48
  * @property {String} about - Extended description of the SWORD module
48
49
  * @property {String} abbreviation - The abbreviation of the SWORD module
50
+ * @property {String} sourceRepo - The repository from which this SWORD modules has been installed
49
51
  * @property {Number} size - The file size of the SWORD module (in KB)
50
52
  * @property {String} location - The filesystem location where the module is stored
51
53
  * @property {String} unlockInfo - Information about how to retrieve an unlock key (in case the module is locked)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -61,6 +61,13 @@ void NapiSwordHelper::swordModuleToNapiObject(const Napi::Env& env, SWModule* sw
61
61
 
62
62
  object["name"] = swModule->getName();
63
63
  object["type"] = swModule->getType();
64
+
65
+ if (swModule->getConfigEntry("Category")) {
66
+ object["category"] = string(swModule->getConfigEntry("Category"));
67
+ } else {
68
+ object["category"] = "";
69
+ }
70
+
64
71
  object["description"] = swModule->getDescription();
65
72
  object["language"] = swModule->getLanguage();
66
73
  object["location"] = this->_moduleStore.getModuleDataPath(swModule);
@@ -84,6 +91,12 @@ void NapiSwordHelper::swordModuleToNapiObject(const Napi::Env& env, SWModule* sw
84
91
  object["isRightToLeft"] = Napi::Boolean::New(env, false);
85
92
  }
86
93
 
94
+ if (swModule->getConfigEntry("InstallSourceCaption")) {
95
+ object["sourceRepo"] = string(swModule->getConfigEntry("InstallSourceCaption"));
96
+ } else {
97
+ object["sourceRepo"] = "";
98
+ }
99
+
87
100
  if (swModule->getConfigEntry("InstallSize")) {
88
101
  std::string configInstallSize = string(swModule->getConfigEntry("InstallSize"));
89
102