From cbf53ec34fee9b7d9234a7bbfc276592d9e076a5 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 28 Oct 2024 12:21:42 +0000 Subject: [PATCH] fix for running under CLI --- lib/apploader.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/apploader.js b/lib/apploader.js index 0080fe3..7534c0f 100644 --- a/lib/apploader.js +++ b/lib/apploader.js @@ -90,7 +90,7 @@ function fileGetter(url) { var f = url.slice(0,-5); console.log("MINIFYING JSON "+f); var j = eval("("+require("fs").readFileSync(url).toString("binary")+")"); - data = JSON.stringify(j); + data = JSON.stringify(j); // FIXME we can do better for Espruino } else { var blob = require("fs").readFileSync(url); if (url.endsWith(".js") || url.endsWith(".json")) @@ -117,7 +117,8 @@ exports.getAppFiles = function(app) { app.files = app.files.split(",").concat(app.provides_modules).join(","); } return AppInfo.getFiles(app, getFileOptions).then(files => { allFiles = allFiles.concat(files); return app; }); - } + }, + showQuery : () => Promise.resolve() }; return AppInfo.checkDependencies(app, device, uploadOptions). then(() => AppInfo.getFiles(app, getFileOptions)).