Compare commits

...

13 Commits

Author SHA1 Message Date
Bret Comnes
c50fdeb3e6 0.0.7 2020-02-13 11:39:55 -07:00
Bret Comnes
48d2e5e4e0 refactor: Remove core calls 2020-02-13 11:39:13 -07:00
Bret Comnes
aaf8a90973 0.0.6 2020-02-13 11:29:33 -07:00
Bret Comnes
34601c4927 bug: update async-neocities to 1.1.2 2020-02-13 11:28:52 -07:00
Bret Comnes
ce8f0e70b0 0.0.5 2020-02-13 11:23:24 -07:00
Bret Comnes
22ef26e851 bug: Use correct version of async-neocities 2020-02-13 11:22:49 -07:00
Bret Comnes
b96571b8ad 0.0.4 2020-02-13 11:19:56 -07:00
Bret Comnes
bc86874ede refactor: Dramatically simplify logging 2020-02-13 11:19:17 -07:00
Bret Comnes
4a9e7f6a6d 0.0.3 2020-02-12 21:18:23 -07:00
Bret Comnes
2c52eeaa2b bug: Fix reference bug in logging 2020-02-12 21:17:13 -07:00
Bret Comnes
19246fac79 Fix boolean parsing 2020-02-12 21:14:59 -07:00
Bret Comnes
dda8316219 0.0.2 2020-02-12 21:01:52 -07:00
Bret Comnes
d9fb7899eb bug: Fix some logging bugs and add output 2020-02-12 21:00:58 -07:00
13 changed files with 214 additions and 284 deletions

View File

