diff --git a/CHANGELOG.md b/CHANGELOG.md index 3663c2f..1a54aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## 0.0.1 - 2020-02-12 +## [v0.0.2](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.1...v0.0.2) - 2020-02-13 + +### Commits + +- bug: Fix some logging bugs and add output [`d9fb789`](https://github.com/bcomnes/deploy-to-neocities/commit/d9fb7899eb50b3386f9f99653b76999419f30a5d) + +## v0.0.1 - 2020-02-12 ### Commits diff --git a/node_modules/async-neocities/CHANGELOG.md b/node_modules/async-neocities/CHANGELOG.md index 457dd8e..06bc357 100644 --- a/node_modules/async-neocities/CHANGELOG.md +++ b/node_modules/async-neocities/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [v1.0.1](https://github.com/bcomnes/async-neocities/compare/v1.0.0...v1.0.1) - 2020-02-13 + +### Commits + +- bug: Fix a number of logging bugs [`96fbea2`](https://github.com/bcomnes/async-neocities/commit/96fbea2bbd27ba1ac5105fce37e624d804dcbdb6) + ## [v1.0.0](https://github.com/bcomnes/async-neocities/compare/v0.0.10...v1.0.0) - 2020-02-12 ### Commits diff --git a/node_modules/async-neocities/index.js b/node_modules/async-neocities/index.js index fda0bc8..6060d14 100644 --- a/node_modules/async-neocities/index.js +++ b/node_modules/async-neocities/index.js @@ -277,7 +277,7 @@ class NeocitiesAPIClient { for await (const file of iterator) { localFiles.push(file) localScan.numberOfFiles += 1 - localScan.totalSize += file.stat.blksize + localScan.totalSize += file.stat.size sendInspectionUpdate(PROGRESS) } return localFiles @@ -291,7 +291,7 @@ class NeocitiesAPIClient { // Inspection stage finalizer const [localFiles, remoteFiles] = await Promise.all([ localScanJob, - this.list().then(res => res.files) + remoteScanJob.then(res => res.files) ]) inspectionStats.timer.stop() sendInspectionUpdate(STOP) @@ -315,6 +315,7 @@ class NeocitiesAPIClient { const { tasks: { diffing } } = diffingStats const { filesToUpload, filesToDelete, filesSkipped } = await neocitiesLocalDiff(remoteFiles, localFiles) + diffingStats.timer.stop() diffingStats.status = STOP diffing.uploadCount = filesToUpload.length @@ -353,7 +354,7 @@ class NeocitiesAPIClient { }, skippedFiles: { count: filesSkipped.length, - size: filesSkipped.reduce((accum, file) => accum + file.stat.blksize, 0) + size: filesSkipped.reduce((accum, file) => accum + file.stat.size, 0) } } } diff --git a/node_modules/async-neocities/lib/progress.js b/node_modules/async-neocities/lib/progress.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/async-neocities/package.json b/node_modules/async-neocities/package.json index b41a6b6..531e190 100644 --- a/node_modules/async-neocities/package.json +++ b/node_modules/async-neocities/package.json @@ -1,26 +1,26 @@ { - "_from": "async-neocities@1.0.0", - "_id": "async-neocities@1.0.0", + "_from": "async-neocities@1.0.1", + "_id": "async-neocities@1.0.1", "_inBundle": false, - "_integrity": "sha512-iRdvlFfyyqS390fGzs/FJOFG5izOJFVG/0w/xRoqZ6ochmjkxiByp16zjBb1Ade5lvXuKTuBdM/sdqmIQvWe5w==", + "_integrity": "sha512-5TVaKLYKnaHoSiluCP0i78e0CBZbeqBL6bgK8/QsM8YOAtrhd5JO9c5DEaW4SFpmf4wV0qcamQXh0A3C7CANLw==", "_location": "/async-neocities", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "async-neocities@1.0.0", + "raw": "async-neocities@1.0.1", "name": "async-neocities", "escapedName": "async-neocities", - "rawSpec": "1.0.0", + "rawSpec": "1.0.1", "saveSpec": null, - "fetchSpec": "1.0.0" + "fetchSpec": "1.0.1" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/async-neocities/-/async-neocities-1.0.0.tgz", - "_shasum": "cdb2d2c4f3a431ab2aba7982693f8922f94d4360", - "_spec": "async-neocities@1.0.0", + "_resolved": "https://registry.npmjs.org/async-neocities/-/async-neocities-1.0.1.tgz", + "_shasum": "3428ae48f48104b205a3537212090b00d9bbce45", + "_spec": "async-neocities@1.0.1", "_where": "/Users/bret/repos/deploy-to-neocities", "author": { "name": "Bret Comnes", @@ -79,5 +79,5 @@ "dist" ] }, - "version": "1.0.0" + "version": "1.0.1" } diff --git a/node_modules/async-neocities/test.js b/node_modules/async-neocities/test.js index e79d021..0dd6e80 100644 --- a/node_modules/async-neocities/test.js +++ b/node_modules/async-neocities/test.js @@ -87,18 +87,18 @@ if (!fakeToken) { tap.test('can deploy folders', async t => { const client = new NeocitiesAPIClient(token) - // const statsCb = (stats) => { - // let logLine = `${stats.stage} ${stats.status} ${stats.timer.elapsed}` - // Object.entries(stats.tasks).forEach(([key, val]) => { - // logLine += ` ${key}: ${JSON.stringify(val)}` - // }) - // console.log(logLine) - // } + const statsCb = (stats) => { + let logLine = `${stats.stage} ${stats.status} ${stats.timer.elapsed}` + Object.entries(stats.tasks).forEach(([key, val]) => { + logLine += ` ${key}: ${JSON.stringify(val)}` + }) + console.log(logLine) + } const deployStats = await client.deploy( resolve(__dirname, 'fixtures'), { - // statsCb, + statsCb, cleanup: false } ) @@ -110,7 +110,7 @@ if (!fakeToken) { const redeployStats = await client.deploy( resolve(__dirname, 'fixtures'), { - // statsCb, + statsCb, cleanup: false } ) @@ -122,7 +122,7 @@ if (!fakeToken) { const cleanupStats = await client.deploy( resolve(__dirname, 'fixtures/empty'), { - // statsCb, + statsCb, cleanup: true } ) diff --git a/package.json b/package.json index 20358be..3efbfd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deploy-to-neocities", - "version": "0.0.1", + "version": "0.0.2", "description": "Github Action to deplpoy a folder to Neocities.org", "main": "index.js", "private": true,