🔢 Bumped up ui-typings version
This commit is contained in:
14
package-lock.json
generated
14
package-lock.json
generated
@@ -41,7 +41,7 @@
|
||||
"sharp": "^0.28.1",
|
||||
"socket.io": "^4.3.1",
|
||||
"socket.io-stream": "^0.5.3",
|
||||
"threetwo-ui-typings": "^1.0.10",
|
||||
"threetwo-ui-typings": "^1.0.11",
|
||||
"typescript": "^3.8.3",
|
||||
"unrar": "^0.2.0",
|
||||
"xml2js": "^0.4.23"
|
||||
@@ -13751,9 +13751,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/threetwo-ui-typings": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.10.tgz",
|
||||
"integrity": "sha512-4FKd/Oq6wVgQZmgFErZ4/zIjp+T3UbV9zkVbgTqSyCsIu9MPXKAgHvfZaiV7TU05MCjuiaPJ+9XuUjtBrP6ixQ==",
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.11.tgz",
|
||||
"integrity": "sha512-jRI1rUttoJDqsKFUPd4MM56NErftl2NSEo8MkeqllOtVf38Wy+wVvAT+OW6AoSguA5cLxSpOiA25c31FWjOvOw==",
|
||||
"dependencies": {
|
||||
"typescript": "^4.3.2"
|
||||
}
|
||||
@@ -25115,9 +25115,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"threetwo-ui-typings": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.10.tgz",
|
||||
"integrity": "sha512-4FKd/Oq6wVgQZmgFErZ4/zIjp+T3UbV9zkVbgTqSyCsIu9MPXKAgHvfZaiV7TU05MCjuiaPJ+9XuUjtBrP6ixQ==",
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.11.tgz",
|
||||
"integrity": "sha512-jRI1rUttoJDqsKFUPd4MM56NErftl2NSEo8MkeqllOtVf38Wy+wVvAT+OW6AoSguA5cLxSpOiA25c31FWjOvOw==",
|
||||
"requires": {
|
||||
"typescript": "^4.3.2"
|
||||
},
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"sharp": "^0.28.1",
|
||||
"socket.io": "^4.3.1",
|
||||
"socket.io-stream": "^0.5.3",
|
||||
"threetwo-ui-typings": "^1.0.10",
|
||||
"threetwo-ui-typings": "^1.0.11",
|
||||
"typescript": "^3.8.3",
|
||||
"unrar": "^0.2.0",
|
||||
"xml2js": "^0.4.23"
|
||||
|
||||
@@ -21,27 +21,22 @@ export default class SettingsService extends Service {
|
||||
{
|
||||
name: "settings",
|
||||
mixins: [DbMixin("settings", Settings)],
|
||||
settings: {
|
||||
|
||||
},
|
||||
settings: {},
|
||||
hooks: {},
|
||||
actions: {
|
||||
getSettings: {
|
||||
rest: "GET /getAllSettings",
|
||||
params: {},
|
||||
async handler(ctx: Context<{}>) {
|
||||
getSettings: {
|
||||
rest: "GET /getAllSettings",
|
||||
params: {},
|
||||
async handler(ctx: Context<{}>) {},
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
saveSettings: {
|
||||
rest: "POST /saveSettings",
|
||||
params: {},
|
||||
async handler(ctx: Context<{}>) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
saveSettings: {
|
||||
rest: "POST /saveSettings",
|
||||
params: {},
|
||||
async handler(ctx: Context<{}>) {
|
||||
console.log(ctx.params);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
},
|
||||
|
||||
@@ -84,11 +84,12 @@ export const extractCoverFromFile = async (
|
||||
let result: string;
|
||||
const targetCoverImageFilePath = path.resolve(
|
||||
constructedPaths.targetPath +
|
||||
"/" +
|
||||
walkedFolder.name +
|
||||
"_cover.jpg"
|
||||
"/" +
|
||||
walkedFolder.name +
|
||||
"_cover.jpg"
|
||||
);
|
||||
const ebookMetaPath = `${process.env.CALIBRE_EBOOK_META_PATH}` || `ebook-meta`;
|
||||
const ebookMetaPath =
|
||||
`${process.env.CALIBRE_EBOOK_META_PATH}` || `ebook-meta`;
|
||||
result = await calibre.run(
|
||||
ebookMetaPath,
|
||||
[constructedPaths.inputFilePath],
|
||||
@@ -116,7 +117,6 @@ export const extractCoverFromFile = async (
|
||||
extension: path.extname(constructedPaths.inputFilePath),
|
||||
cover: {
|
||||
filePath: renditionPath,
|
||||
stats,
|
||||
},
|
||||
containedIn: walkedFolder.containedIn,
|
||||
calibreMetadata: {
|
||||
@@ -138,11 +138,11 @@ export const unrarArchive = async (
|
||||
mode: 0o2775,
|
||||
};
|
||||
|
||||
const fileBuffer = await fse.readFile(filePath).catch((err) =>
|
||||
console.error("Failed to read file", err)
|
||||
);
|
||||
const fileBuffer = await fse
|
||||
.readFile(filePath)
|
||||
.catch((err) => console.error("Failed to read file", err));
|
||||
try {
|
||||
logger.info("Unrar initiating.")
|
||||
logger.info("Unrar initiating.");
|
||||
await fse.ensureDir(options.targetExtractionFolder, directoryOptions);
|
||||
logger.info(`${options.targetExtractionFolder} was created.`);
|
||||
|
||||
@@ -152,20 +152,15 @@ export const unrarArchive = async (
|
||||
const files = extractor.extract({});
|
||||
const extractedFiles = [...files.files];
|
||||
for (const file of extractedFiles) {
|
||||
logger.info(
|
||||
`Attempting to write ${file.fileHeader.name}`
|
||||
);
|
||||
logger.info(`Attempting to write ${file.fileHeader.name}`);
|
||||
const fileBuffer = file.extraction;
|
||||
const fileName = explodePath(
|
||||
file.fileHeader.name
|
||||
).fileName;
|
||||
const fileName = explodePath(file.fileHeader.name).fileName;
|
||||
// resize image
|
||||
await resizeImage(
|
||||
fileBuffer,
|
||||
path.resolve(options.targetExtractionFolder + "/" + fileName),
|
||||
200
|
||||
);
|
||||
|
||||
}
|
||||
// walk the newly created folder and return results
|
||||
return await walkFolder(options.targetExtractionFolder, [
|
||||
@@ -173,7 +168,6 @@ export const unrarArchive = async (
|
||||
".png",
|
||||
".jpeg",
|
||||
]);
|
||||
|
||||
} catch (error) {
|
||||
logger.error(`${error}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user