trac-peer 0.0.75 → 0.0.77
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 +1 -1
- package/src/index.js +6 -5
- package/src/protocol.js +1 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -3,10 +3,11 @@ import Autobase from 'autobase';
|
|
|
3
3
|
import Hyperswarm from 'hyperswarm';
|
|
4
4
|
import ReadyResource from 'ready-resource';
|
|
5
5
|
import b4a from 'b4a';
|
|
6
|
+
import {Buffer} from "buffer"
|
|
6
7
|
import Hyperbee from 'hyperbee';
|
|
7
|
-
import readline from '
|
|
8
|
+
import readline from 'readline';
|
|
8
9
|
import Corestore from 'corestore';
|
|
9
|
-
import {createHash} from "
|
|
10
|
+
import {createHash} from "crypto";
|
|
10
11
|
import w from 'protomux-wakeup';
|
|
11
12
|
const wakeup = new w();
|
|
12
13
|
import {addWriter, addAdmin, setAutoAddWriters, setChatStatus, setMod, deleteMessage,
|
|
@@ -591,8 +592,8 @@ export class Peer extends ReadyResource {
|
|
|
591
592
|
|
|
592
593
|
async interactiveMode() {
|
|
593
594
|
const rl = readline.createInterface({
|
|
594
|
-
input:
|
|
595
|
-
output:
|
|
595
|
+
input: new tty.ReadStream(0),
|
|
596
|
+
output: new tty.WriteStream(1)
|
|
596
597
|
});
|
|
597
598
|
|
|
598
599
|
console.log('Node started. Available commands:');
|
|
@@ -630,7 +631,7 @@ export class Peer extends ReadyResource {
|
|
|
630
631
|
console.log('Exiting...');
|
|
631
632
|
rl.close();
|
|
632
633
|
await this.close();
|
|
633
|
-
process.exit(0);
|
|
634
|
+
typeof process !== "undefined" ? process.exit(0) : Pear.exit(0);
|
|
634
635
|
case '/get_keys':
|
|
635
636
|
console.log("Public Key: ", this.wallet.publicKey);
|
|
636
637
|
console.log("Secret Key: ", this.wallet.secretKey);
|
package/src/protocol.js
CHANGED