🐛 Bugs
This commit is contained in:
@@ -27,13 +27,14 @@
|
||||
"express": "^4.17.1",
|
||||
"express-paginate": "^1.0.2",
|
||||
"fs-extra": "^9.1.0",
|
||||
"highland": "^2.13.5",
|
||||
"imghash": "^0.0.8",
|
||||
"mongoose": "^5.10.11",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-hooks-worker": "^1.0.0",
|
||||
"sharp": "^0.28.1",
|
||||
"stream-json": "^1.7.1"
|
||||
"streammagic": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.13.10",
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import router from "../router";
|
||||
import { default as paginate } from "express-paginate";
|
||||
import { walkFolder, extractArchive, getCovers } from "../../utils/fs.utils";
|
||||
import _ from "lodash";
|
||||
import { IExtractionOptions } from "../../interfaces/folder.interface";
|
||||
import { Request, Response } from "express";
|
||||
const H = require("highland");
|
||||
import _ from "lodash";
|
||||
const toStream = require("streammagic").toStream;
|
||||
require("streammagic")();
|
||||
|
||||
router.route("/getComicCovers").post(async (req: Request, res: Response) => {
|
||||
typeof req.body.extractionOptions === "object"
|
||||
@@ -13,7 +16,14 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
|
||||
req.body.extractionOptions,
|
||||
req.body.walkedFolders,
|
||||
);
|
||||
return res.json(foo);
|
||||
let jsonStr;
|
||||
// For each page of data you get, loop over the items like you say
|
||||
_.each(foo, (item) => {
|
||||
_.each(item, (subItem) => {
|
||||
jsonStr = JSON.stringify(subItem) + "\n";
|
||||
toStream(jsonStr).pipe(res); // Assuming 'res' is the Express response object
|
||||
});
|
||||
});
|
||||
// if (
|
||||
// _.isArray(foo) &&
|
||||
// !_.isUndefined(req.body.extractionOptions.paginationOptions.pageLimit)
|
||||
|
||||
22
yarn.lock
22
yarn.lock
@@ -5993,6 +5993,13 @@ he@^1.2.0:
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
||||
|
||||
highland@^2.13.5:
|
||||
version "2.13.5"
|
||||
resolved "https://registry.yarnpkg.com/highland/-/highland-2.13.5.tgz#d55cd8ac3f67a00fad79918668d51493222cfcc2"
|
||||
integrity sha512-dn2flPapIIAa4BtkB2ahjshg8iSJtrJtdhEb9/oiOrS5HMQTR/GuhFpqJ+11YBdtnl3AwWKvbZd1Uxr8uAmA7A==
|
||||
dependencies:
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
history@^4.9.0:
|
||||
version "4.10.1"
|
||||
resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3"
|
||||
@@ -11212,17 +11219,10 @@ stealthy-require@^1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
|
||||
integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
|
||||
|
||||
stream-chain@^2.2.3:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.4.tgz#2e5e9858e00d25ebaf7e4339e8328ddcab5facad"
|
||||
integrity sha512-9lsl3YM53V5N/I1C2uJtc3Kavyi3kNYN83VkKb/bMWRk7D9imiFyUPYa0PoZbLohSVOX1mYE9YsmwObZUsth6Q==
|
||||
|
||||
stream-json@^1.7.1:
|
||||
version "1.7.1"
|
||||
resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.7.1.tgz#ec7e414c2eba456c89a4b4e5223794eabc3860c4"
|
||||
integrity sha512-I7g0IDqvdJXbJ279/D3ZoTx0VMhmKnEF7u38CffeWdF8bfpMPsLo+5fWnkNjO2GU/JjWaRjdH+zmH03q+XGXFw==
|
||||
dependencies:
|
||||
stream-chain "^2.2.3"
|
||||
streammagic@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/streammagic/-/streammagic-1.0.0.tgz#bcee7ef777e0b55ef937b87903f1cef65d14510f"
|
||||
integrity sha1-vO5+93fgtV75N7h5A/HO9l0UUQ8=
|
||||
|
||||
streamz@~1.8.10:
|
||||
version "1.8.12"
|
||||
|
||||
Reference in New Issue
Block a user