@holochain/hc-spin 0.300.2 → 0.400.0-dev.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/cli/cli.js +17 -10
- package/dist/cli.js +17 -10
- package/dist/main/index.js +9993 -8750
- package/package.json +4 -3
- package/src/main/index.ts +29 -3
- package/src/main/windows.ts +3 -2
package/cli/cli.js
CHANGED
|
@@ -3,16 +3,23 @@ const { spawn } = require('child_process');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
6
|
-
let electronBinary;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
let electronBinary = process.env.ELECTRON_BINARY;
|
|
7
|
+
|
|
8
|
+
if (!electronBinary) {
|
|
9
|
+
let pathStr =
|
|
10
|
+
process.platform === 'win32'
|
|
11
|
+
? '../node_modules/electron/dist/electron.exe'
|
|
12
|
+
: '../node_modules/.bin/electron';
|
|
13
|
+
|
|
14
|
+
// recursively look for electron binary in node_modules folder
|
|
15
|
+
for (let i = 0; i < 7; i++) {
|
|
16
|
+
const maybeElectronBinary = path.resolve(__dirname, pathStr);
|
|
17
|
+
if (fs.existsSync(maybeElectronBinary)) {
|
|
18
|
+
electronBinary = maybeElectronBinary;
|
|
19
|
+
break;
|
|
20
|
+
} else {
|
|
21
|
+
pathStr = '../' + pathStr;
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
package/dist/cli.js
CHANGED
|
@@ -3,16 +3,23 @@ const { spawn } = require('child_process');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
6
|
-
let electronBinary;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
let electronBinary = process.env.ELECTRON_BINARY;
|
|
7
|
+
|
|
8
|
+
if (!electronBinary) {
|
|
9
|
+
let pathStr =
|
|
10
|
+
process.platform === 'win32'
|
|
11
|
+
? '../node_modules/electron/dist/electron.exe'
|
|
12
|
+
: '../node_modules/.bin/electron';
|
|
13
|
+
|
|
14
|
+
// recursively look for electron binary in node_modules folder
|
|
15
|
+
for (let i = 0; i < 7; i++) {
|
|
16
|
+
const maybeElectronBinary = path.resolve(__dirname, pathStr);
|
|
17
|
+
if (fs.existsSync(maybeElectronBinary)) {
|
|
18
|
+
electronBinary = maybeElectronBinary;
|
|
19
|
+
break;
|
|
20
|
+
} else {
|
|
21
|
+
pathStr = '../' + pathStr;
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|