@bitsocial/bitsocial-cli 0.19.61 → 0.19.63
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/README.md +24 -24
- package/dist/webui/daemon-server.js +17 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ docker exec bitsocial bitsocial community list
|
|
|
83
83
|
| Path | Description |
|
|
84
84
|
|---|---|
|
|
85
85
|
| `/data/bitsocial` | Bitsocial data directory |
|
|
86
|
-
| `/data/bitsocial/
|
|
86
|
+
| `/data/bitsocial/communities` | Community SQLite databases |
|
|
87
87
|
| `/data/bitsocial/.bitsocial-cli.ipfs` | Kubo IPFS repository |
|
|
88
88
|
| `/logs/bitsocial` | Log files |
|
|
89
89
|
|
|
@@ -107,7 +107,7 @@ docker compose logs -f
|
|
|
107
107
|
The output will include lines like:
|
|
108
108
|
|
|
109
109
|
```
|
|
110
|
-
|
|
110
|
+
pkc rpc: listening on ws://localhost:9138/<auth-key> (secret auth key for remote connections)
|
|
111
111
|
WebUI (seedit - Similar to old reddit UI): http://<your-ip>:9138/<auth-key>/seedit (secret auth key for remote connections)
|
|
112
112
|
```
|
|
113
113
|
|
|
@@ -232,18 +232,18 @@ In Bash (or powershell if you're on Windows), run `bitsocial daemon` to able to
|
|
|
232
232
|
$ bitsocial daemon
|
|
233
233
|
IPFS API listening on: http://localhost:5001/api/v0
|
|
234
234
|
IPFS Gateway listening on: http://localhost:6473
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
pkc rpc: listening on ws://localhost:9138 (local connections only)
|
|
236
|
+
pkc rpc: listening on ws://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL (secret auth key for remote connections)
|
|
237
237
|
Bitsocial data path: /root/.local/share/bitsocial
|
|
238
|
-
Communities in data path: [ '
|
|
239
|
-
WebUI (
|
|
240
|
-
WebUI (
|
|
238
|
+
Communities in data path: [ 'anime-and-manga.bso' ]
|
|
239
|
+
WebUI (5chan - Imageboard-style UI): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/5chan (local connections only)
|
|
240
|
+
WebUI (5chan - Imageboard-style UI): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/5chan (secret auth key for remote connections)
|
|
241
241
|
WebUI (seedit - Similar to old reddit UI): http://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (local connections only)
|
|
242
242
|
WebUI (seedit - Similar to old reddit UI): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (secret auth key for remote connections)
|
|
243
243
|
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
-
Once `bitsocial daemon` is running, you can create and manage your communities through the web interfaces, either seedit or
|
|
246
|
+
Once `bitsocial daemon` is running, you can create and manage your communities through the web interfaces, either seedit or 5chan. All the interfaces are interoperable. If you're a power user and prefer CLI, then you can take a look at the commands below.
|
|
247
247
|
|
|
248
248
|
If you need to view detailed protocol or IPFS logs for debugging, you can use `bitsocial logs`. For example, `bitsocial logs --tail 50` shows the last 50 lines, or `bitsocial logs --since 1h` shows logs from the past hour.
|
|
249
249
|
|
|
@@ -265,7 +265,7 @@ Address Started
|
|
|
265
265
|
censorship-watch.bso true
|
|
266
266
|
health-nutrition-science.bso true
|
|
267
267
|
movies-tv-anime.bso true
|
|
268
|
-
|
|
268
|
+
anime-and-manga.bso true
|
|
269
269
|
politically-incorrect.bso true
|
|
270
270
|
reddit-screenshots.bso false
|
|
271
271
|
videos-livestreams-podcasts.bso false
|
|
@@ -344,7 +344,7 @@ EXAMPLES
|
|
|
344
344
|
$ bitsocial challenge install ./my-local-challenge
|
|
345
345
|
```
|
|
346
346
|
|
|
347
|
-
_See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
347
|
+
_See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/challenge/install.ts)_
|
|
348
348
|
|
|
349
349
|
## `bitsocial challenge list`
|
|
350
350
|
|
|
@@ -367,7 +367,7 @@ EXAMPLES
|
|
|
367
367
|
$ bitsocial challenge list -q
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
-
_See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
370
|
+
_See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/challenge/list.ts)_
|
|
371
371
|
|
|
372
372
|
## `bitsocial challenge remove NAME`
|
|
373
373
|
|
|
@@ -392,7 +392,7 @@ EXAMPLES
|
|
|
392
392
|
$ bitsocial challenge remove @scope/my-challenge
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
-
_See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
395
|
+
_See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/challenge/remove.ts)_
|
|
396
396
|
|
|
397
397
|
## `bitsocial community create`
|
|
398
398
|
|
|
@@ -422,7 +422,7 @@ EXAMPLES
|
|
|
422
422
|
$ bitsocial community create --jsonFile ./create-options.json
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
_See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
425
|
+
_See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/create.ts)_
|
|
426
426
|
|
|
427
427
|
## `bitsocial community delete ADDRESSES`
|
|
428
428
|
|
|
@@ -447,7 +447,7 @@ EXAMPLES
|
|
|
447
447
|
$ bitsocial community delete 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
448
448
|
```
|
|
449
449
|
|
|
450
|
-
_See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
450
|
+
_See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/delete.ts)_
|
|
451
451
|
|
|
452
452
|
## `bitsocial community edit ADDRESS`
|
|
453
453
|
|
|
@@ -517,7 +517,7 @@ EXAMPLES
|
|
|
517
517
|
$ bitsocial community edit bitsocial.bso --jsonFile ./edit-options.json
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
-
_See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
520
|
+
_See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/edit.ts)_
|
|
521
521
|
|
|
522
522
|
## `bitsocial community get [ADDRESS]`
|
|
523
523
|
|
|
@@ -548,7 +548,7 @@ EXAMPLES
|
|
|
548
548
|
$ bitsocial community get --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
549
549
|
```
|
|
550
550
|
|
|
551
|
-
_See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
551
|
+
_See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/get.ts)_
|
|
552
552
|
|
|
553
553
|
## `bitsocial community list`
|
|
554
554
|
|
|
@@ -571,7 +571,7 @@ EXAMPLES
|
|
|
571
571
|
$ bitsocial community list
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
-
_See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
574
|
+
_See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/list.ts)_
|
|
575
575
|
|
|
576
576
|
## `bitsocial community start ADDRESSES`
|
|
577
577
|
|
|
@@ -605,7 +605,7 @@ EXAMPLES
|
|
|
605
605
|
$ bitsocial community start $(bitsocial community list -q) --concurrency 1
|
|
606
606
|
```
|
|
607
607
|
|
|
608
|
-
_See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
608
|
+
_See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/start.ts)_
|
|
609
609
|
|
|
610
610
|
## `bitsocial community stop ADDRESSES`
|
|
611
611
|
|
|
@@ -630,7 +630,7 @@ EXAMPLES
|
|
|
630
630
|
$ bitsocial community stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW
|
|
631
631
|
```
|
|
632
632
|
|
|
633
|
-
_See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
633
|
+
_See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/community/stop.ts)_
|
|
634
634
|
|
|
635
635
|
## `bitsocial daemon`
|
|
636
636
|
|
|
@@ -671,7 +671,7 @@ EXAMPLES
|
|
|
671
671
|
$ bitsocial daemon --chainProviderUrls https://mainnet.infura.io/v3/YOUR_KEY
|
|
672
672
|
```
|
|
673
673
|
|
|
674
|
-
_See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
674
|
+
_See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/daemon.ts)_
|
|
675
675
|
|
|
676
676
|
## `bitsocial help [COMMAND]`
|
|
677
677
|
|
|
@@ -737,7 +737,7 @@ EXAMPLES
|
|
|
737
737
|
$ bitsocial logs --stdout -f
|
|
738
738
|
```
|
|
739
739
|
|
|
740
|
-
_See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
740
|
+
_See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/logs.ts)_
|
|
741
741
|
|
|
742
742
|
## `bitsocial update check`
|
|
743
743
|
|
|
@@ -754,7 +754,7 @@ EXAMPLES
|
|
|
754
754
|
$ bitsocial update check
|
|
755
755
|
```
|
|
756
756
|
|
|
757
|
-
_See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
757
|
+
_See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/update/check.ts)_
|
|
758
758
|
|
|
759
759
|
## `bitsocial update install [VERSION]`
|
|
760
760
|
|
|
@@ -786,7 +786,7 @@ EXAMPLES
|
|
|
786
786
|
$ bitsocial update install --no-restart-daemons
|
|
787
787
|
```
|
|
788
788
|
|
|
789
|
-
_See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
789
|
+
_See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/update/install.ts)_
|
|
790
790
|
|
|
791
791
|
## `bitsocial update versions`
|
|
792
792
|
|
|
@@ -808,7 +808,7 @@ EXAMPLES
|
|
|
808
808
|
$ bitsocial update versions --limit 5
|
|
809
809
|
```
|
|
810
810
|
|
|
811
|
-
_See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
811
|
+
_See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.63/src/cli/commands/update/versions.ts)_
|
|
812
812
|
<!-- commandsstop -->
|
|
813
813
|
|
|
814
814
|
## Contribution
|
|
@@ -42,7 +42,23 @@ export async function startDaemonServer(rpcUrl, ipfsGatewayUrl, pkcOptions) {
|
|
|
42
42
|
// Start pkc-js RPC
|
|
43
43
|
const log = PKCLogger("bitsocial-cli:daemon:startDaemonServer");
|
|
44
44
|
const webuiExpressApp = express();
|
|
45
|
-
|
|
45
|
+
// Wait for bind to actually complete before returning. Calling express.listen() without
|
|
46
|
+
// awaiting 'listening' lets startup proceed before the port is accepting connections,
|
|
47
|
+
// and without an 'error' handler a bind failure becomes an uncaughtException that kills
|
|
48
|
+
// the daemon *after* it has already logged "Communities in data path" — see issue #42.
|
|
49
|
+
const httpServer = await new Promise((resolve, reject) => {
|
|
50
|
+
const server = webuiExpressApp.listen(Number(rpcUrl.port));
|
|
51
|
+
const onListening = () => {
|
|
52
|
+
server.off("error", onError);
|
|
53
|
+
resolve(server);
|
|
54
|
+
};
|
|
55
|
+
const onError = (err) => {
|
|
56
|
+
server.off("listening", onListening);
|
|
57
|
+
reject(err);
|
|
58
|
+
};
|
|
59
|
+
server.once("listening", onListening);
|
|
60
|
+
server.once("error", onError);
|
|
61
|
+
});
|
|
46
62
|
log("HTTP server is running on", "0.0.0.0" + ":" + rpcUrl.port);
|
|
47
63
|
const rpcAuthKey = await _generateRpcAuthKeyIfNotExisting(pkcOptions.dataPath);
|
|
48
64
|
const PKCRpc = await import("@pkcprotocol/pkc-js/rpc");
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitsocial/bitsocial-cli",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.63",
|
|
4
4
|
"description": "Command line interface to Bitsocial API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/bitsocialnet/bitsocial-cli",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@oclif/plugin-help": "6.2.36",
|
|
120
120
|
"@oclif/plugin-not-found": "3.2.73",
|
|
121
121
|
"@oclif/table": "0.5.1",
|
|
122
|
-
"@pkcprotocol/pkc-js": "0.0.
|
|
122
|
+
"@pkcprotocol/pkc-js": "0.0.38",
|
|
123
123
|
"dataobject-parser": "1.2.22",
|
|
124
124
|
"decompress": "4.2.1",
|
|
125
125
|
"env-paths": "2.2.1",
|