From 919aa48227631bec482d9f419cc1b37e700a97b3 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Sun, 10 Nov 2019 16:01:28 +0100 Subject: [PATCH 1/2] Fix main.js for node10 --- infra/default.nix | 2 +- infra/main.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/infra/default.nix b/infra/default.nix index a8b980533..4e8f015f4 100644 --- a/infra/default.nix +++ b/infra/default.nix @@ -22,7 +22,7 @@ rec function-unsplash = pkgs.runCommand "build-lambda" {} '' - cp ${pkgs.wai-lambda.wai-lambda-js-wrapper} main.js + cp ${./main.js} main.js # Can't be called 'main' otherwise lambda tries to load it cp "${unsplashProxy}/bin/unsplash-proxy" main_hs mkdir $out diff --git a/infra/main.js b/infra/main.js index e5cd676c9..db79a02f1 100644 --- a/infra/main.js +++ b/infra/main.js @@ -89,10 +89,8 @@ exports.handler = function(event, context, callback) { // Clean up the directory and finally reply console.log("cleaning up"); - fs.unlink(responseFile, (err) => { - if (err) throw err; - fs.rmdir(responseDir); - }); + fs.unlinkSync(responseFile); + fs.rmdirSync(responseDir); callback(null, response); } }); From 0414b55d2848927a6ea39c0d4d282c373d9978bf Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Sun, 10 Nov 2019 16:01:35 +0100 Subject: [PATCH 2/2] infra: update starter kit --- infra/nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infra/nix/sources.json b/infra/nix/sources.json index 7c4a91d76..a219830f0 100644 --- a/infra/nix/sources.json +++ b/infra/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://deckdeckgo.com", "owner": "deckgo", "repo": "deckdeckgo-starter", - "rev": "c65d6cd671d0a08227425a19d94767a9816efadf", - "sha256": "1s5r59wisgk807dnp75la26xddp0p4snq5iyrl6d0wdbyshl4wb8", + "rev": "c4d156e886ba1f7292fc4078d2828c40ba510371", + "sha256": "0cssx2bwmh64d4jg4zqi5rlh63vxg92q3wlx5d1y1ff4ij2bbmmn", "type": "tarball", - "url": "https://github.com/deckgo/deckdeckgo-starter/archive/c65d6cd671d0a08227425a19d94767a9816efadf.tar.gz", + "url": "https://github.com/deckgo/deckdeckgo-starter/archive/c4d156e886ba1f7292fc4078d2828c40ba510371.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "elasticmq": {