electron-version-deployer-cli 0.0.5 → 0.0.7

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/dist/cli.cjs CHANGED
@@ -495,4 +495,4 @@ async function installPrebuilt(configs) {
495
495
  }
496
496
  commander.program.description(
497
497
  "Electron 版本部署 CLI,简化你的 Electron 软件更新,让一切变得简单。"
498
- ).helpOption("-h, --help", "使用帮助").version("0.0.5", "-V, --version", "显示版本号").parse(process.argv);
498
+ ).helpOption("-h, --help", "使用帮助").version("0.0.7", "-V, --version", "显示版本号").parse(process.argv);
package/dist/main.d.ts CHANGED
@@ -15,5 +15,5 @@ type EVDInitPropsType = {
15
15
  onError?: (err: unknown) => void;
16
16
  };
17
17
  export declare function EVDInit(props: EVDInitPropsType): void;
18
- export declare function EVDCheckUpdate(): Promise<void>;
18
+ export declare function EVDCheckUpdate(): Promise<boolean>;
19
19
  export {};
package/dist/main.js CHANGED
@@ -113,6 +113,9 @@ async function EVDCheckUpdate() {
113
113
  const remoteVersion = versionToNum(remoteJSON.version);
114
114
  if (remoteVersion > localVersion) {
115
115
  await showNewVersionDialog();
116
+ return true;
117
+ } else {
118
+ return false;
116
119
  }
117
120
  }
118
121
  async function showNewVersionDialog() {
@@ -175,7 +178,7 @@ async function installNewVersion() {
175
178
  cacheCurrentPkgJSON.dependencies
176
179
  );
177
180
  try {
178
- await installPkg(needInstallFullSize ? "fullCode.zip" : "logicCode.zip");
181
+ await installPkg(!needInstallFullSize ? "fullCode.zip" : "logicCode.zip");
179
182
  } catch (error) {
180
183
  onError(error);
181
184
  }
@@ -219,7 +222,6 @@ function bindEvent(promptWindow) {
219
222
  });
220
223
  electron.ipcMain.on("evd-update-now", (_) => {
221
224
  installNewVersion().then(() => {
222
- console.log(222);
223
225
  promptWindow.close();
224
226
  electron.app.relaunch();
225
227
  electron.app.exit();
@@ -13,7 +13,7 @@
13
13
  href="https://chat.openai.com/favicon-32x32.png"
14
14
  />
15
15
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
16
- <title>有可用的更新 (4.3.5)</title>
16
+ <title>有可用的更新</title>
17
17
  <style>
18
18
  * {
19
19
  margin: 0;
@@ -95,7 +95,7 @@
95
95
  }
96
96
 
97
97
  .title-bar img {
98
- margin-right: 8px;
98
+ margin-right: 12px;
99
99
  }
100
100
 
101
101
  .loading-box {
@@ -117,7 +117,7 @@
117
117
  <body>
118
118
  <div class="loading-box">软件更新中……</div>
119
119
  <div class="title-bar">
120
- <img src="" width="28" class="logo" style="display: none" />
120
+ <img src="" width="34" class="logo" style="display: none" />
121
121
  <span>有可用的新版本:</span>
122
122
  </div>
123
123
  <div class="content">具体更新内容请查看 Changelogs</div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "electron-version-deployer-cli",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.es.js",