@overwolf/ow-electron 39.8.10-beta.0 → 39.8.10-beta.1

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/checksums.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "electron-api.json": "d3c769853e7cac1098c3e33b0f5743ad3f890cf5003e738abb27aa7e9157d944",
3
3
  "electron.d.ts": "a332d5d3fafb45e224218d44c5c471d215dca76889956d5f36f59ec0f8716d10",
4
- "ow-electron-v39.8.10-beta.0-darwin-arm64.zip": "469a72f74a0a52de3555391324d4fc6a4cef26d920208603c2502aedcc92a329",
5
- "ow-electron-v39.8.10-beta.0-darwin-x64.zip": "f3e00cf49ca8779bab61917d78c2a5de630e58945753c89a1f1fe5c6a7cc5ad4",
6
- "ow-electron-v39.8.10-beta.0-linux-arm64.zip": "aa90bc87e7f3452831aa4687e71d2bfb0d1c08ffef9533472383dc3d361ae758",
7
- "ow-electron-v39.8.10-beta.0-linux-armv7l.zip": "6e4d0d96b5ed98b9973868b8ea6234a5511cae866f15e586be7003a753b7afcc",
8
- "ow-electron-v39.8.10-beta.0-linux-x64.zip": "16b0450e045a634067303a27896ba38f98f663b5fbdf5e8d6cb181baff249fff",
9
- "ow-electron-v39.8.10-beta.0-win32-arm64.zip": "bff199e35ef75181dd65db2386df20444e876b8adc604d0778099a2baa3dc0b7",
10
- "ow-electron-v39.8.10-beta.0-win32-ia32.zip": "9d5957e472682389b732e611854fba8a189590fd36b04385c045df1085baad8f",
11
- "ow-electron-v39.8.10-beta.0-win32-x64.zip": "2e3601b11bc2c696127cd5ce708b08b8e2d324a5cc9e3b74cac944e23e2784ac"
4
+ "ow-electron-v39.8.10-beta.1-darwin-arm64.zip": "469a72f74a0a52de3555391324d4fc6a4cef26d920208603c2502aedcc92a329",
5
+ "ow-electron-v39.8.10-beta.1-darwin-x64.zip": "f3e00cf49ca8779bab61917d78c2a5de630e58945753c89a1f1fe5c6a7cc5ad4",
6
+ "ow-electron-v39.8.10-beta.1-linux-arm64.zip": "aa90bc87e7f3452831aa4687e71d2bfb0d1c08ffef9533472383dc3d361ae758",
7
+ "ow-electron-v39.8.10-beta.1-linux-armv7l.zip": "6e4d0d96b5ed98b9973868b8ea6234a5511cae866f15e586be7003a753b7afcc",
8
+ "ow-electron-v39.8.10-beta.1-linux-x64.zip": "16b0450e045a634067303a27896ba38f98f663b5fbdf5e8d6cb181baff249fff",
9
+ "ow-electron-v39.8.10-beta.1-win32-arm64.zip": "bff199e35ef75181dd65db2386df20444e876b8adc604d0778099a2baa3dc0b7",
10
+ "ow-electron-v39.8.10-beta.1-win32-ia32.zip": "9d5957e472682389b732e611854fba8a189590fd36b04385c045df1085baad8f",
11
+ "ow-electron-v39.8.10-beta.1-win32-x64.zip": "2e3601b11bc2c696127cd5ce708b08b8e2d324a5cc9e3b74cac944e23e2784ac"
12
12
  }
package/install.js CHANGED
@@ -2,14 +2,15 @@
2
2
 
3
3
  const { downloadArtifact } = require('@electron/get');
4
4
 
5
+ const { owElectronVersion } = require('./package');
5
6
  const extract = require('extract-zip');
6
7
 
7
8
  const childProcess = require('child_process');
8
9
  const fs = require('fs');
9
10
  const os = require('os');
10
11
  const path = require('path');
11
- const { owElectronVersion } = require('./package');
12
- // const { version } = require('./package');
12
+
13
+ const { version } = require('./package');
13
14
 
14
15
  if (process.env.ELECTRON_SKIP_BINARY_DOWNLOAD) {
15
16
  process.exit(0);
@@ -76,16 +77,29 @@ function isInstalled () {
76
77
 
77
78
  // unzips and makes path.txt point at the correct executable
78
79
  function extractFile (zipPath) {
79
- return new Promise((resolve, reject) => {
80
- extract(zipPath, { dir: path.join(__dirname, 'dist') }, err => {
81
- if (err) return reject(err);
80
+ const distPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist');
81
+
82
+ return extract(zipPath, { dir: path.join(__dirname, 'dist') }).then(() => {
83
+ // If the zip contains an "electron.d.ts" file,
84
+ // move that up
85
+ const srcTypeDefPath = path.join(distPath, 'electron.d.ts');
86
+ const targetTypeDefPath = path.join(__dirname, 'electron.d.ts');
87
+ const hasTypeDefinitions = fs.existsSync(srcTypeDefPath);
82
88
 
83
- fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, err => {
84
- if (err) return reject(err);
89
+ if (hasTypeDefinitions) {
90
+ fs.renameSync(srcTypeDefPath, targetTypeDefPath);
91
+ }
92
+
93
+ const owsrcTypeDefPath = path.join(distPath, 'ow-electron.d.ts');
94
+ const owtargetTypeDefPath = path.join(__dirname, 'ow-electron.d.ts');
95
+ const hasOwTypeDefinitions = fs.existsSync(owsrcTypeDefPath);
96
+
97
+ if (hasOwTypeDefinitions) {
98
+ fs.renameSync(owsrcTypeDefPath, owtargetTypeDefPath);
99
+ }
85
100
 
86
- resolve();
87
- });
88
- });
101
+ // Write a "path.txt" file.
102
+ return fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath);
89
103
  });
90
104
  }
91
105
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron",
3
- "version": "39.8.10-beta.0",
4
- "owElectronVersion": "39.8.10-beta.0",
3
+ "version": "39.8.10-beta.1",
4
+ "owElectronVersion": "39.8.10-beta.1",
5
5
  "electronVersion": "39.8.10",
6
6
  "repository": "https://github.com/electron/electron",
7
7
  "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",