open-index/open-npm huggingface dataset:
npm package: @strawbees/desktop-autoupdater
Description: Auto updater wrapper for Strawbees Desktop apps.
Latest version: 0.1.1

# Auto Updater for Strawbees Desktop Apps

Module that orchestrate the auto update process for Strawbees Desktop Apps.

The update process will do the following:

- Retrieve the `latest.json` manifest file from update server
- Compare the latest version with current version
- Create a temporary folder
- Download update to temporary file if it's not downloaded yet
- Move updater binary (generated from [here](https://github.com/Quirkbot/nwjs-autoupdater)) to temporary folder
- Run updater binary

## Installing

Install the auto updater module with `npm install --save @strawbees/desktop-autoupdater`

## Usage

```javascript
const AutoUpdater = require('@strawbees/desktop-autoupdater')
// Current application's package.json
const pkg = require('./package.json')
// Instantiate updater with current package. This package must have the version,
// autoupdate urls for each environment and executable name.
const updater = new AutoUpdater(pkg)
// The update will fire events along the process so the app decide on what to do
updater.addListener('up-to-date', () => {
	console.log('App is up to date')
})
updater.addListener('ready-to-restart', () => {
	console.log('App is ready to restart')
	nw.App.quit()
})
updater.addListener('update-available', () => {
	console.log('Update Available')
})
updater.addListener('error', (err) => {
	console.error('Updater error:', err)
})
// Start the auto update process
updater.start()
```

## TODOs

- Find a way to track the source code that generated the auto updater binary.
npm package: @strawbees/s3-publisher
Description: Command line tool for publishing to Amazon S3
Latest version: 0.2.0

# Strawbees S3 Publisher

Command line tool for publishing files to Amazon S3 Buckets. It's a thin API layer on top of [@monolambda/s3](https://www.npmjs.com/package/@monolambda/s3) npm package.

## Installing

```
npm install --save @strawbees/s3-publisher
```

## Usage

### Environment variables

Make sure `S3_KEY` and `S3_SECRET` (AWS credentials) are set amongst your environment variables. You can provide a environment config file `.env`.

Optionally you can set `S3_BUCKET` and `S3_REGION` and this will override the option `--bucket` and `--region` if given.

An example of `.env` file would be:

```
S3_KEY="123"
S3_SECRET="iwatchpeppapig"
S3_BUCKET="my-bucket-on-s3"
S3_REGION="us-west-1"
```

### Client API

```
Usage: s3-publisher [options]

Command line tool for publishing to Amazon S3.

Options:
  -b, --bucket <bucket>     S3 Bucket name. Required `BUCKET` in your environment variables.
  -s, --source <path>       Local folder path. Required.
  -d, --destination <path>  Path on S3 Bucket (Prefix).
  -r, --region <region>     S3 Bucket region.
  --sync                    Sync local folder with bucket. This will remove files on the S3 Bucket that are not on `--source`.
  -v, --version             output the version number
  -h, --help                output usage information
```

## Example

Assuming your project has `s3-publisher` installed, it should be available to `npm` as a "binary". That means you can call it from `package.json` scripts:

```json
{
	"scripts": {
		"build": "build --output ./dist",
		"publish": "s3-publisher -b bucket-name -s ./dist --sync",
		"ci": "npm run build && npm run publish"
	}
}
```

If you don't want to commit the name of your bucket, set `S3_BUCKET` environment variable with the name of your bucket and just skip the `--bucket` option. The same applies to the `--region` option and the `S3_REGION` environment variable.