Release v2.2.0

This commit is contained in:
2026-08-01 21:41:44 +01:00
parent c643d2fb07
commit d6417b667c
673 changed files with 146752 additions and 7389 deletions
@@ -0,0 +1,20 @@
const TASK = {
taskType: 'media-sync'
};
function registerMediaSyncTask(options) {
const backgroundTaskQueue = options && options.backgroundTaskQueue;
const uploadSyncService = options && options.uploadSyncService;
const runMediaSyncTask = uploadSyncService && uploadSyncService.runMediaSyncTask;
if (!backgroundTaskQueue || typeof runMediaSyncTask !== 'function') {
throw new Error('registerMediaSyncTask requires the media sync dependencies.');
}
// Media sync is just a pass-through to the shared media sync runner.
backgroundTaskQueue.setTaskHandler(TASK.taskType, function (task) {
return runMediaSyncTask(task && task.payload ? task.payload : task);
});
}
module.exports = { registerMediaSyncTask };