@lvce-editor/update-worker 2.0.0 → 2.4.0

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.
@@ -841,6 +841,9 @@ const Electron = 2;
841
841
 
842
842
  const RendererWorker = 1;
843
843
 
844
+ const DownloadingUpdate = 2;
845
+ const DownloadedUpdate = 3;
846
+
844
847
  const rpcs = Object.create(null);
845
848
  const set$1 = (id, rpc) => {
846
849
  rpcs[id] = rpc;
@@ -1114,12 +1117,17 @@ const doCheckForUpdates = async (updateSetting, repository, fileNameTemplate, bu
1114
1117
 
1115
1118
  // @ts-ignore
1116
1119
  await invoke('Layout.setUpdateState', {
1117
- state: 'downloading',
1120
+ state: DownloadingUpdate,
1118
1121
  progress: 0
1119
1122
  });
1120
1123
  if (!(await isCached(downloadUrl, cache))) {
1121
1124
  await downloadUpdateToCache(downloadUrl, cache);
1122
1125
  }
1126
+ // @ts-ignore
1127
+ await invoke('Layout.setUpdateState', {
1128
+ state: DownloadedUpdate,
1129
+ progress: 1
1130
+ });
1123
1131
  const messageRestart = promptRestart();
1124
1132
  const shouldRestart = await confirmPrompt(messageRestart);
1125
1133
  if (!shouldRestart) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/update-worker",
3
- "version": "2.0.0",
3
+ "version": "2.4.0",
4
4
  "description": "Update Worker",
5
5
  "repository": {
6
6
  "type": "git",