pinokiod 3.8.61 → 3.8.62

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.
@@ -48,19 +48,24 @@ class Router {
48
48
  }
49
49
  published() {
50
50
  let info = this.info()
51
+ console.log("published info", info)
51
52
  let pub = {}
52
53
  for(let host in info) {
53
54
  let routes = info[host]
54
55
  pub[host] = {}
55
56
  for(let dial in routes) {
56
57
  let matches = routes[dial]
57
- let exposed_matches = matches.filter((m) => {
58
- return m.endsWith(`${this.kernel.peer.name}.localhost`)
59
- })
60
- let port = dial.split(":")[1]
61
- let exposed_port = this.port_mapping[`${port}`]
62
- let exposed_dial = `${this.kernel.peer.host}:${exposed_port}` // exposed_dial :- 192.168...
63
- pub[host][exposed_dial] = exposed_matches
58
+ if (dial.startsWith(this.kernel.peer.host)) {
59
+ let exposed_matches = matches.filter((m) => {
60
+ return m.endsWith(`${this.kernel.peer.name}.localhost`)
61
+ })
62
+ let port = dial.split(":")[1]
63
+ let exposed_port = this.port_mapping[`${port}`]
64
+ let exposed_dial = `${this.kernel.peer.host}:${exposed_port}` // exposed_dial :- 192.168...
65
+ pub[host][exposed_dial] = exposed_matches
66
+ } else {
67
+ pub[host][dial] = matches
68
+ }
64
69
  }
65
70
  }
66
71
  return pub
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.8.61",
3
+ "version": "3.8.62",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {