pinokiod 3.8.147 → 3.8.149

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.
@@ -8,7 +8,6 @@ class LocalhostVariableRouter extends Processor {
8
8
  this.common = new Common(router)
9
9
  }
10
10
  handle (local) {
11
- console.log("LocalhostVariableRouter", local)
12
11
  for(let script_path in local) {
13
12
  let local_variables_for_script = local[script_path]
14
13
  for(let key in local_variables_for_script) {
@@ -5,7 +5,6 @@ class PeerHomeRouter {
5
5
  this.common = new Common(router)
6
6
  }
7
7
  handle(peer) {
8
- console.log("PeerHomeRouter", peer)
9
8
  this.common.handle({
10
9
  match: `${this.router.default_prefix}.${peer.name}.${this.router.default_suffix}`,
11
10
  dial: `${peer.host}:${this.router.default_port}`,
@@ -5,7 +5,6 @@ class PeerPeerRouter {
5
5
  this.common = new Common(router)
6
6
  }
7
7
  handle(peer) {
8
- console.log("PeerPeerRouter", peer)
9
8
  for(let dial in peer.router) {
10
9
  let matches = peer.router[dial]
11
10
  let exposed_matches = matches.filter((m) => {
@@ -15,7 +14,6 @@ class PeerPeerRouter {
15
14
  let port = chunks[chunks.length-1]
16
15
  let exposed_dial = `${peer.host}:${port}` // exposed_dial :- 192.168...
17
16
  for(let match of exposed_matches) {
18
- console.log("common.handle", { match, exposed_dial, host: peer.host })
19
17
  this.common.handle({
20
18
  match,
21
19
  dial: exposed_dial,
@@ -8,14 +8,11 @@ class PeerPortRouter extends Processor {
8
8
  this.connector = new Connector(router)
9
9
  }
10
10
  handle(peer) {
11
- console.log("PeerPortRouter", peer)
12
11
  let https_domains_mapping = this.router.info[peer.host]
13
12
  console.log({ https_domains_mapping })
14
13
  for(let dial in https_domains_mapping) {
15
14
  console.log({ dial })
16
15
  let parsed_dial = this.parse_ip(dial)
17
- console.log("Parsed dial", parsed_dial)
18
-
19
16
  if (parsed_dial.host !== peer.host) {
20
17
  // ONLY connect for 127.0.0.1 or localhost
21
18
  // DO NOT connect if it's the actual host => because it will keep creating proxies forever recursively. only need to create proxies for localhost
@@ -44,8 +41,6 @@ class PeerPortRouter extends Processor {
44
41
  })
45
42
  }
46
43
  }
47
-
48
-
49
44
  }
50
45
  }
51
46
  }
@@ -8,19 +8,15 @@ class PeerVariableRouter extends Processor {
8
8
  this.connector = new Connector(router)
9
9
  }
10
10
  handle(peer) {
11
- console.log("PeerVariableRouter", JSON.stringify(peer, null, 2))
12
11
  for(let script_path in peer.memory.local) {
13
12
  let local_variables = peer.memory.local[script_path]
14
13
  for(let key in local_variables) {
15
14
  let val = local_variables[key]
16
- console.log({ key, val })
17
15
  if (val.startsWith("http")) {
18
16
  let dial = val.replace(/https?:\/\//, '')
19
17
  let name = this.api_name(peer.platform, peer.home, script_path)
20
- console.log({ dial, name, has_port: this.has_port(dial), parsed_dial: this.parse_ip(dial) })
21
18
  if (this.has_port(dial)) {
22
19
  let parsed_dial = this.parse_ip(dial)
23
- console.log("PeerVariable", { parsed_dial })
24
20
  if (key === "url") {
25
21
  this.connector.handle({
26
22
  match: `${name}.${peer.name}.localhost`.toLowerCase(),
package/kernel/util.js CHANGED
@@ -317,12 +317,12 @@ function fill_object(obj, pattern, list, cache) {
317
317
  if (!(match in map)) {
318
318
  if (replaced_map[match]) {
319
319
  map[match] = replaced_map[match]
320
- console.log("filling with cache", { match, replaced: replaced_map[match] })
320
+ // console.log("filling with cache", { match, replaced: replaced_map[match] })
321
321
  } else {
322
322
  if (index >= list.length) throw new Error("Not enough items provided");
323
323
  map[match] = list[index++];
324
324
  replaced_map[match] = map[match]
325
- console.log("filling with new", { match, replaced: replaced_map[match] })
325
+ // console.log("filling with new", { match, replaced: replaced_map[match] })
326
326
  }
327
327
  }
328
328
  return map[match];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.8.147",
3
+ "version": "3.8.149",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {