Merge branch 'release/1.1.4'

This commit is contained in:
Book Pauk
2022-11-03 22:32:07 +07:00
4 changed files with 10 additions and 9 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "inpx-web",
"version": "1.1.3",
"version": "1.1.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "inpx-web",
"version": "1.1.3",
"version": "1.1.4",
"hasInstallScript": true,
"license": "CC0-1.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "inpx-web",
"version": "1.1.3",
"version": "1.1.4",
"author": "Book Pauk <bookpauk@gmail.com>",
"license": "CC0-1.0",
"repository": "bookpauk/inpx-web",

View File

@@ -14,9 +14,9 @@ module.exports = {
bookReadLink: '',
loggingEnabled: true,
//поправить в случае, если были критические изменения в DbCreator
//поправить в случае, если были критические изменения в DbCreator или InpxParser
//иначе будет рассинхронизация между сервером и клиентом на уровне БД
dbVersion: '5',
dbVersion: '6',
dbCacheSize: 5,
maxPayloadSize: 500,//in MB

View File

@@ -70,9 +70,8 @@ class InpxParser {
this.chunk = [];
for (const inpFile of inpFiles) {
await readFileCallback({fileName: inpFile, current: ++current});
const buf = await zipReader.extractToBuf(inpFile);
await this.parseInp(buf, structure, inpFile, parsedCallback);
await this.parseInp(zipReader, inpFile, structure, parsedCallback);
}
if (this.chunk.length) {
@@ -84,10 +83,12 @@ class InpxParser {
}
}
async parseInp(inpBuf, structure, inpFile, parsedCallback) {
const structLen = structure.length;
async parseInp(zipReader, inpFile, structure, parsedCallback) {
const inpBuf = await zipReader.extractToBuf(inpFile);
const rows = inpBuf.toString().split('\n');
const defaultFolder = `${path.basename(inpFile, '.inp')}.zip`;
const structLen = structure.length;
for (const row of rows) {
let line = row;