@@ -7,7 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## 0.0.1 - 2020-02-12 ## [v0.0.7](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.6...v0.0.7) - 2020-02-13
### Commits
- refactor: Remove core calls [`48d2e5e`](https://github.com/bcomnes/deploy-to-neocities/commit/48d2e5e4e064176c8c4d27eddea40d0009446dba)
## [v0.0.6](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.5...v0.0.6) - 2020-02-13
### Commits
- bug: update async-neocities to 1.1.2 [`34601c4`](https://github.com/bcomnes/deploy-to-neocities/commit/34601c49277891d15395a79b28eeb21781a019da)
## [v0.0.5](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.4...v0.0.5) - 2020-02-13
### Commits
- bug: Use correct version of async-neocities [`22ef26e`](https://github.com/bcomnes/deploy-to-neocities/commit/22ef26e851efa57357d731a73a1f606dc212608a)
## [v0.0.4](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.3...v0.0.4) - 2020-02-13
### Commits
- refactor: Dramatically simplify logging [`bc86874`](https://github.com/bcomnes/deploy-to-neocities/commit/bc86874ede188f9c33f0b6dfd2e54b25328b1285)
## [v0.0.3](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.2...v0.0.3) - 2020-02-13
### Commits
- Fix boolean parsing [`19246fa`](https://github.com/bcomnes/deploy-to-neocities/commit/19246fac798151a3ab80666412f72394c0615c32)
- bug: Fix reference bug in logging [`2c52eea`](https://github.com/bcomnes/deploy-to-neocities/commit/2c52eeaa2badbb1bcb3c2520e358fcc088bc3879)
## [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 ### Commits

View File

@@ -4,10 +4,10 @@ branding:
icon: cat icon: cat
color: yellow color: yellow
inputs: inputs:
api-token: # api token for site to deploy to apiToken: # api token for site to deploy to
description: 'Neocities API token for site to deploy to' description: 'Neocities API token for site to deploy to'
required: true required: true
dist-dir: distDir:
description: 'Local folder to deploy to neocities' description: 'Local folder to deploy to neocities'
default: 'public' default: 'public'
required: true required: true

View File

@@ -3,99 +3,29 @@ const core = require('@actions/core')
const Neocities = require('async-neocities') const Neocities = require('async-neocities')
const path = require('path') const path = require('path')
const prettyTime = require('pretty-time') const prettyTime = require('pretty-time')
const prettyBytes = require('pretty-bytes') const assert = require('nanoassert')
async function doDeploy () { async function doDeploy () {
const token = core.getInput('api-token') const token = core.getInput('apiToken')
const distDir = path.join(process.cwd(), core.getInput('dist-dir')) const distDir = path.join(process.cwd(), core.getInput('distDir'))
const cleanup = core.getInput('cleanup') const cleanup = JSON.parse(core.getInput('cleanup'))
assert(typeof cleanup === 'boolean', 'Cleanup input must be a boolean "true" or "false"')
console.log(typeof cleanup)
const client = new Neocities(token) const client = new Neocities(token)
const finalStats = await client.deploy(distDir, { const stats = await client.deploy(distDir, {
cleanup, cleanup,
statsCb: statsHandler({ cleanup, distDir }) statsCb: Neocities.statsHandler()
}) })
return finalStats console.log(`Deployed to Neocities in ${prettyTime([0, stats.time])}:`)
console.log(` Uploaded ${stats.filesToUpload.length} files`)
console.log(` ${cleanup ? 'Deleted' : 'Orphaned'} ${stats.filesToDelete.length} files`)
console.log(` Skipped ${stats.filesSkipped.length} files`)
} }
doDeploy().then((finalStats) => {}).catch(err => { doDeploy().catch(err => {
console.error(err)
core.setFailed(err.message) core.setFailed(err.message)
}) })
function statsHandler (opts = {}) {
return (stats) => {
switch (stats.stage) {
case 'inspecting': {
switch (stats.status) {
case 'start': {
core.startGroup('Inspecting')
console.log(`Inspecting local (${opts.distDir}) and remote files...`)
break
}
case 'progress': {
break
}
case 'stop': {
console.log(`Done inspecting local and remote files in ${prettyTime([0, stats.timer.elapsed])}`)
const { tasks: { localScan, remoteScan } } = stats
console.log(`Scanned ${localScan.numberOfFiles} local files (${prettyBytes(localScan.totalSize)}) in ${prettyTime([0, localScan.timer.elapsed])}`)
console.log(`Scanned ${remoteScan.numberOfFiles} remote files (${prettyBytes(remoteScan.totalSize)}) in ${prettyTime([0, remoteScan.timer.elapsed])}`)
core.endGroup()
break
}
}
break
}
case 'diffing': {
switch (stats.status) {
case 'start': {
core.startGroup('Diffing files')
console.log('Diffing local and remote files...')
break
}
case 'progress': {
// No progress on diffing
break
}
case 'stop': {
const { tasks: { diffing } } = stats
console.log(`Done diffing local and remote files in ${prettyTime([0, stats.timer.elapsed])}`)
console.log(`${diffing.uploadCount} files to upload`)
console.log(`${diffing.deleteCount} ` + opts.cleanup ? 'files to delete' : 'orphaned files')
console.log(`${diffing.skipCoount} files to skip`)
core.endGroup()
break
}
}
break
}
case 'applying': {
switch (stats.status) {
case 'start': {
core.startGroup('Applying diff')
console.log('Uploading changes' + opts.cleanup ? ' and deleting orphaned files...' : '...')
break
}
case 'progress': {
break
}
case 'stop': {
const { tasks: { uploadFiles, deleteFiles, skippedFiles } } = stats
console.log('Done uploading changes' + opts.cleanup ? ' and deleting orphaned files' : '' + ` in ${prettyTime([0, stats.timer.elapsed])}`)
console.log(`Average upload speed: ${prettyBytes(uploadFiles.speed)}/s`)
if (opts.cleanup) console.log(`Average delete speed: ${prettyBytes(deleteFiles.speed)}/s`)
console.log(`Skipped ${skippedFiles.count} files (${prettyBytes(skippedFiles.size)})`)
core.endGroup()
break
}
}
break
}
default: {
console.log(stats)
}
}
}
}

View File

@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v1.1.2](https://github.com/bcomnes/async-neocities/compare/v1.1.1...v1.1.2) - 2020-02-13
### Commits
- bug: Fix export name of statsHandler [`8958e5e`](https://github.com/bcomnes/async-neocities/commit/8958e5eeb947376690a1ce0cefe7cce3d59be5b8)
## [v1.1.1](https://github.com/bcomnes/async-neocities/compare/v1.1.0...v1.1.1) - 2020-02-13
### Commits
- bug: Fix busted export of stats handler. [`510ae29`](https://github.com/bcomnes/async-neocities/commit/510ae293263955e0e34d3ab48df253fb6e093053)
## [v1.1.0](https://github.com/bcomnes/async-neocities/compare/v1.0.2...v1.1.0) - 2020-02-13
### Commits
- feat: Finish statsCb API and add a stats-handler.js function. [`c8e6483`](https://github.com/bcomnes/async-neocities/commit/c8e64835e594e68715ef71590b08baac374052bd)
## [v1.0.2](https://github.com/bcomnes/async-neocities/compare/v1.0.1...v1.0.2) - 2020-02-13
### Commits
- chore: remove total time from stats [`3c375ec`](https://github.com/bcomnes/async-neocities/commit/3c375ecf64ae8536a8e3ccce0a69cd93c8c6a306)
## [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 ## [v1.0.0](https://github.com/bcomnes/async-neocities/compare/v0.0.10...v1.0.0) - 2020-02-12
### Commits ### Commits

View File

@@ -185,11 +185,11 @@ Deploy a path to a `directory`, efficiently only uploading missing and changed f
```js ```js
{ {
cleanup: false // delete orphaned files on neocities that are not in the `directory` cleanup: false // delete orphaned files on neocities that are not in the `directory`
statsCb: () => {} // WIP progress API statsCb: (stats) => {}
} }
``` ```
The return value of this method is subject to change. For an example of a stats handler, see [lib/stats-handler.js]('./lib/stats-handler.js').
### `client.get(endpoint, [quieries], [opts])` ### `client.get(endpoint, [quieries], [opts])`

207
node_modules/async-neocities/index.js generated vendored
View File

@@ -12,6 +12,7 @@ const { neocitiesLocalDiff } = require('./lib/folder-diff')
const pkg = require('./package.json') const pkg = require('./package.json')
const SimpleTimer = require('./lib/timer') const SimpleTimer = require('./lib/timer')
const { getStreamLength, meterStream } = require('./lib/stream-meter') const { getStreamLength, meterStream } = require('./lib/stream-meter')
const statsHandler = require('./lib/stats-handler')
const defaultURL = 'https://neocities.org' const defaultURL = 'https://neocities.org'
@@ -19,6 +20,7 @@ const defaultURL = 'https://neocities.org'
const START = 'start' const START = 'start'
const PROGRESS = 'progress' // progress updates const PROGRESS = 'progress' // progress updates
const STOP = 'stop' const STOP = 'stop'
const SKIP = 'skip'
// Progress stages // Progress stages
const INSPECTING = 'inspecting' const INSPECTING = 'inspecting'
const DIFFING = 'diffing' const DIFFING = 'diffing'
@@ -55,6 +57,8 @@ class NeocitiesAPIClient {
return fetch(url, opts) return fetch(url, opts)
} }
static statsHandler (...args) { return statsHandler(...args) }
/** /**
* Create an async-neocities api client. * Create an async-neocities api client.
* @param {string} apiKey An apiKey to make requests with. * @param {string} apiKey An apiKey to make requests with.
@@ -226,194 +230,73 @@ class NeocitiesAPIClient {
} }
const statsCb = opts.statsCb const statsCb = opts.statsCb
const startDeployTime = Date.now() const totalTime = new SimpleTimer(Date.now())
const totalTime = new SimpleTimer(startDeployTime)
// Inspection stage stats initializer // INSPECTION STAGE
const inspectionStats = { statsCb({ stage: INSPECTING, status: START })
stage: INSPECTING,
status: START,
timer: new SimpleTimer(startDeployTime),
totalTime,
tasks: {
localScan: {
numberOfFiles: 0,
totalSize: 0,
timer: new SimpleTimer(startDeployTime)
},
remoteScan: {
numberOfFiles: 0,
totalSize: 0,
timer: new SimpleTimer(startDeployTime)
}
}
}
const sendInspectionUpdate = (status) => {
if (status) inspectionStats.status = status
statsCb(inspectionStats)
}
sendInspectionUpdate(START)
// Remote scan timers
const remoteScanJob = this.list()
remoteScanJob.then(({ files }) => { // Comes in the form of a response object
const { tasks: { remoteScan } } = inspectionStats
remoteScan.numberOfFiles = files.length
remoteScan.totalSize = files.reduce((accum, cur) => {
return accum + cur.size || 0
}, 0)
remoteScan.timer.stop()
sendInspectionUpdate(PROGRESS)
})
// Local scan timers and progress accumulator
const localScanJob = progressAccum(
afw.asyncFolderWalker(directory, { shaper: f => f })
)
async function progressAccum (iterator) {
const localFiles = []
const { tasks: { localScan } } = inspectionStats
for await (const file of iterator) {
localFiles.push(file)
localScan.numberOfFiles += 1
localScan.totalSize += file.stat.blksize
sendInspectionUpdate(PROGRESS)
}
return localFiles
}
localScanJob.then(files => {
const { tasks: { localScan } } = inspectionStats
localScan.timer.stop()
sendInspectionUpdate(PROGRESS)
})
// Inspection stage finalizer
const [localFiles, remoteFiles] = await Promise.all([ const [localFiles, remoteFiles] = await Promise.all([
localScanJob, afw.allFiles(directory, { shaper: f => f }),
this.list().then(res => res.files) this.list().then(res => res.files)
]) ])
inspectionStats.timer.stop() statsCb({ stage: INSPECTING, status: STOP })
sendInspectionUpdate(STOP)
// DIFFING STAGE // DIFFING STAGE
statsCb({ stage: DIFFING, status: START })
const diffingStats = {
stage: DIFFING,
status: START,
timer: new SimpleTimer(Date.now()),
totalTime,
tasks: {
diffing: {
uploadCount: 0,
deleteCount: 0,
skipCount: 0
}
}
}
statsCb(diffingStats)
const { tasks: { diffing } } = diffingStats
const { filesToUpload, filesToDelete, filesSkipped } = await neocitiesLocalDiff(remoteFiles, localFiles) const { filesToUpload, filesToDelete, filesSkipped } = await neocitiesLocalDiff(remoteFiles, localFiles)
diffingStats.timer.stop() statsCb({ stage: DIFFING, status: STOP })
diffingStats.status = STOP
diffing.uploadCount = filesToUpload.length
diffing.deleteCount = filesToDelete.length
diffing.skipCount = filesSkipped.length
statsCb(diffingStats)
const applyingStartTime = Date.now() // APPLYING STAGE
const applyingStats = { if (filesToUpload.length === 0 && (!opts.cleanup || filesToDelete.length === 0)) {
stage: APPLYING, statsCb({ stage: APPLYING, status: SKIP })
status: START, return stats()
timer: new SimpleTimer(applyingStartTime),
totalTime,
tasks: {
uploadFiles: {
timer: new SimpleTimer(applyingStartTime),
bytesWritten: 0,
totalBytes: 0,
get percent () {
return this.totalBytes === 0 ? 0 : this.bytesWritten / this.totalBytes
},
get speed () {
return this.bytesWritten / this.timer.elapsed
}
},
deleteFiles: {
timer: new SimpleTimer(applyingStartTime),
bytesWritten: 0,
totalBytes: 0,
get percent () {
return this.totalBytes === 0 ? 0 : this.bytesWritten / this.totalBytes
},
get speed () {
return this.bytesWritten / this.timer.elapsed
}
},
skippedFiles: {
count: filesSkipped.length,
size: filesSkipped.reduce((accum, file) => accum + file.stat.blksize, 0)
}
}
} }
const sendApplyingUpdate = (status) => {
if (status) applyingStats.status = status
statsCb(applyingStats)
}
sendApplyingUpdate(START)
statsCb({ stage: APPLYING, status: START })
const work = [] const work = []
const { tasks: { uploadFiles, deleteFiles } } = applyingStats
if (filesToUpload.length > 0) { if (filesToUpload.length > 0) {
const uploadJob = this.upload(filesToUpload, { const uploadJob = this.upload(filesToUpload, {
statsCb: ({ bytesWritten, totalBytes }) => { statsCb ({ totalBytes, bytesWritten }) {
uploadFiles.bytesWritten = bytesWritten statsCb({
uploadFiles.totalBytes = totalBytes stage: APPLYING,
sendApplyingUpdate(PROGRESS) status: PROGRESS,
complete: false,
totalBytes,
bytesWritten,
get progress () {
return (this.bytesWritten / this.totalBytes) || 0
}
})
} }
}).then((_) => {
statsCb({
stage: APPLYING,
status: PROGRESS,
complete: true,
progress: 1.0
})
}) })
work.push(uploadJob) work.push(uploadJob)
uploadJob.then(res => {
uploadFiles.timer.stop()
sendApplyingUpdate(PROGRESS)
})
} else {
uploadFiles.timer.stop()
} }
if (opts.cleanup && filesToDelete.length > 0) { if (opts.cleanup && filesToDelete.length > 0) {
const deleteJob = this.delete(filesToDelete, { work.push(this.delete(filesToDelete))
statsCb: ({ bytesWritten, totalBytes }) => {
deleteFiles.bytesWritten = bytesWritten
deleteFiles.totalBytes = totalBytes
sendApplyingUpdate(PROGRESS)
}
})
work.push(deleteJob)
deleteJob.then(res => {
deleteFiles.timer.stop()
sendApplyingUpdate(PROGRESS)
})
} else {
deleteFiles.timer.stop()
} }
await Promise.all(work) await Promise.all(work)
applyingStats.timer.stop() statsCb({ stage: APPLYING, status: STOP })
sendApplyingUpdate(STOP)
totalTime.stop() return stats()
const statsSummary = { function stats () {
time: totalTime, totalTime.stop()
inspectionStats, return {
diffingStats, time: totalTime.elapsed,
applyingStats filesToUpload,
filesToDelete,
filesSkipped
}
} }
return statsSummary
} }
} }

View File

57
node_modules/async-neocities/lib/stats-handler.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
const prettyBytes = require('pretty-bytes')
// Progress API constants
const START = 'start'
const PROGRESS = 'progress' // progress updates
const STOP = 'stop'
const SKIP = 'skip'
function statsHandler (opts = {}) {
let progressInterval
const lastStats = {}
return (stats) => {
switch (stats.status) {
case START: {
console.log(`Starting ${stats.stage} stage...`)
break
}
case STOP: {
console.log(`Finished ${stats.stage} stage.`)
break
}
case SKIP: {
console.log(`Skipping ${stats.stage} stage.`)
break
}
case PROGRESS: {
progressHandler(stats)
break
}
default: {
}
}
}
function progressHandler (stats) {
Object.assign(lastStats, stats)
if (!stats.complete) {
if (!progressInterval) {
progressInterval = setInterval(logProgress, 500, lastStats)
logProgress(lastStats)
}
} else {
if (progressInterval) clearInterval(progressInterval)
}
}
function logProgress (stats) {
let logLine = `Stage ${stats.stage}: ${stats.progress * 100}%`
if (stats.bytesWritten != null && stats.totalBytes != null) {
logLine = logLine + ` (${prettyBytes(stats.bytesWritten)} / ${prettyBytes(stats.totalBytes)})`
}
console.log(logLine)
}
}
module.exports = statsHandler

View File

@@ -1,26 +1,26 @@
{ {
"_from": "async-neocities@1.0.0", "_from": "async-neocities@1.1.2",
"_id": "async-neocities@1.0.0", "_id": "async-neocities@1.1.2",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-iRdvlFfyyqS390fGzs/FJOFG5izOJFVG/0w/xRoqZ6ochmjkxiByp16zjBb1Ade5lvXuKTuBdM/sdqmIQvWe5w==", "_integrity": "sha512-Pe7dwjZYb85T0g7YgPjbbhGUa5WlIVVwCrieoPj3urCIN1lVDWSu39OiBkG61Wbi+VDxoJqaa7qWoKC7etSVDw==",
"_location": "/async-neocities", "_location": "/async-neocities",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "version", "type": "version",
"registry": true, "registry": true,
"raw": "async-neocities@1.0.0", "raw": "async-neocities@1.1.2",
"name": "async-neocities", "name": "async-neocities",
"escapedName": "async-neocities", "escapedName": "async-neocities",
"rawSpec": "1.0.0", "rawSpec": "1.1.2",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "1.0.0" "fetchSpec": "1.1.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/async-neocities/-/async-neocities-1.0.0.tgz", "_resolved": "https://registry.npmjs.org/async-neocities/-/async-neocities-1.1.2.tgz",
"_shasum": "cdb2d2c4f3a431ab2aba7982693f8922f94d4360", "_shasum": "275c86c483cfb6360835ba792bc0ba985c9a889a",
"_spec": "async-neocities@1.0.0", "_spec": "async-neocities@1.1.2",
"_where": "/Users/bret/repos/deploy-to-neocities", "_where": "/Users/bret/repos/deploy-to-neocities",
"author": { "author": {
"name": "Bret Comnes", "name": "Bret Comnes",
@@ -37,6 +37,7 @@
"form-data": "^3.0.0", "form-data": "^3.0.0",
"nanoassert": "^2.0.0", "nanoassert": "^2.0.0",
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"pretty-bytes": "^5.3.0",
"pump": "^3.0.0", "pump": "^3.0.0",
"pumpify": "^2.0.1", "pumpify": "^2.0.1",
"qs": "^6.9.1", "qs": "^6.9.1",
@@ -79,5 +80,5 @@
"dist" "dist"
] ]
}, },
"version": "1.0.0" "version": "1.1.2"
} }

15
node_modules/async-neocities/test.js generated vendored
View File

@@ -3,6 +3,7 @@ const tap = require('tap')
const { readFileSync } = require('fs') const { readFileSync } = require('fs')
const { resolve } = require('path') const { resolve } = require('path')
const NeocitiesAPIClient = require('.') const NeocitiesAPIClient = require('.')
const statsHanlder = require('./lib/stats-handler')
let token = process.env.NEOCITIES_API_TOKEN let token = process.env.NEOCITIES_API_TOKEN
let fakeToken = false let fakeToken = false
@@ -87,18 +88,10 @@ if (!fakeToken) {
tap.test('can deploy folders', async t => { tap.test('can deploy folders', async t => {
const client = new NeocitiesAPIClient(token) 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 deployStats = await client.deploy( const deployStats = await client.deploy(
resolve(__dirname, 'fixtures'), resolve(__dirname, 'fixtures'),
{ {
// statsCb, statsCb: statsHanlder(),
cleanup: false cleanup: false
} }
) )
@@ -110,7 +103,7 @@ if (!fakeToken) {
const redeployStats = await client.deploy( const redeployStats = await client.deploy(
resolve(__dirname, 'fixtures'), resolve(__dirname, 'fixtures'),
{ {
// statsCb, statsCb: statsHanlder(),
cleanup: false cleanup: false
} }
) )
@@ -122,7 +115,7 @@ if (!fakeToken) {
const cleanupStats = await client.deploy( const cleanupStats = await client.deploy(
resolve(__dirname, 'fixtures/empty'), resolve(__dirname, 'fixtures/empty'),
{ {
// statsCb, statsCb: statsHanlder(),
cleanup: true cleanup: true
} }
) )

View File

@@ -16,12 +16,12 @@
"fetchSpec": "^5.3.0" "fetchSpec": "^5.3.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/" "/async-neocities"
], ],
"_resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz", "_resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz",
"_shasum": "f2849e27db79fb4d6cfe24764fc4134f165989f2", "_shasum": "f2849e27db79fb4d6cfe24764fc4134f165989f2",
"_spec": "pretty-bytes@^5.3.0", "_spec": "pretty-bytes@^5.3.0",
"_where": "/Users/bret/repos/deploy-to-neocities", "_where": "/Users/bret/repos/deploy-to-neocities/node_modules/async-neocities",
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",

View File

@@ -1,26 +1,26 @@
{ {
"_from": "pretty-time@^1.1.0", "_from": "pretty-time@1.1.0",
"_id": "pretty-time@1.1.0", "_id": "pretty-time@1.1.0",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==", "_integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
"_location": "/pretty-time", "_location": "/pretty-time",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "version",
"registry": true, "registry": true,
"raw": "pretty-time@^1.1.0", "raw": "pretty-time@1.1.0",
"name": "pretty-time", "name": "pretty-time",
"escapedName": "pretty-time", "escapedName": "pretty-time",
"rawSpec": "^1.1.0", "rawSpec": "1.1.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^1.1.0" "fetchSpec": "1.1.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz", "_resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
"_shasum": "ffb7429afabb8535c346a34e41873adf3d74dd0e", "_shasum": "ffb7429afabb8535c346a34e41873adf3d74dd0e",
"_spec": "pretty-time@^1.1.0", "_spec": "pretty-time@1.1.0",
"_where": "/Users/bret/repos/deploy-to-neocities", "_where": "/Users/bret/repos/deploy-to-neocities",
"author": { "author": {
"name": "Jon Schlinkert", "name": "Jon Schlinkert",

View File

@@ -1,6 +1,6 @@
{ {
"name": "deploy-to-neocities", "name": "deploy-to-neocities",
"version": "0.0.1", "version": "0.0.7",
"description": "Github Action to deplpoy a folder to Neocities.org", "description": "Github Action to deplpoy a folder to Neocities.org",
"main": "index.js", "main": "index.js",
"private": true, "private": true,
@@ -39,9 +39,8 @@
"dependencies": { "dependencies": {
"@actions/core": "1.2.2", "@actions/core": "1.2.2",
"@actions/github": "2.1.0", "@actions/github": "2.1.0",
"async-neocities": "1.0.0", "async-neocities": "1.1.2",
"pretty-bytes": "^5.3.0", "pretty-time": "1.1.0"
"pretty-time": "^1.1.0"
}, },
"standard": { "standard": {
"ignore": [ "ignore": [