diff --git a/build/linux.js b/build/linux.js index 1878d06b..ac14b5e8 100644 --- a/build/linux.js +++ b/build/linux.js @@ -4,7 +4,7 @@ const util = require('util'); const stream = require('stream'); const pipeline = util.promisify(stream.pipeline); -const got = require('got'); +const axios = require('axios'); const FileDecompressor = require('../server/core/FileDecompressor'); const distDir = path.resolve(__dirname, '../dist'); @@ -29,7 +29,8 @@ async function main() { if (!await fs.pathExists(sqliteDecompressedFilename)) { // Скачиваем node_sqlite3.node для винды, т.к. pkg не включает его в сборку - await pipeline(got.stream(sqliteRemoteUrl), fs.createWriteStream(`${tempDownloadDir}/sqlite.tar.gz`)); + const res = await axios.get(sqliteRemoteUrl, {responseType: 'stream'}) + await pipeline(res.data, fs.createWriteStream(`${tempDownloadDir}/sqlite.tar.gz`)); console.log(`done downloading ${sqliteRemoteUrl}`); //распаковываем @@ -46,7 +47,8 @@ async function main() { // Скачиваем ipfs const ipfsRemoteUrl = 'https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_linux-amd64.tar.gz'; - await pipeline(got.stream(ipfsRemoteUrl), fs.createWriteStream(`${tempDownloadDir}/ipfs.tar.gz`)); + const res = await axios.get(ipfsRemoteUrl, {responseType: 'stream'}) + await pipeline(res.data, fs.createWriteStream(`${tempDownloadDir}/ipfs.tar.gz`)); console.log(`done downloading ${ipfsRemoteUrl}`); //распаковываем diff --git a/build/win.js b/build/win.js index f9e0ff32..9a9fa835 100644 --- a/build/win.js +++ b/build/win.js @@ -4,7 +4,7 @@ const util = require('util'); const stream = require('stream'); const pipeline = util.promisify(stream.pipeline); -const got = require('got'); +const axios = require('axios'); const FileDecompressor = require('../server/core/FileDecompressor'); const distDir = path.resolve(__dirname, '../dist'); @@ -29,7 +29,8 @@ async function main() { if (!await fs.pathExists(sqliteDecompressedFilename)) { // Скачиваем node_sqlite3.node для винды, т.к. pkg не включает его в сборку - await pipeline(got.stream(sqliteRemoteUrl), fs.createWriteStream(`${tempDownloadDir}/sqlite.tar.gz`)); + const res = await axios.get(sqliteRemoteUrl, {responseType: 'stream'}) + await pipeline(res.data, fs.createWriteStream(`${tempDownloadDir}/sqlite.tar.gz`)); console.log(`done downloading ${sqliteRemoteUrl}`); //распаковываем @@ -46,7 +47,8 @@ async function main() { // Скачиваем ipfs const ipfsRemoteUrl = 'https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_windows-amd64.zip'; - await pipeline(got.stream(ipfsRemoteUrl), fs.createWriteStream(`${tempDownloadDir}/ipfs.zip`)); + const res = await axios.get(ipfsRemoteUrl, {responseType: 'stream'}) + await pipeline(res.data, fs.createWriteStream(`${tempDownloadDir}/ipfs.zip`)); console.log(`done downloading ${ipfsRemoteUrl}`); //распаковываем diff --git a/client/api/misc.js b/client/api/misc.js index c4e49009..16b7a368 100644 --- a/client/api/misc.js +++ b/client/api/misc.js @@ -9,7 +9,7 @@ class Misc { async loadConfig() { const query = {params: [ - 'name', 'version', 'mode', 'maxUploadFileSize', 'useExternalBookConverter', 'branch', + 'name', 'version', 'mode', 'maxUploadFileSize', 'useExternalBookConverter', 'acceptFileExt', 'branch', ]}; try { diff --git a/client/components/Reader/LoaderPage/LoaderPage.vue b/client/components/Reader/LoaderPage/LoaderPage.vue index 874b8ddb..34eb7cc4 100644 --- a/client/components/Reader/LoaderPage/LoaderPage.vue +++ b/client/components/Reader/LoaderPage/LoaderPage.vue @@ -21,7 +21,12 @@ - +