Skip to content

Commit bbc580e

Browse files
committed
Quick fix for empty recipe error. Changed deflate back to compression module
1 parent 76f27db commit bbc580e

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/core/Recipe.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ class Recipe {
189189
}
190190

191191
// Present the results of the final operation
192-
// TODO try/catch
193-
output = await lastRunOp.present(output);
194-
dish.set(output, lastRunOp.presentType);
192+
if (lastRunOp) {
193+
// TODO try/catch
194+
output = await lastRunOp.present(output);
195+
dish.set(output, lastRunOp.presentType);
196+
}
195197

196198
log.debug("Recipe complete");
197199
return this.opList.length;

src/core/config/OperationConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
]
228228
},
229229
"Raw Deflate": {
230-
"module": "Default",
230+
"module": "Compression",
231231
"description": "Compresses data using the deflate algorithm with no headers.",
232232
"inputType": "byteArray",
233233
"outputType": "byteArray",

src/core/config/modules/Compression.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
import Gunzip from "../../operations/Gunzip";
99
import Gzip from "../../operations/Gzip";
10+
import RawDeflate from "../../operations/RawDeflate";
1011
import RawInflate from "../../operations/RawInflate";
1112
import Unzip from "../../operations/Unzip";
1213
import Zip from "../../operations/Zip";
@@ -18,6 +19,7 @@ const OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
1819
OpModules.Compression = {
1920
"Gunzip": Gunzip,
2021
"Gzip": Gzip,
22+
"Raw Deflate": RawDeflate,
2123
"Raw Inflate": RawInflate,
2224
"Unzip": Unzip,
2325
"Zip": Zip,

src/core/config/modules/Default.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import FromHex from "../../operations/FromHex";
1212
import PowerSet from "../../operations/PowerSet";
1313
import ROT13 from "../../operations/ROT13";
1414
import ROT47 from "../../operations/ROT47";
15-
import RawDeflate from "../../operations/RawDeflate";
1615
import RotateLeft from "../../operations/RotateLeft";
1716
import RotateRight from "../../operations/RotateRight";
1817
import SetDifference from "../../operations/SetDifference";
@@ -34,7 +33,6 @@ OpModules.Default = {
3433
"Power Set": PowerSet,
3534
"ROT13": ROT13,
3635
"ROT47": ROT47,
37-
"Raw Deflate": RawDeflate,
3836
"Rotate left": RotateLeft,
3937
"Rotate right": RotateRight,
4038
"Set Difference": SetDifference,

src/core/operations/RawDeflate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RawDeflate extends Operation {
2828
super();
2929

3030
this.name = "Raw Deflate";
31-
this.module = "Default";
31+
this.module = "Compression";
3232
this.description = "Compresses data using the deflate algorithm with no headers.";
3333
this.inputType = "byteArray";
3434
this.outputType = "byteArray";

0 commit comments

Comments
 (0)