trac-peer 0.0.80 → 0.0.82

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trac-peer",
3
3
  "main": "src/index.js",
4
- "version": "0.0.80",
4
+ "version": "0.0.82",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "autobase": "7.0.45",
@@ -23,56 +23,55 @@
23
23
  "ready-resource": "^1.0.0",
24
24
  "safety-catch": "1.0.2",
25
25
  "sodium-native": "^4.3.3",
26
- "trac-wallet": "^0.0.28",
26
+ "trac-wallet": "^0.0.29",
27
27
  "xache": "1.2.0",
28
- "yargs": "^17.7.2",
29
- "bare-assert": "^1.0.1",
30
- "assert": "npm:bare-node-assert",
28
+ "bare-assert": "^1.0.2",
31
29
  "bare-buffer": "^3.1.2",
30
+ "bare-console": "^6.0.1",
31
+ "bare-crypto": "^1.4.1",
32
+ "bare-events": "^2.5.4",
33
+ "bare-fs": "^4.0.2",
34
+ "bare-http1": "^4.0.2",
35
+ "bare-https": "^2.0.0",
36
+ "bare-inspector": "^4.0.1",
37
+ "bare-module": "^4.8.3",
38
+ "bare-os": "^3.6.1",
39
+ "bare-path": "^3.0.0",
40
+ "bare-process": "^4.1.2",
41
+ "bare-readline": "^1.0.7",
42
+ "bare-repl": "^4.0.0",
43
+ "bare-stream": "^2.6.5",
44
+ "bare-subprocess": "^5.0.3",
45
+ "bare-timers": "^3.0.1",
46
+ "bare-tls": "^2.0.2",
47
+ "bare-tty": "^5.0.2",
48
+ "bare-url": "^2.1.4",
49
+ "bare-utils": "^1.2.0",
50
+ "bare-worker": "^3.0.0",
51
+ "bare-zlib": "^1.2.5",
52
+ "assert": "npm:bare-node-assert",
32
53
  "buffer": "npm:bare-node-buffer",
33
- "bare-subprocess": "^2.0.4",
34
54
  "child_process": "npm:bare-node-child-process",
35
- "bare-console": "^4.1.0",
36
55
  "console": "npm:bare-node-console",
37
- "bare-crypto": "^1.0.0",
38
56
  "crypto": "npm:bare-node-crypto",
39
- "bare-events": "^2.2.0",
40
57
  "events": "npm:bare-node-events",
41
- "bare-fs": "^2.1.5",
42
58
  "fs": "npm:bare-node-fs",
43
- "bare-http1": "^2.0.3",
44
59
  "http": "npm:bare-node-http",
45
- "bare-https": "^1.0.0",
46
60
  "https": "npm:bare-node-https",
47
- "bare-inspector": "^1.1.2",
48
61
  "inspector": "npm:bare-node-inspector",
49
- "bare-module": "^1.2.5",
50
62
  "module": "npm:bare-node-module",
51
- "bare-os": "^2.2.0",
52
63
  "os": "npm:bare-node-os",
53
- "bare-path": "^2.1.0",
54
64
  "path": "npm:bare-node-path",
55
- "bare-process": "^1.3.0",
56
65
  "process": "npm:bare-node-process",
57
- "bare-readline": "^1.0.0",
58
66
  "readline": "npm:bare-node-readline",
59
- "bare-repl": "^1.0.3",
60
67
  "repl": "npm:bare-node-repl",
61
- "bare-stream": "^1.0.0",
62
68
  "stream": "npm:bare-node-stream",
63
- "bare-timers" : "^1.0.0",
64
69
  "timers": "npm:bare-node-timers",
65
- "bare-tls": "^1.0.0",
66
70
  "tls": "npm:bare-node-tls",
67
- "bare-tty": "^3.2.0",
68
71
  "tty": "npm:bare-node-tty",
69
- "bare-url": "^2.1.4",
70
72
  "url": "npm:bare-node-url",
71
- "bare-utils": "^1.0.0",
72
73
  "util": "npm:bare-node-util",
73
- "bare-worker": "^1.0.0",
74
74
  "worker_threads": "npm:bare-node-worker-threads",
75
- "bare-zlib": "^1.0.0",
76
75
  "zlib": "npm:bare-node-zlib"
77
76
  },
78
77
  "publishConfig": {
package/src/functions.js CHANGED
@@ -1,3 +1,5 @@
1
+ import {Buffer} from "buffer"
2
+
1
3
  export function resolveNumberString(number, decimals){
2
4
  number = number + '';
3
5
  decimals = isNaN(decimals) ? 18 : parseInt(decimals);
package/src/protocol.js CHANGED
@@ -15,7 +15,7 @@ class Protocol{
15
15
  this.features = {};
16
16
  }
17
17
 
18
- async parseArgs(cmdline) {
18
+ parseArgs(cmdline) {
19
19
  let re_next_arg = /^\s*((?:(?:"(?:\\.|[^"])*")|(?:'[^']*')|\\.|\S)+)\s*(.*)$/;
20
20
  let next_arg = ['', '', cmdline];
21
21
  let args = [];
@@ -43,11 +43,10 @@ class Protocol{
43
43
 
44
44
  args[args.length] = unquoted_arg;
45
45
  }
46
+ args = args.splice(1);
46
47
  for(let i = 0; i < args.length; i++){
47
48
  if(i % 2 === 0) {
48
- if(!args[i].startsWith('--')){
49
- continue;
50
- }
49
+ if(args[i].startsWith('--')) args[i] = args[i].substring(2);
51
50
  obj[args[i]] = args[i+1] !== undefined ? args[i+1] : null;
52
51
  }
53
52
  }