Quick fix for empty recipe error. Changed deflate back to compression module

This commit is contained in:
d98762625 2018-04-09 15:21:09 +01:00
parent 76f27dbcdb
commit bbc580e71b
5 changed files with 9 additions and 7 deletions

View File

@ -189,9 +189,11 @@ class Recipe {
}
// Present the results of the final operation
// TODO try/catch
output = await lastRunOp.present(output);
dish.set(output, lastRunOp.presentType);
if (lastRunOp) {
// TODO try/catch
output = await lastRunOp.present(output);
dish.set(output, lastRunOp.presentType);
}
log.debug("Recipe complete");
return this.opList.length;

View File

@ -227,7 +227,7 @@
]
},
"Raw Deflate": {
"module": "Default",
"module": "Compression",
"description": "Compresses data using the deflate algorithm with no headers.",
"inputType": "byteArray",
"outputType": "byteArray",

View File

@ -7,6 +7,7 @@
*/
import Gunzip from "../../operations/Gunzip";
import Gzip from "../../operations/Gzip";
import RawDeflate from "../../operations/RawDeflate";
import RawInflate from "../../operations/RawInflate";
import Unzip from "../../operations/Unzip";
import Zip from "../../operations/Zip";
@ -18,6 +19,7 @@ const OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
OpModules.Compression = {
"Gunzip": Gunzip,
"Gzip": Gzip,
"Raw Deflate": RawDeflate,
"Raw Inflate": RawInflate,
"Unzip": Unzip,
"Zip": Zip,

View File

@ -12,7 +12,6 @@ import FromHex from "../../operations/FromHex";
import PowerSet from "../../operations/PowerSet";
import ROT13 from "../../operations/ROT13";
import ROT47 from "../../operations/ROT47";
import RawDeflate from "../../operations/RawDeflate";
import RotateLeft from "../../operations/RotateLeft";
import RotateRight from "../../operations/RotateRight";
import SetDifference from "../../operations/SetDifference";
@ -34,7 +33,6 @@ OpModules.Default = {
"Power Set": PowerSet,
"ROT13": ROT13,
"ROT47": ROT47,
"Raw Deflate": RawDeflate,
"Rotate left": RotateLeft,
"Rotate right": RotateRight,
"Set Difference": SetDifference,

View File

@ -28,7 +28,7 @@ class RawDeflate extends Operation {
super();
this.name = "Raw Deflate";
this.module = "Default";
this.module = "Compression";
this.description = "Compresses data using the deflate algorithm with no headers.";
this.inputType = "byteArray";
this.outputType = "byteArray";