Skip to content

Commit b615e79

Browse files
committed
publisher paths acknowledge bracket enclosing slashes
1 parent 2f370e6 commit b615e79

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

esbuild.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ if (enableWatch) {
2525
};
2626

2727
serve(serveOpts, {}).then((result) => {
28-
console.log(`serving extension from "${serveOpts.servedir}" at "http://${result.host}:${result.port}"`);
28+
let host = result.host;
29+
if (host === "0.0.0.0") {
30+
host = "localhost"
31+
}
32+
console.log(`serving extension from "${serveOpts.servedir}" at "http://${host}:${result.port}"`);
2933
});
3034
}
3135

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@elicdavis/node-flow",
33
"description": "build node graphs",
44
"author": "Eli C Davis",
5-
"version": "0.1.3",
5+
"version": "0.1.4",
66
"license": "MIT",
77
"keywords": [
88
"nodes",

src/nodes/publisher.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ export class Publisher {
5151
const subMenus = new Map<string, Map<string, FlowNodeConfig>>();
5252

5353
for (let [key, nodeConfig] of subMenu) {
54-
const elements = key.split("/");
55-
if (elements.length === 1) {
54+
const slashIndex = key.indexOf("/")
55+
const bracketIndex = key.indexOf("[")
56+
57+
if (slashIndex === -1 || bracketIndex < slashIndex) {
5658
items.push({
5759
name: key,
5860
callback: () => {
@@ -62,6 +64,7 @@ export class Publisher {
6264
},
6365
});
6466
} else {
67+
const elements = key.split("/");
6568
if (!subMenus.has(elements[0])) {
6669
subMenus.set(elements[0], new Map<string, FlowNodeConfig>());
6770
}

src/port.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class Port {
136136
this.#dataTypePopupElement = new ContainerRenderElement(
137137
containerElements,
138138
{
139-
BackgroundColor: "rgba(0, 0, 0, 0.75)",
139+
BackgroundColor: "rgba(0, 0, 0, 0.85)",
140140
Border: {
141141
Radius: 6,
142142
},

0 commit comments

Comments
 (0)