From 343d3ef96aca070bd40e75095313acca39e18527 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Mon, 10 Feb 2020 14:29:55 -0700 Subject: [PATCH] update --- node_modules/async-neocities-tmp/index.js | 21 +++++++------------ node_modules/async-neocities-tmp/package.json | 20 +++++++++--------- package.json | 2 +- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/node_modules/async-neocities-tmp/index.js b/node_modules/async-neocities-tmp/index.js index d222829..d596d52 100644 --- a/node_modules/async-neocities-tmp/index.js +++ b/node_modules/async-neocities-tmp/index.js @@ -153,23 +153,18 @@ class NeocitiesAPIClient { statsCb: () => {}, ...opts } - const getRemoteFiles = this.list() - const [localFiles, remoteFiles] = Promise.all([ - afw.allFiles(path.join(folder), { shaper: f => f }), - getRemoteFiles + + const [localFiles, remoteFiles] = await Promise.all([ + afw.allFiles(folder, { shaper: f => f }), + this.list() ]) - const { filesToUpload, filesToDelete, filesSkipped } = await neocitiesLocalDiff(remoteFiles, localFiles) + const { filesToUpload, filesToDelete, filesSkipped } = await neocitiesLocalDiff(remoteFiles.files, localFiles) opts.statsCb({ filesToUpload, filesToDelete, filesSkipped }) - const work = [] - const uploadJob = this.upload(filesToUpload) - work.push(uploadJob) - if (opts.cleanup) { - const deleteJob = this.delete(filesToDelete) - work.push(deleteJob) - } + const work = [this.upload(filesToUpload)] + if (opts.cleanup) { work.push(this.delete(filesToDelete)) } - await work + await Promise.all(work) return { filesToUpload, filesToDelete, filesSkipped } } diff --git a/node_modules/async-neocities-tmp/package.json b/node_modules/async-neocities-tmp/package.json index e8b58e0..81f9a55 100644 --- a/node_modules/async-neocities-tmp/package.json +++ b/node_modules/async-neocities-tmp/package.json @@ -1,26 +1,26 @@ { - "_from": "async-neocities-tmp@0.0.5", - "_id": "async-neocities-tmp@0.0.5", + "_from": "async-neocities-tmp@0.0.8", + "_id": "async-neocities-tmp@0.0.8", "_inBundle": false, - "_integrity": "sha512-jEu2qT3rpMa7P+aRHdhnF7lNBHJJpV+Bf3FoypIqSNn0gCi1FG+0ujsZ8eMbR/k0hu709Ar4r6WaVGDvp3npYQ==", + "_integrity": "sha512-7WRDMN4/h+OkOiTzX7NC9pmx8OJL2e/bwwAH6EUHAQLhled7a9NrIXw1hV+sZMVWH3NhmpPxWr6nfGEqmtE2GA==", "_location": "/async-neocities-tmp", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "async-neocities-tmp@0.0.5", + "raw": "async-neocities-tmp@0.0.8", "name": "async-neocities-tmp", "escapedName": "async-neocities-tmp", - "rawSpec": "0.0.5", + "rawSpec": "0.0.8", "saveSpec": null, - "fetchSpec": "0.0.5" + "fetchSpec": "0.0.8" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/async-neocities-tmp/-/async-neocities-tmp-0.0.5.tgz", - "_shasum": "dca9ee7fbb2847aebc29d3cb6e4981845abaca39", - "_spec": "async-neocities-tmp@0.0.5", + "_resolved": "https://registry.npmjs.org/async-neocities-tmp/-/async-neocities-tmp-0.0.8.tgz", + "_shasum": "9b7a2a7bd8df8fc1c868f5a69013b4125b247b5d", + "_spec": "async-neocities-tmp@0.0.8", "_where": "/Users/bret/repos/deploy-to-neocities", "author": { "name": "Bret Comnes", @@ -68,5 +68,5 @@ "dist" ] }, - "version": "0.0.5" + "version": "0.0.8" } diff --git a/package.json b/package.json index 16c0182..b1e5e89 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@actions/core": "1.2.2", "@actions/github": "2.1.0", - "async-neocities-tmp": "0.0.5" + "async-neocities-tmp": "0.0.8" }, "standard": { "ignore": [