@holochain/hc-spin 0.200.5 → 0.200.6
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/main/index.js +3 -3
- package/package.json +1 -1
- package/src/main/index.ts +1 -1
- package/src/main/windows.ts +2 -2
package/dist/main/index.js
CHANGED
|
@@ -96,12 +96,12 @@ electron.contextBridge.exposeInMainWorld("__HC_LAUNCHER_ENV__", {
|
|
|
96
96
|
} else {
|
|
97
97
|
try {
|
|
98
98
|
const iconResponse = await electron.net.fetch(`http://127.0.0.1:${uiSource.port}/icon.png`);
|
|
99
|
-
|
|
100
|
-
if (buffer.byteLength === 0 && agentNum === 1) {
|
|
99
|
+
if (iconResponse.status === 404 && agentNum === 1) {
|
|
101
100
|
console.warn(
|
|
102
101
|
"\n\n+++++ WARNING +++++\n[hc-spin] No icon.png found. It is recommended to put an icon.png file (1024x1024 pixel) in the root of your UI assets directory which can be used by the Holochain Launcher.\n+++++++++++++++++++\n\n"
|
|
103
102
|
);
|
|
104
103
|
}
|
|
104
|
+
const buffer = await iconResponse.arrayBuffer();
|
|
105
105
|
icon = electron.nativeImage.createFromBuffer(Buffer.from(buffer));
|
|
106
106
|
} catch (e) {
|
|
107
107
|
console.error("Failed to get icon.png: ", e);
|
|
@@ -11744,7 +11744,7 @@ function validateCliArgs(cliArgs, cliOpts, appDataRootDir) {
|
|
|
11744
11744
|
}
|
|
11745
11745
|
const rustUtils = require("@holochain/hc-spin-rust-utils");
|
|
11746
11746
|
const cli = new commander.Command();
|
|
11747
|
-
cli.name("hc-spin").description("CLI to run Holochain aps during development.").version(`0.200.
|
|
11747
|
+
cli.name("hc-spin").description("CLI to run Holochain aps during development.").version(`0.200.6 (for holochain 0.2.x)`).argument(
|
|
11748
11748
|
"<path>",
|
|
11749
11749
|
"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"
|
|
11750
11750
|
).option(
|
package/package.json
CHANGED
package/src/main/index.ts
CHANGED
|
@@ -27,7 +27,7 @@ const cli = new Command();
|
|
|
27
27
|
cli
|
|
28
28
|
.name('hc-spin')
|
|
29
29
|
.description('CLI to run Holochain aps during development.')
|
|
30
|
-
.version(`0.200.
|
|
30
|
+
.version(`0.200.6 (for holochain 0.2.x)`)
|
|
31
31
|
.argument(
|
|
32
32
|
'<path>',
|
|
33
33
|
'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',
|
package/src/main/windows.ts
CHANGED
|
@@ -67,12 +67,12 @@ electron.contextBridge.exposeInMainWorld("__HC_LAUNCHER_ENV__", {
|
|
|
67
67
|
} else {
|
|
68
68
|
try {
|
|
69
69
|
const iconResponse = await net.fetch(`http://127.0.0.1:${uiSource.port}/icon.png`);
|
|
70
|
-
|
|
71
|
-
if (buffer.byteLength === 0 && agentNum === 1) {
|
|
70
|
+
if (iconResponse.status === 404 && agentNum === 1) {
|
|
72
71
|
console.warn(
|
|
73
72
|
'\n\n+++++ WARNING +++++\n[hc-spin] No icon.png found. It is recommended to put an icon.png file (1024x1024 pixel) in the root of your UI assets directory which can be used by the Holochain Launcher.\n+++++++++++++++++++\n\n',
|
|
74
73
|
);
|
|
75
74
|
}
|
|
75
|
+
const buffer = await iconResponse.arrayBuffer();
|
|
76
76
|
icon = nativeImage.createFromBuffer(Buffer.from(buffer));
|
|
77
77
|
} catch (e) {
|
|
78
78
|
console.error('Failed to get icon.png: ', e);
|