@elicdavis/node-flow 0.1.3 → 0.1.4
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/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/esbuild.ts +5 -1
- package/package.json +1 -1
- package/src/nodes/publisher.ts +5 -2
- package/src/port.ts +1 -1
package/esbuild.ts
CHANGED
|
@@ -25,7 +25,11 @@ if (enableWatch) {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
serve(serveOpts, {}).then((result) => {
|
|
28
|
-
|
|
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}"`);
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
35
|
|
package/package.json
CHANGED
package/src/nodes/publisher.ts
CHANGED
|
@@ -51,8 +51,10 @@ export class Publisher {
|
|
|
51
51
|
const subMenus = new Map<string, Map<string, FlowNodeConfig>>();
|
|
52
52
|
|
|
53
53
|
for (let [key, nodeConfig] of subMenu) {
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const slashIndex = key.indexOf("/")
|
|
55
|
+
const bracketIndex = key.indexOf("[")
|
|
56
|
+
|
|
57
|
+
if (slashIndex === -1 || bracketIndex < slashIndex) {
|
|
56
58
|
items.push({
|
|
57
59
|
name: key,
|
|
58
60
|
callback: () => {
|
|
@@ -62,6 +64,7 @@ export class Publisher {
|
|
|
62
64
|
},
|
|
63
65
|
});
|
|
64
66
|
} else {
|
|
67
|
+
const elements = key.split("/");
|
|
65
68
|
if (!subMenus.has(elements[0])) {
|
|
66
69
|
subMenus.set(elements[0], new Map<string, FlowNodeConfig>());
|
|
67
70
|
}
|
package/src/port.ts
CHANGED