@holochain/hc-spin 0.200.10 → 0.200.11

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 CHANGED
@@ -4,7 +4,11 @@ const path = require('path');
4
4
  const fs = require('fs');
5
5
 
6
6
  let electronBinary;
7
- let pathStr = '../node_modules/.bin/electron';
7
+ let pathStr =
8
+ process.platform === 'win32'
9
+ ? '../node_modules/electron/dist/electron.exe'
10
+ : '../node_modules/.bin/electron';
11
+
8
12
  // recursively look for electron binary in node_modules folder
9
13
  for (let i = 0; i < 7; i++) {
10
14
  const maybeElectronBinary = path.resolve(__dirname, pathStr);
package/dist/cli.js CHANGED
@@ -4,7 +4,11 @@ const path = require('path');
4
4
  const fs = require('fs');
5
5
 
6
6
  let electronBinary;
7
- let pathStr = '../node_modules/.bin/electron';
7
+ let pathStr =
8
+ process.platform === 'win32'
9
+ ? '../node_modules/electron/dist/electron.exe'
10
+ : '../node_modules/.bin/electron';
11
+
8
12
  // recursively look for electron binary in node_modules folder
9
13
  for (let i = 0; i < 7; i++) {
10
14
  const maybeElectronBinary = path.resolve(__dirname, pathStr);
@@ -11794,8 +11794,10 @@ const menu = electron.Menu.buildFromTemplate([
11794
11794
  }
11795
11795
  ]);
11796
11796
  const rustUtils = require("@holochain/hc-spin-rust-utils");
11797
+ const cliPackageJsonPath = path.resolve(path.join(electron.app.getAppPath(), "../../package.json"));
11798
+ const cliPackageJson = require(cliPackageJsonPath);
11797
11799
  const cli = new commander.Command();
11798
- cli.name("hc-spin").description("CLI to run Holochain aps during development.").version(`0.200.10 (for holochain 0.2.x)`).argument(
11800
+ cli.name("hc-spin").description("CLI to run Holochain aps during development.").version(`${cliPackageJson.version} (holochain ${cliPackageJson.holochainVersion})`).argument(
11799
11801
  "<path>",
11800
11802
  "Path to .webhapp or .happ file to launch. If a .happ file is passed, either a UI path must be specified via --ui-path or a port pointing to a localhost server via --ui-port"
11801
11803
  ).option(
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@holochain/hc-spin",
3
- "version": "0.200.10",
3
+ "version": "0.200.11",
4
+ "holochainVersion": "0.2.x",
4
5
  "description": "CLI to run Holochain aps during development.",
5
6
  "author": "matthme",
6
7
  "homepage": "https://developer.holochain.org",
package/src/main/index.ts CHANGED
@@ -23,12 +23,15 @@ import { menu } from './menu';
23
23
 
24
24
  const rustUtils = require('@holochain/hc-spin-rust-utils');
25
25
 
26
+ const cliPackageJsonPath = path.resolve(path.join(app.getAppPath(), '../../package.json'));
27
+ const cliPackageJson = require(cliPackageJsonPath);
28
+
26
29
  const cli = new Command();
27
30
 
28
31
  cli
29
32
  .name('hc-spin')
30
33
  .description('CLI to run Holochain aps during development.')
31
- .version(`0.200.10 (for holochain 0.2.x)`)
34
+ .version(`${cliPackageJson.version} (holochain ${cliPackageJson.holochainVersion})`)
32
35
  .argument(
33
36
  '<path>',
34
37
  'Path to .webhapp or .happ file to launch. If a .happ file is passed, either a UI path must be specified via --ui-path or a port pointing to a localhost server via --ui-port',