@sellerartifact/electron-app-updater 0.0.3 → 0.0.4

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/index.cjs CHANGED
@@ -71,9 +71,9 @@ class ElectronAppUpdater {
71
71
  const currentVersion = await this.getNowVersion();
72
72
  const response = await external_axios_default().get(this.checkVersionUrl);
73
73
  const data = response.data.result;
74
- console.log(currentVersion, data);
75
- const nowVersion = Number(currentVersion);
76
- const remoteVersion = Number(data.version);
74
+ const nowVersion = currentVersion;
75
+ const remoteVersion = data.version;
76
+ console.log(currentVersion, remoteVersion);
77
77
  if (remoteVersion != nowVersion) {
78
78
  console.log('need update');
79
79
  await this.changeVersion(remoteVersion, data.url);
@@ -94,7 +94,7 @@ class ElectronAppUpdater {
94
94
  external_fs_default().writeFileSync(configPath, JSON.stringify({
95
95
  version: remoteVersion
96
96
  }));
97
- const writePath = external_path_default().join(this.buildPath, 'build.js');
97
+ const writePath = external_path_default().join(this.buildPath, this.buildJSFileName);
98
98
  const buildResponse = await external_axios_default().get(url);
99
99
  external_fs_default().writeFileSync(writePath, buildResponse.data);
100
100
  setTimeout(()=>{
package/dist/index.js CHANGED
@@ -16,9 +16,9 @@ class ElectronAppUpdater {
16
16
  const currentVersion = await this.getNowVersion();
17
17
  const response = await __WEBPACK_EXTERNAL_MODULE_axios__["default"].get(this.checkVersionUrl);
18
18
  const data = response.data.result;
19
- console.log(currentVersion, data);
20
- const nowVersion = Number(currentVersion);
21
- const remoteVersion = Number(data.version);
19
+ const nowVersion = currentVersion;
20
+ const remoteVersion = data.version;
21
+ console.log(currentVersion, remoteVersion);
22
22
  if (remoteVersion != nowVersion) {
23
23
  console.log('need update');
24
24
  await this.changeVersion(remoteVersion, data.url);
@@ -39,7 +39,7 @@ class ElectronAppUpdater {
39
39
  __WEBPACK_EXTERNAL_MODULE_fs__["default"].writeFileSync(configPath, JSON.stringify({
40
40
  version: remoteVersion
41
41
  }));
42
- const writePath = __WEBPACK_EXTERNAL_MODULE_path__["default"].join(this.buildPath, 'build.js');
42
+ const writePath = __WEBPACK_EXTERNAL_MODULE_path__["default"].join(this.buildPath, this.buildJSFileName);
43
43
  const buildResponse = await __WEBPACK_EXTERNAL_MODULE_axios__["default"].get(url);
44
44
  __WEBPACK_EXTERNAL_MODULE_fs__["default"].writeFileSync(writePath, buildResponse.data);
45
45
  setTimeout(()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellerartifact/electron-app-updater",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {