# web-rsync

> Native addon for searching files diff

Latest version **1.0.6-alpha** (published 2021-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install web-rsync
pnpm add web-rsync
yarn add web-rsync
bun add web-rsync
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6-alpha |
| Published | 2021-02-10 |
| First published | 2021-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 2 |
| Author | Oleksander Bezrukov |
| Maintainers | ishimoku |
| Keywords | c++, cpp, rsync, file-sync, client, server, client-server, node-gyp, native |

## Links

- npm: https://www.npmjs.com/package/web-rsync
- Repository: https://github.com/YoungProducer/web-rsync
- npm.io page: https://npm.io/package/web-rsync

## Dependencies (2)

- [node-gyp](https://npm.io/package/node-gyp.md) ^7.1.2
- [node-addon-api](https://npm.io/package/node-addon-api.md) ^3.1.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.6-alpha (latest) — 2021-02-10
- 1.0.5-alpha — 2021-02-10
- 1.0.4-alpha — 2021-02-10
- 1.0.3-alpha — 2021-02-08
- 1.0.2-alpha — 2021-02-08
- 1.0.1-alpha — 2021-02-08
- 1.0.0-alpha — 2021-02-08

## README

# Web-rsync

A simple rsync-ish implementation to sync files between node applications.

---

## Requirements

Currently works only on Linux and Mac. The required libraries for linux are listed in `postinstall.sh` in scripts.

## Installation

- #### Linux and Mac

  You can install nodejs and npm easily with apt install, just run the following commands.

      yarn add web-rsync

- #### Windows

  Unfortunately, currently there is no support for windows, **contributors are welcome**.

## Usage

To scan the contents of directory use `scanDir`.

```javascript
const { scanDir } = require("web-rsync");
const scan = scanDir("./node_modules");
console.log(scan);
```

And for finding actual difference you can use `getFoldersDiff`. It can make diff from a path and a scan made by `scanDir`. That is usually the way you use it:

```javascript
getFoldersDiff("./prev", nextScan);
```

From two paths:

```javascript
getFoldersDiff("./prev", "./next");
```

And from two scans:

```javascript
getFoldersDiff(prevScan, nextScan);
```

## Example

An example usage with express over http is in `test-files/server` and `test-files/client`.

## Contribution

Contributors are welcome.

---
_Source: https://npm.io/package/web-rsync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
