Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
this._store = new XForgeStore({
schema: this._schema,
bucket: this.bucket
});
this.remote = new XForgeJSONAPISource({
schema: this._schema,
bucket: this.bucket,
name: REMOTE,
host: this.locationService.origin,
namespace: NAMESPACE
});
this.backup = new IndexedDBSource({
schema: this._schema,
bucket: this.bucket,
name: BACKUP,
namespace: 'xforge'
});
this.coordinator = new Coordinator({
sources: [this._store, this.remote, this.backup],
strategies: [
// Handle a pull failure
new RemotePullFailStrategy(REMOTE),
// Handle a push failure
new RemotePushFailStrategy(REMOTE, STORE),
// Query the remote server whenever the store is queried
new StoreRemoteQueryStrategy(STORE, REMOTE),
// Update the remote server whenever the store is updated