node-sword-interface 1.0.14 → 1.0.16
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 +2 -1
- package/index.js +2 -1
- package/package.json +1 -1
- package/src/napi_module/napi_sword_helper.cpp +13 -0
package/API.md
CHANGED
|
@@ -635,7 +635,8 @@ 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
|
-
|
|
|
638
|
+
| category | <code>String</code> | The category of the SWORD module |
|
|
639
|
+
| repository | <code>String</code> | The repository of the SWORD module |
|
|
639
640
|
| about | <code>String</code> | Extended description of the SWORD module |
|
|
640
641
|
| abbreviation | <code>String</code> | The abbreviation of the SWORD module |
|
|
641
642
|
| size | <code>Number</code> | The file size of the SWORD module (in KB) |
|
package/index.js
CHANGED
|
@@ -43,7 +43,8 @@ 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}
|
|
46
|
+
* @property {String} category - The category of the SWORD module
|
|
47
|
+
* @property {String} repository - The repository of the SWORD module
|
|
47
48
|
* @property {String} about - Extended description of the SWORD module
|
|
48
49
|
* @property {String} abbreviation - The abbreviation of the SWORD module
|
|
49
50
|
* @property {Number} size - The file size of the SWORD module (in KB)
|
package/package.json
CHANGED
|
@@ -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["repository"] = string(swModule->getConfigEntry("InstallSourceCaption"));
|
|
96
|
+
} else {
|
|
97
|
+
object["repository"] = "";
|
|
98
|
+
}
|
|
99
|
+
|
|
87
100
|
if (swModule->getConfigEntry("InstallSize")) {
|
|
88
101
|
std::string configInstallSize = string(swModule->getConfigEntry("InstallSize"));
|
|
89
102
|
|