diff --git a/Gruntfile.js b/Gruntfile.js index 3193feca..a14c3001 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -200,7 +200,7 @@ module.exports = function (grunt) { }, moduleEntryPoints), output: { path: __dirname + "/build/prod", - globalObject: "this" + // globalObject: "this" }, resolve: { alias: { @@ -366,7 +366,7 @@ module.exports = function (grunt) { } }, output: { - globalObject: "this", + // globalObject: "this", }, plugins: [ new webpack.DefinePlugin(BUILD_CONSTANTS), diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index efd57acd..c4cd14ab 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -9,8 +9,6 @@ import {fromBase64, toBase64} from "./lib/Base64"; import {fromHex} from "./lib/Hex"; import {fromDecimal} from "./lib/Decimal"; import {fromBinary} from "./lib/Binary"; -import { fstat } from "fs"; - /** * Utility functions for use in operations, the core framework and the stage. diff --git a/src/core/config/scripts/generateOpsIndex.mjs b/src/core/config/scripts/generateOpsIndex.mjs index 6038656f..49cd635c 100644 --- a/src/core/config/scripts/generateOpsIndex.mjs +++ b/src/core/config/scripts/generateOpsIndex.mjs @@ -24,7 +24,7 @@ if (!fs.existsSync(dir)) { // Find all operation files const opObjs = []; fs.readdirSync(path.join(dir, "../operations")).forEach(file => { - if (!file.endsWith(".mjs") || file === "index.mjs" || file === "DetectFileType.mjs" || file === "Fork.mjs" || file === "GenerateQRCode.mjs" || file === "Magic.mjs" || file === "ParseQRCode.mjs" || file === "PlayMedia.mjs" || file === "RenderImage.mjs" || file === "ScanForEmbeddedFiles.mjs" || file === "SplitColourChannels.mjs") return; + if (!file.endsWith(".mjs") || file === "index.mjs") return; opObjs.push(file.split(".mjs")[0]); }); diff --git a/src/core/operations/Tar.mjs b/src/core/operations/Tar.mjs index 6e2334b8..84674bff 100644 --- a/src/core/operations/Tar.mjs +++ b/src/core/operations/Tar.mjs @@ -132,8 +132,6 @@ class Tar extends Operation { tarball.writeBytes(input); tarball.writeEndBlocks(); - console.log("here"); - return new File([new Uint8Array(tarball.bytes)], args[0]); } diff --git a/src/core/operations/Untar.mjs b/src/core/operations/Untar.mjs index c69aa771..af029184 100644 --- a/src/core/operations/Untar.mjs +++ b/src/core/operations/Untar.mjs @@ -131,7 +131,6 @@ class Untar extends Operation { * @returns {html} */ async present(files) { - console.log("err...."); return await Utils.displayFilesAsHTML(files); } diff --git a/tests/node/tests/nodeApi.mjs b/tests/node/tests/nodeApi.mjs index fc5f01b9..11361893 100644 --- a/tests/node/tests/nodeApi.mjs +++ b/tests/node/tests/nodeApi.mjs @@ -160,9 +160,9 @@ TestRegister.addApiTests([ assert(chef.bake); }), - it("chef.bake: should return SyncDish", () => { + it("chef.bake: should return NodeDish", () => { const result = chef.bake("input", "to base 64"); - assert(result instanceof SyncDish); + assert(result instanceof NodeDish); }), it("chef.bake: should take an input and an op name and perform it", () => { @@ -222,7 +222,7 @@ TestRegister.addApiTests([ it("chef.bake: if recipe is empty array, return input as dish", () => { const result = chef.bake("some input", []); assert.strictEqual(result.toString(), "some input"); - assert(result instanceof SyncDish, "Result is not instance of SyncDish"); + assert(result instanceof NodeDish, "Result is not instance of NodeDish"); }), it("chef.bake: accepts an array of operations as recipe", () => { @@ -332,7 +332,7 @@ TestRegister.addApiTests([ it("Composable Dish: composed function returns another dish", () => { const result = new Dish("some input").apply(toBase32); - assert.ok(result instanceof SyncDish); + assert.ok(result instanceof NodeDish); }),