node-sword-interface 1.0.104 → 1.0.105
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/CMakeLists.txt +3 -2
- package/binding.gyp +7 -2
- package/examples/install_kjv.js +4 -4
- package/examples/print_kjv_matthew.js +7 -7
- package/index.js +2 -2
- package/package.json +1 -1
- package/scripts/build_sword.sh +1 -1
- package/scripts/get_sword_build_win32.js +1 -1
- package/scripts/get_sword_include_path.sh +1 -1
- package/scripts/get_sword_library.sh +1 -1
- package/scripts/ios_framework_postbuild.sh +18 -0
- package/scripts/postinstall.js +1 -1
- package/src/{sword_backend → lib}/unzip/unzip.c +3 -0
- package/src/napi_module/api_lock.cpp +1 -1
- package/src/napi_module/api_lock.hpp +1 -1
- package/src/napi_module/binding.cpp +1 -1
- package/src/napi_module/install_module_worker.cpp +1 -1
- package/src/napi_module/install_module_worker.hpp +2 -2
- package/src/napi_module/module_search_worker.cpp +1 -1
- package/src/napi_module/module_search_worker.hpp +1 -1
- package/src/napi_module/napi_sword_helper.cpp +1 -1
- package/src/napi_module/napi_sword_helper.hpp +1 -1
- package/src/napi_module/node_sword_interface.cpp +1 -1
- package/src/napi_module/node_sword_interface.hpp +1 -1
- package/src/napi_module/worker.hpp +1 -1
- package/src/sword_backend/common_defs.hpp +1 -1
- package/src/sword_backend/dict_helper.cpp +1 -1
- package/src/sword_backend/dict_helper.hpp +1 -1
- package/src/sword_backend/file_system_helper.cpp +10 -2
- package/src/sword_backend/file_system_helper.hpp +1 -1
- package/src/sword_backend/module_helper.cpp +1 -1
- package/src/sword_backend/module_helper.hpp +1 -1
- package/src/sword_backend/module_installer.cpp +1 -1
- package/src/sword_backend/module_installer.hpp +1 -1
- package/src/sword_backend/module_search.cpp +1 -1
- package/src/sword_backend/module_search.hpp +1 -1
- package/src/sword_backend/module_store.cpp +1 -1
- package/src/sword_backend/module_store.hpp +1 -1
- package/src/sword_backend/mutex.cpp +1 -1
- package/src/sword_backend/mutex.hpp +1 -1
- package/src/sword_backend/percentage_calc.hpp +1 -1
- package/src/sword_backend/repository_interface.cpp +1 -1
- package/src/sword_backend/repository_interface.hpp +1 -1
- package/src/sword_backend/string_helper.cpp +1 -1
- package/src/sword_backend/string_helper.hpp +1 -1
- package/src/sword_backend/strongs_entry.cpp +1 -1
- package/src/sword_backend/strongs_entry.hpp +1 -1
- package/src/sword_backend/sword_status_reporter.cpp +1 -1
- package/src/sword_backend/sword_status_reporter.hpp +1 -1
- package/src/sword_backend/sword_translation_helper.hpp +1 -1
- package/src/sword_backend/text_processor.cpp +1 -1
- package/src/sword_backend/text_processor.hpp +1 -1
- package/.github/dependabot.yml +0 -12
- /package/src/{sword_backend → lib}/unzip/ioapi.c +0 -0
- /package/src/{sword_backend → lib}/unzip/ioapi.h +0 -0
- /package/src/{sword_backend → lib}/unzip/unzip.h +0 -0
package/CMakeLists.txt
CHANGED
|
@@ -5,6 +5,7 @@ project(node_sword_cli)
|
|
|
5
5
|
set(CMAKE_CXX_FLAGS "-g -rdynamic -std=c++11")
|
|
6
6
|
|
|
7
7
|
include_directories(${CMAKE_SOURCE_DIR}/src/sword_backend)
|
|
8
|
+
include_directories(${CMAKE_SOURCE_DIR}/src/lib)
|
|
8
9
|
|
|
9
10
|
include_directories(${CMAKE_SOURCE_DIR}/sword/include)
|
|
10
11
|
|
|
@@ -46,8 +47,8 @@ ${CMAKE_SOURCE_DIR}/src/sword_backend/module_installer.cpp
|
|
|
46
47
|
${CMAKE_SOURCE_DIR}/src/sword_backend/text_processor.cpp
|
|
47
48
|
${CMAKE_SOURCE_DIR}/src/sword_backend/module_search.cpp
|
|
48
49
|
${CMAKE_SOURCE_DIR}/src/sword_backend/mutex.cpp
|
|
49
|
-
${CMAKE_SOURCE_DIR}/src/
|
|
50
|
-
${CMAKE_SOURCE_DIR}/src/
|
|
50
|
+
${CMAKE_SOURCE_DIR}/src/lib/unzip/ioapi.c
|
|
51
|
+
${CMAKE_SOURCE_DIR}/src/lib/unzip/unzip.c
|
|
51
52
|
)
|
|
52
53
|
|
|
53
54
|
add_executable(node_sword_cli ${SOURCES})
|
package/binding.gyp
CHANGED
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"src/sword_backend/module_installer.cpp",
|
|
89
89
|
"src/sword_backend/sword_status_reporter.cpp",
|
|
90
90
|
"src/sword_backend/text_processor.cpp",
|
|
91
|
-
"src/
|
|
92
|
-
"src/
|
|
91
|
+
"src/lib/unzip/unzip.c",
|
|
92
|
+
"src/lib/unzip/ioapi.c",
|
|
93
93
|
"src/napi_module/install_module_worker.cpp",
|
|
94
94
|
"src/napi_module/module_search_worker.cpp",
|
|
95
95
|
"src/napi_module/napi_sword_helper.cpp",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"type": "shared_library",
|
|
103
103
|
'include_dirs': [
|
|
104
104
|
"<(module_root_dir)/src/sword_backend",
|
|
105
|
+
"<(module_root_dir)/src/lib",
|
|
105
106
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
106
107
|
"<!@(./scripts/get_sword_include_path.sh)"
|
|
107
108
|
],
|
|
@@ -131,6 +132,7 @@
|
|
|
131
132
|
["OS=='linux'", {
|
|
132
133
|
'include_dirs': [
|
|
133
134
|
"<(module_root_dir)/src/sword_backend",
|
|
135
|
+
"<(module_root_dir)/src/lib",
|
|
134
136
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
135
137
|
"<!@(./scripts/get_sword_include_path.sh)"
|
|
136
138
|
],
|
|
@@ -146,6 +148,7 @@
|
|
|
146
148
|
["OS=='android'", {
|
|
147
149
|
'include_dirs': [
|
|
148
150
|
"<(module_root_dir)/src/sword_backend",
|
|
151
|
+
"<(module_root_dir)/src/lib",
|
|
149
152
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
150
153
|
"<!@(./scripts/get_sword_include_path.sh)"
|
|
151
154
|
],
|
|
@@ -163,6 +166,7 @@
|
|
|
163
166
|
["OS=='mac'", {
|
|
164
167
|
'include_dirs': [
|
|
165
168
|
"<(module_root_dir)/src/sword_backend",
|
|
169
|
+
"<(module_root_dir)/src/lib",
|
|
166
170
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
167
171
|
"<!@(./scripts/get_sword_include_path.sh)"
|
|
168
172
|
],
|
|
@@ -178,6 +182,7 @@
|
|
|
178
182
|
["OS=='win'", {
|
|
179
183
|
'include_dirs': [
|
|
180
184
|
"<(module_root_dir)/src/sword_backend",
|
|
185
|
+
"<(module_root_dir)/src/lib",
|
|
181
186
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
182
187
|
"<(module_root_dir)/build/sword-build-win32/include"
|
|
183
188
|
],
|
package/examples/install_kjv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
// Note that this uses the sources within this directory structure.
|
|
20
20
|
// After installing via NPM you would use this require call: require('node-sword-interface');
|
|
21
21
|
const NodeSwordInterface = require('../index.js');
|
|
22
|
-
|
|
22
|
+
const nsi = new NodeSwordInterface();
|
|
23
23
|
|
|
24
24
|
async function installKJV() {
|
|
25
25
|
console.log("Updating repository configuration ...");
|
|
26
|
-
await
|
|
26
|
+
await nsi.updateRepositoryConfig();
|
|
27
27
|
|
|
28
28
|
console.log("Installing King James module");
|
|
29
29
|
// Install the King James Version (Uses the internet connection to download and install the module)
|
|
30
|
-
await
|
|
30
|
+
await nsi.installModule('CrossWire', 'KJV');
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
installKJV().then(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
// Note that this uses the sources within this directory structure.
|
|
20
20
|
// After installing via NPM you would use this require call: require('node-sword-interface');
|
|
21
21
|
const NodeSwordInterface = require('../index.js');
|
|
22
|
-
|
|
22
|
+
const nsi = new NodeSwordInterface();
|
|
23
23
|
|
|
24
24
|
function printKjvInfo() {
|
|
25
25
|
// Print some module information
|
|
26
|
-
|
|
26
|
+
const kjv = nsi.getLocalModule('KJV');
|
|
27
27
|
console.log(kjv.description);
|
|
28
28
|
console.log(kjv.about);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function printMatthew() {
|
|
32
32
|
// Get the verses of the Gospel of Matthew
|
|
33
|
-
|
|
33
|
+
const verses = nsi.getBookText('KJV', 'Mat');
|
|
34
34
|
|
|
35
35
|
// Do something with the verses
|
|
36
|
-
for (
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
for (let i = 0; i < verses.length; i++) {
|
|
37
|
+
const currentVerse = verses[i];
|
|
38
|
+
const verseReference = currentVerse.chapter + ':' + currentVerse.verseNr;
|
|
39
39
|
console.log(verseReference + ' ' + currentVerse.content);
|
|
40
40
|
}
|
|
41
41
|
}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -112,7 +112,7 @@ class NodeSwordInterface {
|
|
|
112
112
|
* @param {Number} timeoutMillis - Optional timeout in milliseconds for repository operations (default: 20000).
|
|
113
113
|
*/
|
|
114
114
|
constructor(customHomeDir=undefined, localesBasePath=__dirname, timeoutMillis=20000) {
|
|
115
|
-
|
|
115
|
+
const localesDir = path.join(localesBasePath, './locales.d');
|
|
116
116
|
this.nativeInterface = new nodeSwordInterfaceModule.NodeSwordInterface(customHomeDir, localesDir, timeoutMillis);
|
|
117
117
|
}
|
|
118
118
|
|
package/package.json
CHANGED
package/scripts/build_sword.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* This file is part of node-sword-interface.
|
|
3
3
|
|
|
4
|
-
Copyright (C) 2019 -
|
|
4
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
5
5
|
|
|
6
6
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
7
7
|
it under the terms of the GNU General Public License as published by
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
|
+
# This file is part of node-sword-interface.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
5
|
+
#
|
|
6
|
+
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# node-sword-interface is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
14
|
+
# See the GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with node-sword-interface. See the file COPYING.
|
|
18
|
+
# If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
|
|
2
20
|
set -e
|
|
3
21
|
|
|
4
22
|
# Accept arguments from GYP, or fallback to Xcode env vars
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1246,6 +1246,9 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
|
|
|
1246
1246
|
if (file==NULL)
|
|
1247
1247
|
return UNZ_PARAMERROR;
|
|
1248
1248
|
|
|
1249
|
+
if (szFileName==NULL)
|
|
1250
|
+
return UNZ_PARAMERROR;
|
|
1251
|
+
|
|
1249
1252
|
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
|
|
1250
1253
|
return UNZ_PARAMERROR;
|
|
1251
1254
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -47,8 +47,8 @@ public:
|
|
|
47
47
|
private:
|
|
48
48
|
ModuleInstaller& _moduleInstaller;
|
|
49
49
|
int _result;
|
|
50
|
-
std::string _moduleName;
|
|
51
50
|
std::string _repoName;
|
|
51
|
+
std::string _moduleName;
|
|
52
52
|
long _completedBytes = 0;
|
|
53
53
|
long _totalBytes = 0;
|
|
54
54
|
int _totalPercent = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -437,6 +437,15 @@ bool FileSystemHelper::unZip(std::string filePath, std::string destPath)
|
|
|
437
437
|
|
|
438
438
|
if (err != UNZ_OK) break;
|
|
439
439
|
|
|
440
|
+
// Ensure null-termination for safety
|
|
441
|
+
filename[sizeof(filename) - 1] = '\0';
|
|
442
|
+
size_t filenameLen = strlen(filename);
|
|
443
|
+
|
|
444
|
+
if (filenameLen == 0) {
|
|
445
|
+
err = unzGoToNextFile(uf);
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
448
|
+
|
|
440
449
|
string fullPath = destPath;
|
|
441
450
|
if (fullPath.back() != '/' && fullPath.back() != '\\') {
|
|
442
451
|
fullPath += '/';
|
|
@@ -444,7 +453,6 @@ bool FileSystemHelper::unZip(std::string filePath, std::string destPath)
|
|
|
444
453
|
fullPath += filename;
|
|
445
454
|
|
|
446
455
|
// Check if directory
|
|
447
|
-
size_t filenameLen = strlen(filename);
|
|
448
456
|
if (filename[filenameLen - 1] == '/') {
|
|
449
457
|
// Create directory
|
|
450
458
|
string dummy = fullPath + "dummy";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2026 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
package/.github/dependabot.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
-
directory: "/" # Location of package manifests
|
|
10
|
-
open-pull-requests-limit: 10
|
|
11
|
-
schedule:
|
|
12
|
-
interval: "daily"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|