Darken SDK
Darken is a mirroring client.
This JavaScript SDK is for developing apps that interact with Darken registries.
How it works
First, the patcher downloads a manifest describing all of the files to be synchronized.
Then, it verifies whether the local copy of each file in the manifest has a hash that matches the hash in the manifest.
For each file in the manifest that either does not exist locally or whose hash does not match, the patcher will download that file.
Usage
import { darken } from 'darken-sdk';
darken({
path: process.cwd(),
registry: 'https://darken.sh',
repo: '@stable/blank',
telemetry: {
onFile(name) {
},
onFileError(name, error) {
},
onFileReady(name) {
},
onFileUpdate(name) {
},
onFileUpdateProgress(name, bytesProgress, bytesTotal) {
},
onManifest() {
},
onManifestError(error) {
}
}
});