diff --git a/src/core/Recipe.mjs b/src/core/Recipe.mjs index 14792157..006e431c 100755 --- a/src/core/Recipe.mjs +++ b/src/core/Recipe.mjs @@ -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; diff --git a/src/core/config/OperationConfig.json b/src/core/config/OperationConfig.json index 63e17ea5..ed42bcbb 100644 --- a/src/core/config/OperationConfig.json +++ b/src/core/config/OperationConfig.json @@ -227,7 +227,7 @@ ] }, "Raw Deflate": { - "module": "Default", + "module": "Compression", "description": "Compresses data using the deflate algorithm with no headers.", "inputType": "byteArray", "outputType": "byteArray", diff --git a/src/core/config/modules/Compression.mjs b/src/core/config/modules/Compression.mjs index 241f278b..61b2ed2d 100644 --- a/src/core/config/modules/Compression.mjs +++ b/src/core/config/modules/Compression.mjs @@ -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, diff --git a/src/core/config/modules/Default.mjs b/src/core/config/modules/Default.mjs index d41cde05..8d1469d7 100644 --- a/src/core/config/modules/Default.mjs +++ b/src/core/config/modules/Default.mjs @@ -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, diff --git a/src/core/operations/RawDeflate.mjs b/src/core/operations/RawDeflate.mjs index 921d04fd..a1a30981 100644 --- a/src/core/operations/RawDeflate.mjs +++ b/src/core/operations/RawDeflate.mjs @@ -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";