rac-delta 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1 +1,93 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://i.imgur.com/TzcVUYs.png" alt="Rac-delta logo" width="140"/>
|
|
3
|
+
<img src="https://nodejs.org/static/logos/jsIconGreen.svg" alt="node logo" width="100"/>
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# rac-delta 🦝
|
|
11
|
+
|
|
12
|
+
rac-delta is an open delta-patching protocol made for sync builds of your apps, games, or anything you store in a folder!
|
|
13
|
+
|
|
14
|
+
This is the official SDK for NodeJs.
|
|
15
|
+
|
|
16
|
+
## Benefits of rac-delta
|
|
17
|
+
|
|
18
|
+
- **Backend agnostic**: it does not depend on a concrete service (S3, Azure, SSH, signed URLs, etc.)
|
|
19
|
+
- **Modular**: almost any remote storage can be used via adapters
|
|
20
|
+
- **Simple**: an unique index archive (rdindex.json) centralices all information.
|
|
21
|
+
- **Efficiency**: supports streaming, concurrency, and uses **Blake3** for fast hashing.
|
|
22
|
+
- **Flexibility**: highly customizable, chunk size, concurrency limits, reconstruction strategies...
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm install rac-delta
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Basic usage
|
|
33
|
+
|
|
34
|
+
In order to use the rac-delta SDK, you will need to create a RacDeltaClient, the main entry point of the SDK and where all the rac-delta operations are invoked.
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { RacDeltaClient } from 'rac-delta';
|
|
38
|
+
|
|
39
|
+
const racDeltaClient = new RacDeltaClient({
|
|
40
|
+
chunkSize: 1024 * 1024,
|
|
41
|
+
maxConcurrency: 6,
|
|
42
|
+
storage: {
|
|
43
|
+
type: 'ssh',
|
|
44
|
+
host: 'localhost',
|
|
45
|
+
pathPrefix: '/root/upload',
|
|
46
|
+
port: 2222,
|
|
47
|
+
credentials: {
|
|
48
|
+
username: 'root',
|
|
49
|
+
password: 'password',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
And a example to perform a upload to the selected storage (SSH in this case)
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const remoteIndexToUse = undefined;
|
|
59
|
+
|
|
60
|
+
await racDeltaClient.pipelines.upload.execute('path/to/build', remoteIndexToUse, {
|
|
61
|
+
requireRemoteIndex: false,
|
|
62
|
+
force: false,
|
|
63
|
+
ignorePatterns: undefined,
|
|
64
|
+
onStateChange: (state) => {
|
|
65
|
+
console.log(state);
|
|
66
|
+
},
|
|
67
|
+
onProgress: (type, progress, speed) => {
|
|
68
|
+
console.log(type, progress.toFixed(1), speed?.toFixed(1));
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Documentation
|
|
74
|
+
|
|
75
|
+
For all the details, check the [full documentation](https://raccreative.github.io/rac-delta-docs/).
|
|
76
|
+
|
|
77
|
+
Available in spanish too!
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Contributing
|
|
82
|
+
|
|
83
|
+
Contributions are welcome!
|
|
84
|
+
|
|
85
|
+
1. Fork the repository.
|
|
86
|
+
2. Create a branch for your feature/fix (`git checkout -b feature/new-feature`).
|
|
87
|
+
3. Commit your changes (`git commit -m 'Added new feature'`).
|
|
88
|
+
4. Push to your branch (`git push origin feature/new-feature`).
|
|
89
|
+
5. Open a Pull Request.
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rac-delta",
|
|
3
3
|
"description": "Storage agnostic delta patching implementation of rac-delta protocol for NodeJs. With streaming support and file reconstruction.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/raccreative/rac-delta-js.git"
|
|
10
|
+
},
|
|
7
11
|
"files": [
|
|
8
12
|
"dist"
|
|
9
13
|
],
|